Merge pull request #16858 from cxxly/16756-refactor-docker_cli_login_test

refactor integration-cli/docker_cli_login_test.go with Assert
This commit is contained in:
Vincent Demeester
2015-10-09 23:56:24 +02:00
+3 -3
View File
@@ -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) //"Expected non nil err when loginning in & TTY not available"
}