mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Merge pull request #26753 from LK4D4/fix_flaky_group_test
integration: fix flaky TestSwarmServiceWithGroup
This commit is contained in:
commit
62faeb5d93
1 changed files with 2 additions and 2 deletions
|
@ -225,7 +225,7 @@ func (s *DockerSwarmSuite) TestSwarmServiceWithGroup(c *check.C) {
|
|||
d := s.AddDaemon(c, true, true)
|
||||
|
||||
name := "top"
|
||||
out, err := d.Cmd("service", "create", "--name", name, "--user", "root:root", "--group-add", "wheel", "--group-add", "audio", "--group-add", "staff", "--group-add", "777", "busybox", "sh", "-c", "id > /id && top")
|
||||
out, err := d.Cmd("service", "create", "--name", name, "--user", "root:root", "--group-add", "wheel", "--group-add", "audio", "--group-add", "staff", "--group-add", "777", "busybox", "top")
|
||||
c.Assert(err, checker.IsNil)
|
||||
c.Assert(strings.TrimSpace(out), checker.Not(checker.Equals), "")
|
||||
|
||||
|
@ -238,7 +238,7 @@ func (s *DockerSwarmSuite) TestSwarmServiceWithGroup(c *check.C) {
|
|||
|
||||
container := strings.TrimSpace(out)
|
||||
|
||||
out, err = d.Cmd("exec", container, "cat", "/id")
|
||||
out, err = d.Cmd("exec", container, "id")
|
||||
c.Assert(err, checker.IsNil)
|
||||
c.Assert(strings.TrimSpace(out), checker.Equals, "uid=0(root) gid=0(root) groups=10(wheel),29(audio),50(staff),777")
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue