Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[v0.6 backport] fix tests after busybox update #1682

Merged
merged 1 commit into from
Sep 14, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions client/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1275,7 +1275,7 @@ func testUser(t *testing.T, sb integration.Sandbox) {

run("daemon", `sh -c "id -nu > user"`)
run("daemon:daemon", `sh -c "id -ng > group"`)
run("daemon:nogroup", `sh -c "id -ng > nogroup"`)
run("daemon:nobody", `sh -c "id -ng > nobody"`)
run("1:1", `sh -c "id -g > userone"`)

st = st.Run(llb.Shlex("cp -a /wd/. /out/"))
Expand Down Expand Up @@ -1306,9 +1306,9 @@ func testUser(t *testing.T, sb integration.Sandbox) {
require.NoError(t, err)
require.Contains(t, string(dt), "daemon")

dt, err = ioutil.ReadFile(filepath.Join(destDir, "nogroup"))
dt, err = ioutil.ReadFile(filepath.Join(destDir, "nobody"))
require.NoError(t, err)
require.Contains(t, string(dt), "nogroup")
require.Contains(t, string(dt), "nobody")

dt, err = ioutil.ReadFile(filepath.Join(destDir, "userone"))
require.NoError(t, err)
Expand Down
8 changes: 4 additions & 4 deletions frontend/dockerfile/dockerfile_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2782,7 +2782,7 @@ FROM busybox AS base
ENV owner 1000
RUN mkdir -m 0777 /out
COPY --chown=daemon foo /
COPY --chown=1000:nogroup bar /baz
COPY --chown=1000:nobody bar /baz
ARG group
COPY --chown=${owner}:${group} foo /foobis
RUN stat -c "%U %G" /foo > /out/fooowner
Expand Down Expand Up @@ -2818,7 +2818,7 @@ COPY --from=base /out /
},
FrontendAttrs: map[string]string{
"build-arg:BUILDKIT_DISABLE_FILEOP": strconv.FormatBool(!isFileOp),
"build-arg:group": "nogroup",
"build-arg:group": "nobody",
},
LocalDirs: map[string]string{
builder.DefaultLocalNameDockerfile: dir,
Expand All @@ -2833,11 +2833,11 @@ COPY --from=base /out /

dt, err = ioutil.ReadFile(filepath.Join(destDir, "subowner"))
require.NoError(t, err)
require.Equal(t, "1000 nogroup\n", string(dt))
require.Equal(t, "1000 nobody\n", string(dt))

dt, err = ioutil.ReadFile(filepath.Join(destDir, "foobisowner"))
require.NoError(t, err)
require.Equal(t, "1000 nogroup\n", string(dt))
require.Equal(t, "1000 nobody\n", string(dt))
}

func testCopyOverrideFiles(t *testing.T, sb integration.Sandbox) {
Expand Down