Browse code

TestSwarmContainerEndpointOptions: fix debug

In case of failure, stale out was printed.

Fixes: 6212ea669b4e92b3

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>

Kir Kolyshkin authored on 2018/10/03 15:38:47
Showing 1 changed files
... ...
@@ -344,21 +344,21 @@ func (s *DockerSwarmSuite) TestSwarmContainerEndpointOptions(c *check.C) {
344 344
 	c.Assert(err, checker.IsNil, check.Commentf("%s", out))
345 345
 	c.Assert(strings.TrimSpace(out), checker.Not(checker.Equals), "")
346 346
 
347
-	_, err = d.Cmd("run", "-d", "--net=foo", "--name=first", "--net-alias=first-alias", "busybox:glibc", "top")
347
+	out, err = d.Cmd("run", "-d", "--net=foo", "--name=first", "--net-alias=first-alias", "busybox:glibc", "top")
348 348
 	c.Assert(err, checker.IsNil, check.Commentf("%s", out))
349 349
 
350
-	_, err = d.Cmd("run", "-d", "--net=foo", "--name=second", "busybox:glibc", "top")
350
+	out, err = d.Cmd("run", "-d", "--net=foo", "--name=second", "busybox:glibc", "top")
351 351
 	c.Assert(err, checker.IsNil, check.Commentf("%s", out))
352 352
 
353
-	_, err = d.Cmd("run", "-d", "--net=foo", "--net-alias=third-alias", "busybox:glibc", "top")
353
+	out, err = d.Cmd("run", "-d", "--net=foo", "--net-alias=third-alias", "busybox:glibc", "top")
354 354
 	c.Assert(err, checker.IsNil, check.Commentf("%s", out))
355 355
 
356 356
 	// ping first container and its alias, also ping third and anonymous container by its alias
357
-	_, err = d.Cmd("exec", "second", "ping", "-c", "1", "first")
357
+	out, err = d.Cmd("exec", "second", "ping", "-c", "1", "first")
358 358
 	c.Assert(err, check.IsNil, check.Commentf("%s", out))
359
-	_, err = d.Cmd("exec", "second", "ping", "-c", "1", "first-alias")
359
+	out, err = d.Cmd("exec", "second", "ping", "-c", "1", "first-alias")
360 360
 	c.Assert(err, check.IsNil, check.Commentf("%s", out))
361
-	_, err = d.Cmd("exec", "second", "ping", "-c", "1", "third-alias")
361
+	out, err = d.Cmd("exec", "second", "ping", "-c", "1", "third-alias")
362 362
 	c.Assert(err, check.IsNil, check.Commentf("%s", out))
363 363
 }
364 364