Merge pull request #44120 from thaJeztah/20.10_backport_update_tests
[20.10 backport] Update some tests for supplementary group permissions
This commit is contained in:
commit
e42327a6d3
2 changed files with 3 additions and 3 deletions
|
@ -775,7 +775,7 @@ func (s *DockerSuite) 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)
|
||||
}
|
||||
}
|
||||
|
@ -1075,7 +1075,7 @@ func (s *DockerSuite) 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)
|
||||
}
|
||||
|
|
|
@ -315,7 +315,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