diff --git a/integration-cli/docker_cli_login_test.go b/integration-cli/docker_cli_login_test.go index 3b4431d2d2..717a1bed74 100644 --- a/integration-cli/docker_cli_login_test.go +++ b/integration-cli/docker_cli_login_test.go @@ -4,6 +4,7 @@ import ( "bytes" "os/exec" + "github.com/docker/docker/pkg/integration/checker" "github.com/go-check/check" ) @@ -14,8 +15,7 @@ func (s *DockerSuite) TestLoginWithoutTTY(c *check.C) { cmd.Stdin = bytes.NewBufferString("buffer test string \n") // run the command and block until it's done - if err := cmd.Run(); err == nil { - c.Fatal("Expected non nil err when loginning in & TTY not available") - } + err := cmd.Run() + c.Assert(err, checker.NotNil, check.Commentf("Expected non nil err when loginning in & TTY not available")) }