TestStartReturnCorrectExitCode: show error

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
(cherry picked from commit 0d59f4305cbb1aaae1b0c6aab94c1e5a08b50bfb)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: d52a18f35215b127bd17e2a2d8cbfd2cb9ede5a3
Component: engine
This commit is contained in:
Kir Kolyshkin
2019-04-17 23:09:06 +02:00
committed by Sebastiaan van Stijn
parent 00a7935f14
commit 8c5907db72
@@ -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", "--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(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(exitCode, checker.Equals, 12)
c.Assert(exitCode, checker.Equals, 12, check.Commentf("out: %s", out))
}