1
0
Fork 0
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:
Brian Goff 2016-09-21 15:00:53 -04:00 committed by GitHub
commit 62faeb5d93

View file

@ -225,7 +225,7 @@ func (s *DockerSwarmSuite) TestSwarmServiceWithGroup(c *check.C) {
d := s.AddDaemon(c, true, true) d := s.AddDaemon(c, true, true)
name := "top" 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(err, checker.IsNil)
c.Assert(strings.TrimSpace(out), checker.Not(checker.Equals), "") c.Assert(strings.TrimSpace(out), checker.Not(checker.Equals), "")
@ -238,7 +238,7 @@ func (s *DockerSwarmSuite) TestSwarmServiceWithGroup(c *check.C) {
container := strings.TrimSpace(out) 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(err, checker.IsNil)
c.Assert(strings.TrimSpace(out), checker.Equals, "uid=0(root) gid=0(root) groups=10(wheel),29(audio),50(staff),777") c.Assert(strings.TrimSpace(out), checker.Equals, "uid=0(root) gid=0(root) groups=10(wheel),29(audio),50(staff),777")
} }