Update some tests for supplementary group permissions
Update tests checking for groups to adjust for new policy updated in
de7af816e7
, which caused those tests
to fail:
=== FAIL: amd64.integration-cli TestDockerSwarmSuite/TestSwarmServiceWithGroup (1.94s)
docker_cli_swarm_test.go:311: assertion failed: uid=0(root) gid=0(root) groups=0(root),10(wheel),29(audio),50(staff),777 (string) != uid=0(root) gid=0(root) groups=10(wheel),29(audio),50(staff),777
(string)
--- FAIL: TestDockerSwarmSuite/TestSwarmServiceWithGroup (1.94s)
=== FAIL: amd64.integration-cli TestDockerCLIRunSuite/TestRunGroupAdd (0.41s)
docker_cli_run_test.go:1091: expected output uid=0(root) gid=0(root) groups=10(wheel),29(audio),50(staff),777 received uid=0(root) gid=0(root) groups=0(root),10(wheel),29(audio),50(staff),777
--- FAIL: TestDockerCLIRunSuite/TestRunGroupAdd (0.41s)
=== FAIL: amd64.integration-cli TestDockerCLIRunSuite/TestRunUserByIDZero (0.41s)
docker_cli_run_test.go:790: expected daemon user got uid=0(root) gid=0(root) groups=0(root),10(wheel)
--- FAIL: TestDockerCLIRunSuite/TestRunUserByIDZero (0.41s)
=== FAIL: amd64.integration-cli TestDockerCLIRunSuite (195.70s)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
de7af816e7
commit
c7e77dba7f
2 changed files with 3 additions and 3 deletions
|
@ -786,7 +786,7 @@ func (s *DockerCLIRunSuite) TestRunUserByIDZero(c *testing.T) {
|
|||
if err != nil {
|
||||
c.Fatal(err, out)
|
||||
}
|
||||
if !strings.Contains(out, "uid=0(root) gid=0(root) groups=10(wheel)") {
|
||||
if !strings.Contains(out, "uid=0(root) gid=0(root) groups=0(root),10(wheel)") {
|
||||
c.Fatalf("expected daemon user got %s", out)
|
||||
}
|
||||
}
|
||||
|
@ -1086,7 +1086,7 @@ func (s *DockerCLIRunSuite) TestRunGroupAdd(c *testing.T) {
|
|||
testRequires(c, DaemonIsLinux)
|
||||
out, _ := dockerCmd(c, "run", "--group-add=audio", "--group-add=staff", "--group-add=777", "busybox", "sh", "-c", "id")
|
||||
|
||||
groupsList := "uid=0(root) gid=0(root) groups=10(wheel),29(audio),50(staff),777"
|
||||
groupsList := "uid=0(root) gid=0(root) groups=0(root),10(wheel),29(audio),50(staff),777"
|
||||
if actual := strings.Trim(out, "\r\n"); actual != groupsList {
|
||||
c.Fatalf("expected output %s received %s", groupsList, actual)
|
||||
}
|
||||
|
|
|
@ -308,7 +308,7 @@ func (s *DockerSwarmSuite) TestSwarmServiceWithGroup(c *testing.T) {
|
|||
|
||||
out, err = d.Cmd("exec", container, "id")
|
||||
assert.NilError(c, err, out)
|
||||
assert.Equal(c, strings.TrimSpace(out), "uid=0(root) gid=0(root) groups=10(wheel),29(audio),50(staff),777")
|
||||
assert.Equal(c, strings.TrimSpace(out), "uid=0(root) gid=0(root) groups=0(root),10(wheel),29(audio),50(staff),777")
|
||||
}
|
||||
|
||||
func (s *DockerSwarmSuite) TestSwarmContainerAutoStart(c *testing.T) {
|
||||
|
|
Loading…
Reference in a new issue