Browse Source

Merge pull request #37820 from kolyshkin/TestStartReturnCorrectExitCode

TestStartReturnCorrectExitCode: show error
Tibor Vass 6 years ago
parent
commit
d6ac319aaa
1 changed files with 5 additions and 4 deletions
  1. 5 4
      integration-cli/docker_cli_start_test.go

+ 5 - 4
integration-cli/docker_cli_start_test.go

@@ -190,10 +190,11 @@ func (s *DockerSuite) TestStartReturnCorrectExitCode(c *check.C) {
 	dockerCmd(c, "create", "--restart=on-failure:2", "--name", "withRestart", "busybox", "sh", "-c", "exit 11")
 	dockerCmd(c, "create", "--restart=on-failure:2", "--name", "withRestart", "busybox", "sh", "-c", "exit 11")
 	dockerCmd(c, "create", "--rm", "--name", "withRm", "busybox", "sh", "-c", "exit 12")
 	dockerCmd(c, "create", "--rm", "--name", "withRm", "busybox", "sh", "-c", "exit 12")
 
 
-	_, exitCode, err := dockerCmdWithError("start", "-a", "withRestart")
+	out, exitCode, err := dockerCmdWithError("start", "-a", "withRestart")
 	c.Assert(err, checker.NotNil)
 	c.Assert(err, checker.NotNil)
-	c.Assert(exitCode, checker.Equals, 11)
-	_, exitCode, err = dockerCmdWithError("start", "-a", "withRm")
+	c.Assert(exitCode, checker.Equals, 11, check.Commentf("out: %s", out))
+
+	out, exitCode, err = dockerCmdWithError("start", "-a", "withRm")
 	c.Assert(err, checker.NotNil)
 	c.Assert(err, checker.NotNil)
-	c.Assert(exitCode, checker.Equals, 12)
+	c.Assert(exitCode, checker.Equals, 12, check.Commentf("out: %s", out))
 }
 }