diff --git a/integration-cli/docker_api_containers_test.go b/integration-cli/docker_api_containers_test.go index 236a39b21b..8591b16de7 100644 --- a/integration-cli/docker_api_containers_test.go +++ b/integration-cli/docker_api_containers_test.go @@ -215,7 +215,7 @@ func (s *DockerSuite) TestGetContainerStatsRmRunning(c *testing.T) { // Now remove without `-f` and make sure we are still pulling stats _, _, err = dockerCmdWithError("rm", id) - assert.Assert(c, err, checker.Not(checker.IsNil), check.Commentf("rm should have failed but didn't")) + assert.Assert(c, err != nil, check.Commentf("rm should have failed but didn't")) _, err = buf.ReadTimeout(b, 2*time.Second) assert.NilError(c, err) diff --git a/integration-cli/docker_cli_inspect_test.go b/integration-cli/docker_cli_inspect_test.go index b9189c572b..5fd6999953 100644 --- a/integration-cli/docker_cli_inspect_test.go +++ b/integration-cli/docker_cli_inspect_test.go @@ -324,11 +324,11 @@ func (s *DockerSuite) TestInspectTemplateError(c *testing.T) { runSleepingContainer(c, "--name=container1", "-d") out, _, err := dockerCmdWithError("inspect", "--type=container", "--format='Format container: {{.ThisDoesNotExist}}'", "container1") - assert.Assert(c, err, checker.Not(checker.IsNil)) + assert.Assert(c, err != nil) assert.Assert(c, out, checker.Contains, "Template parsing error") out, _, err = dockerCmdWithError("inspect", "--type=image", "--format='Format container: {{.ThisDoesNotExist}}'", "busybox") - assert.Assert(c, err, checker.Not(checker.IsNil)) + assert.Assert(c, err != nil) assert.Assert(c, out, checker.Contains, "Template parsing error") } @@ -356,7 +356,7 @@ func (s *DockerSuite) TestInspectStopWhenNotFound(c *testing.T) { runSleepingContainer(c, "--name=busybox2", "-d") result := dockerCmdWithResult("inspect", "--type=container", "--format='{{.Name}}'", "busybox1", "busybox2", "missing") - assert.Assert(c, result.Error, checker.Not(checker.IsNil)) + assert.Assert(c, result.Error != nil) assert.Assert(c, result.Stdout(), checker.Contains, "busybox1") assert.Assert(c, result.Stdout(), checker.Contains, "busybox2") assert.Assert(c, result.Stderr(), checker.Contains, "Error: No such container: missing") @@ -364,7 +364,7 @@ func (s *DockerSuite) TestInspectStopWhenNotFound(c *testing.T) { // test inspect would not fast fail result = dockerCmdWithResult("inspect", "--type=container", "--format='{{.Name}}'", "missing", "busybox1", "busybox2") - assert.Assert(c, result.Error, checker.Not(checker.IsNil)) + assert.Assert(c, result.Error != nil) assert.Assert(c, result.Stdout(), checker.Contains, "busybox1") assert.Assert(c, result.Stdout(), checker.Contains, "busybox2") assert.Assert(c, result.Stderr(), checker.Contains, "Error: No such container: missing") diff --git a/integration-cli/docker_cli_service_create_test.go b/integration-cli/docker_cli_service_create_test.go index 521e7e388a..d3f2d362fa 100644 --- a/integration-cli/docker_cli_service_create_test.go +++ b/integration-cli/docker_cli_service_create_test.go @@ -88,7 +88,7 @@ func (s *DockerSwarmSuite) TestServiceCreateWithSecretSimple(c *testing.T) { assert.Equal(c, len(refs), 1) assert.Assert(c, refs[0].SecretName, checker.Equals, testName) - assert.Assert(c, refs[0].File, checker.Not(checker.IsNil)) + assert.Assert(c, refs[0].File != nil) assert.Assert(c, refs[0].File.Name, checker.Equals, testName) assert.Assert(c, refs[0].File.UID, checker.Equals, "0") assert.Assert(c, refs[0].File.GID, checker.Equals, "0") @@ -236,7 +236,7 @@ func (s *DockerSwarmSuite) TestServiceCreateWithConfigSimple(c *testing.T) { assert.Equal(c, len(refs), 1) assert.Assert(c, refs[0].ConfigName, checker.Equals, testName) - assert.Assert(c, refs[0].File, checker.Not(checker.IsNil)) + assert.Assert(c, refs[0].File != nil) assert.Assert(c, refs[0].File.Name, checker.Equals, testName) assert.Assert(c, refs[0].File.UID, checker.Equals, "0") assert.Assert(c, refs[0].File.GID, checker.Equals, "0") diff --git a/integration-cli/docker_cli_volume_test.go b/integration-cli/docker_cli_volume_test.go index 8dc7b5b007..2ba57742bb 100644 --- a/integration-cli/docker_cli_volume_test.go +++ b/integration-cli/docker_cli_volume_test.go @@ -37,7 +37,7 @@ func (s *DockerSuite) TestVolumeCLICreate(c *testing.T) { } func (s *DockerSuite) TestVolumeCLIInspect(c *testing.T) { - assert.Assert(c, exec.Command(dockerBinary, "volume", "inspect", "doesnotexist").Run(), checker.Not(checker.IsNil), check.Commentf("volume inspect should error on non-existent volume")) + assert.Assert(c, exec.Command(dockerBinary, "volume", "inspect", "doesnotexist").Run() != nil, check.Commentf("volume inspect should error on non-existent volume")) out, _ := dockerCmd(c, "volume", "create") name := strings.TrimSpace(out) out, _ = dockerCmd(c, "volume", "inspect", "--format={{ .Name }}", name) @@ -210,7 +210,7 @@ func (s *DockerSuite) TestVolumeCLIRm(c *testing.T) { dockerCmd(c, "rm", "test2") dockerCmd(c, "volume", "rm", volumeID) - assert.Assert(c, exec.Command("volume", "rm", "doesnotexist").Run(), checker.Not(checker.IsNil), check.Commentf("volume rm should fail with non-existent volume")) + assert.Assert(c, exec.Command("volume", "rm", "doesnotexist").Run() != nil, check.Commentf("volume rm should fail with non-existent volume")) } // FIXME(vdemeester) should be a unit test in cli/command/volume package