Better logging for errors in some tests

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 42df9edc4a6ccfff6869fd14b2128ca3312e99db
Component: engine
This commit is contained in:
Brian Goff
2016-03-24 12:43:04 -04:00
parent 971b432393
commit 44532d43ae
5 changed files with 21 additions and 12 deletions

View File

@ -24,8 +24,8 @@ func (s *DockerSuite) TestStartAttachReturnsOnError(c *check.C) {
go func() {
// Attempt to start attached to the container that won't start
// This should return an error immediately since the container can't be started
if _, _, err := dockerCmdWithError("start", "-a", "test2"); err == nil {
ch <- fmt.Errorf("Expected error but got none")
if out, _, err := dockerCmdWithError("start", "-a", "test2"); err == nil {
ch <- fmt.Errorf("Expected error but got none:\n%s", out)
}
close(ch)
}()