Browse code

TestStartReturnCorrectExitCode: show error

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

Kir Kolyshkin authored on 2018/09/11 08:26:40
Showing 1 changed files
... ...
@@ -190,10 +190,11 @@ func (s *DockerSuite) TestStartReturnCorrectExitCode(c *check.C) {
190 190
 	dockerCmd(c, "create", "--restart=on-failure:2", "--name", "withRestart", "busybox", "sh", "-c", "exit 11")
191 191
 	dockerCmd(c, "create", "--rm", "--name", "withRm", "busybox", "sh", "-c", "exit 12")
192 192
 
193
-	_, exitCode, err := dockerCmdWithError("start", "-a", "withRestart")
193
+	out, exitCode, err := dockerCmdWithError("start", "-a", "withRestart")
194 194
 	c.Assert(err, checker.NotNil)
195
-	c.Assert(exitCode, checker.Equals, 11)
196
-	_, exitCode, err = dockerCmdWithError("start", "-a", "withRm")
195
+	c.Assert(exitCode, checker.Equals, 11, check.Commentf("out: %s", out))
196
+
197
+	out, exitCode, err = dockerCmdWithError("start", "-a", "withRm")
197 198
 	c.Assert(err, checker.NotNil)
198
-	c.Assert(exitCode, checker.Equals, 12)
199
+	c.Assert(exitCode, checker.Equals, 12, check.Commentf("out: %s", out))
199 200
 }