integration: fix flaky TestSwarmServiceWithGroup
| ... | ... |
@@ -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 |
} |