Skip to content

Commit

Permalink
conformance: add a test that tries to chowning a volume
Browse files Browse the repository at this point in the history
Add a conformance test that attempts to "chown" a volume declared in a
base image, which produces different results depending on whether we're
using the BuildKit-based builder or the V1 "classic" builder.  For now,
don't try to change our behavior, and continue imitating the behavior of
the classic builder.

Signed-off-by: Nalin Dahyabhai <[email protected]>
  • Loading branch information
nalind committed May 9, 2024
1 parent 608a375 commit dd99371
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/conformance/conformance_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3102,6 +3102,11 @@ var internalTestCases = []testCase{
contextDir: "multistage/copyback",
dockerUseBuildKit: true,
},

{
name: "chown-volume",
contextDir: "chown-volume",
},
}

func TestCommit(t *testing.T) {
Expand Down
9 changes: 9 additions & 0 deletions tests/conformance/testdata/chown-volume/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
FROM busybox AS first
RUN mkdir /volumea /volumeb /volumec
RUN touch -r /bin/ls /volumea /volumeb /volumec
VOLUME /volumea
VOLUME /volumeb
VOLUME /volumec

FROM first
RUN chown 1000:1000 /volumea /volumeb /volumec

0 comments on commit dd99371

Please sign in to comment.