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
1 changed files with 2 additions and 2 deletions

View File

@ -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")
}