Skip to content

Commit

Permalink
Merge pull request #44119 from thaJeztah/update_tests
Browse files Browse the repository at this point in the history
Update some tests for supplementary group permissions
  • Loading branch information
thaJeztah committed Sep 9, 2022
2 parents de7af81 + c7e77db commit 924edb9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions integration-cli/docker_cli_run_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}
Expand Down Expand Up @@ -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)
}
Expand Down
2 changes: 1 addition & 1 deletion integration-cli/docker_cli_swarm_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 924edb9

Please sign in to comment.