mirror of
https://github.com/clearlinux/docker.git
synced 2026-09-06 13:41:36 +00:00
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:
@@ -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"
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user