1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Merge pull request #37820 from kolyshkin/TestStartReturnCorrectExitCode

TestStartReturnCorrectExitCode: show error
This commit is contained in:
Tibor Vass 2018-09-12 15:42:25 -07:00 committed by GitHub
commit d6ac319aaa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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))
}