Browse code

Merge pull request #26753 from LK4D4/fix_flaky_group_test

integration: fix flaky TestSwarmServiceWithGroup

Brian Goff authored on 2016/09/22 04:00:53
Showing 1 changed files
... ...
@@ -225,7 +225,7 @@ func (s *DockerSwarmSuite) TestSwarmServiceWithGroup(c *check.C) {
225 225
 	d := s.AddDaemon(c, true, true)
226 226
 
227 227
 	name := "top"
228
-	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")
228
+	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")
229 229
 	c.Assert(err, checker.IsNil)
230 230
 	c.Assert(strings.TrimSpace(out), checker.Not(checker.Equals), "")
231 231
 
... ...
@@ -238,7 +238,7 @@ func (s *DockerSwarmSuite) TestSwarmServiceWithGroup(c *check.C) {
238 238
 
239 239
 	container := strings.TrimSpace(out)
240 240
 
241
-	out, err = d.Cmd("exec", container, "cat", "/id")
241
+	out, err = d.Cmd("exec", container, "id")
242 242
 	c.Assert(err, checker.IsNil)
243 243
 	c.Assert(strings.TrimSpace(out), checker.Equals, "uid=0(root) gid=0(root) groups=10(wheel),29(audio),50(staff),777")
244 244
 }