Browse code

rm-gocheck: IsNil

sed -E -i 's#\bassert\.Assert\(c, (.*), checker\.IsNil\b#assert.Assert(c, \1 == nil#g' \
-- "integration-cli/docker_api_containers_test.go" "integration-cli/docker_cli_attach_test.go" "integration-cli/docker_cli_attach_unix_test.go" "integration-cli/docker_cli_build_test.go" "integration-cli/docker_cli_build_unix_test.go" "integration-cli/docker_cli_by_digest_test.go" "integration-cli/docker_cli_cp_from_container_test.go" "integration-cli/docker_cli_cp_to_container_test.go" "integration-cli/docker_cli_create_test.go" "integration-cli/docker_cli_daemon_test.go" "integration-cli/docker_cli_external_volume_driver_unix_test.go" "integration-cli/docker_cli_health_test.go" "integration-cli/docker_cli_history_test.go" "integration-cli/docker_cli_import_test.go" "integration-cli/docker_cli_inspect_test.go" "integration-cli/docker_cli_links_test.go" "integration-cli/docker_cli_network_unix_test.go" "integration-cli/docker_cli_plugins_test.go" "integration-cli/docker_cli_port_test.go" "integration-cli/docker_cli_ps_test.go" "integration-cli/docker_cli_pull_local_test.go" "integration-cli/docker_cli_run_test.go" "integration-cli/docker_cli_run_unix_test.go" "integration-cli/docker_cli_save_load_test.go" "integration-cli/docker_cli_service_create_test.go" "integration-cli/docker_cli_swarm_test.go" "integration-cli/docker_cli_userns_test.go" "integration-cli/docker_cli_volume_test.go" "integration-cli/docker_hub_pull_suite_test.go" "integration-cli/docker_utils_test.go" "pkg/discovery/discovery_test.go" "pkg/discovery/file/file_test.go" "pkg/discovery/kv/kv_test.go" "pkg/discovery/memory/memory_test.go"

Signed-off-by: Tibor Vass <tibor@docker.com>
(cherry picked from commit 2743e2d8bc7248a5c2f90610e127a0939bbb3e0c)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>

Tibor Vass authored on 2019/09/10 06:05:57
Showing 34 changed files
... ...
@@ -220,7 +220,7 @@ func (s *DockerSuite) TestGetContainerStatsRmRunning(c *testing.T) {
220 220
 	assert.NilError(c, err)
221 221
 
222 222
 	dockerCmd(c, "rm", "-f", id)
223
-	assert.Assert(c, <-chErr, checker.IsNil)
223
+	assert.Assert(c, <-chErr == nil)
224 224
 }
225 225
 
226 226
 // ChannelBuffer holds a chan of byte array that can be populate in a goroutine.
... ...
@@ -656,7 +656,7 @@ func (s *DockerSuite) TestContainerAPIVerifyHeader(c *testing.T) {
656 656
 
657 657
 	create := func(ct string) (*http.Response, io.ReadCloser, error) {
658 658
 		jsonData := bytes.NewBuffer(nil)
659
-		assert.Assert(c, json.NewEncoder(jsonData).Encode(config), checker.IsNil)
659
+		assert.Assert(c, json.NewEncoder(jsonData).Encode(config) == nil)
660 660
 		return request.Post("/containers/create", request.RawContent(ioutil.NopCloser(jsonData)), request.ContentType(ct))
661 661
 	}
662 662
 
... ...
@@ -840,7 +840,7 @@ func (s *DockerSuite) TestContainerAPIPostCreateNull(c *testing.T) {
840 840
 		ID string
841 841
 	}
842 842
 	var container createResp
843
-	assert.Assert(c, json.Unmarshal(b, &container), checker.IsNil)
843
+	assert.Assert(c, json.Unmarshal(b, &container) == nil)
844 844
 	out := inspectField(c, container.ID, "HostConfig.CpusetCpus")
845 845
 	assert.Equal(c, out, "")
846 846
 
... ...
@@ -864,7 +864,7 @@ func (s *DockerSuite) TestCreateWithTooLowMemoryLimit(c *testing.T) {
864 864
 	res, body, err := request.Post("/containers/create", request.RawString(config), request.JSON)
865 865
 	assert.NilError(c, err)
866 866
 	b, err2 := request.ReadBody(body)
867
-	assert.Assert(c, err2, checker.IsNil)
867
+	assert.Assert(c, err2 == nil)
868 868
 
869 869
 	if versions.GreaterThanOrEqualTo(testEnv.DaemonAPIVersion(), "1.32") {
870 870
 		assert.Equal(c, res.StatusCode, http.StatusBadRequest)
... ...
@@ -917,7 +917,7 @@ func (s *DockerSuite) TestContainerAPIRestart(c *testing.T) {
917 917
 	err = cli.ContainerRestart(context.Background(), name, &timeout)
918 918
 	assert.NilError(c, err)
919 919
 
920
-	assert.Assert(c, waitInspect(name, "{{ .State.Restarting  }} {{ .State.Running  }}", "false true", 15*time.Second), checker.IsNil)
920
+	assert.Assert(c, waitInspect(name, "{{ .State.Restarting  }} {{ .State.Running  }}", "false true", 15*time.Second) == nil)
921 921
 }
922 922
 
923 923
 func (s *DockerSuite) TestContainerAPIRestartNotimeoutParam(c *testing.T) {
... ...
@@ -933,7 +933,7 @@ func (s *DockerSuite) TestContainerAPIRestartNotimeoutParam(c *testing.T) {
933 933
 	err = cli.ContainerRestart(context.Background(), name, nil)
934 934
 	assert.NilError(c, err)
935 935
 
936
-	assert.Assert(c, waitInspect(name, "{{ .State.Restarting  }} {{ .State.Running  }}", "false true", 15*time.Second), checker.IsNil)
936
+	assert.Assert(c, waitInspect(name, "{{ .State.Restarting  }} {{ .State.Running  }}", "false true", 15*time.Second) == nil)
937 937
 }
938 938
 
939 939
 func (s *DockerSuite) TestContainerAPIStart(c *testing.T) {
... ...
@@ -973,7 +973,7 @@ func (s *DockerSuite) TestContainerAPIStop(c *testing.T) {
973 973
 
974 974
 	err = cli.ContainerStop(context.Background(), name, &timeout)
975 975
 	assert.NilError(c, err)
976
-	assert.Assert(c, waitInspect(name, "{{ .State.Running  }}", "false", 60*time.Second), checker.IsNil)
976
+	assert.Assert(c, waitInspect(name, "{{ .State.Running  }}", "false", 60*time.Second) == nil)
977 977
 
978 978
 	// second call to start should give 304
979 979
 	// maybe add ContainerStartWithRaw to test it
... ...
@@ -1153,7 +1153,7 @@ func (s *DockerSuite) TestContainerAPIDeleteRemoveLinks(c *testing.T) {
1153 1153
 	out, _ = dockerCmd(c, "run", "--link", "tlink1:tlink1", "--name", "tlink2", "-d", "busybox", "top")
1154 1154
 
1155 1155
 	id2 := strings.TrimSpace(out)
1156
-	assert.Assert(c, waitRun(id2), checker.IsNil)
1156
+	assert.Assert(c, waitRun(id2) == nil)
1157 1157
 
1158 1158
 	links := inspectFieldJSON(c, id2, "HostConfig.Links")
1159 1159
 	assert.Equal(c, links, "[\"/tlink1:/tlink2/tlink1\"]", check.Commentf("expected to have links between containers"))
... ...
@@ -1238,7 +1238,7 @@ func (s *DockerSuite) TestContainerAPIChunkedEncoding(c *testing.T) {
1238 1238
 		req.ContentLength = -1
1239 1239
 		return nil
1240 1240
 	}))
1241
-	assert.Assert(c, err, checker.IsNil, check.Commentf("error creating container with chunked encoding"))
1241
+	assert.Assert(c, err == nil, check.Commentf("error creating container with chunked encoding"))
1242 1242
 	defer resp.Body.Close()
1243 1243
 	assert.Equal(c, resp.StatusCode, http.StatusCreated)
1244 1244
 }
... ...
@@ -1247,7 +1247,7 @@ func (s *DockerSuite) TestContainerAPIPostContainerStop(c *testing.T) {
1247 1247
 	out := runSleepingContainer(c)
1248 1248
 
1249 1249
 	containerID := strings.TrimSpace(out)
1250
-	assert.Assert(c, waitRun(containerID), checker.IsNil)
1250
+	assert.Assert(c, waitRun(containerID) == nil)
1251 1251
 
1252 1252
 	cli, err := client.NewClientWithOpts(client.FromEnv)
1253 1253
 	assert.NilError(c, err)
... ...
@@ -1255,7 +1255,7 @@ func (s *DockerSuite) TestContainerAPIPostContainerStop(c *testing.T) {
1255 1255
 
1256 1256
 	err = cli.ContainerStop(context.Background(), containerID, nil)
1257 1257
 	assert.NilError(c, err)
1258
-	assert.Assert(c, waitInspect(containerID, "{{ .State.Running  }}", "false", 60*time.Second), checker.IsNil)
1258
+	assert.Assert(c, waitInspect(containerID, "{{ .State.Running  }}", "false", 60*time.Second) == nil)
1259 1259
 }
1260 1260
 
1261 1261
 // #14170
... ...
@@ -1544,7 +1544,7 @@ func (s *DockerSuite) TestPostContainersCreateMemorySwappinessHostConfigOmitted(
1544 1544
 	if versions.LessThan(testEnv.DaemonAPIVersion(), "1.31") {
1545 1545
 		assert.Equal(c, *containerJSON.HostConfig.MemorySwappiness, int64(-1))
1546 1546
 	} else {
1547
-		assert.Assert(c, containerJSON.HostConfig.MemorySwappiness, checker.IsNil)
1547
+		assert.Assert(c, containerJSON.HostConfig.MemorySwappiness == nil)
1548 1548
 	}
1549 1549
 }
1550 1550
 
... ...
@@ -1614,7 +1614,7 @@ func (s *DockerSuite) TestContainerAPIStatsWithNetworkDisabled(c *testing.T) {
1614 1614
 	err = cli.ContainerStart(context.Background(), name, types.ContainerStartOptions{})
1615 1615
 	assert.NilError(c, err)
1616 1616
 
1617
-	assert.Assert(c, waitRun(name), checker.IsNil)
1617
+	assert.Assert(c, waitRun(name) == nil)
1618 1618
 
1619 1619
 	type b struct {
1620 1620
 		stats types.ContainerStats
... ...
@@ -1636,7 +1636,7 @@ func (s *DockerSuite) TestContainerAPIStatsWithNetworkDisabled(c *testing.T) {
1636 1636
 	case <-time.After(2 * time.Second):
1637 1637
 		c.Fatal("stream was not closed after container was removed")
1638 1638
 	case sr := <-bc:
1639
-		assert.Assert(c, sr.err, checker.IsNil)
1639
+		assert.Assert(c, sr.err == nil)
1640 1640
 		sr.stats.Body.Close()
1641 1641
 	}
1642 1642
 }
... ...
@@ -2052,7 +2052,7 @@ func (s *DockerSuite) TestContainersAPICreateMountsCreate(c *testing.T) {
2052 2052
 			assert.NilError(c, err)
2053 2053
 			defer os.RemoveAll(tmpDir3)
2054 2054
 
2055
-			assert.Assert(c, mount.Mount(tmpDir3, tmpDir3, "none", "bind,shared"), checker.IsNil)
2055
+			assert.Assert(c, mount.Mount(tmpDir3, tmpDir3, "none", "bind,shared") == nil)
2056 2056
 
2057 2057
 			cases = append(cases, []testCase{
2058 2058
 				{
... ...
@@ -147,7 +147,7 @@ func (s *DockerSuite) TestAttachDisconnect(c *testing.T) {
147 147
 	stdout, err := cmd.StdoutPipe()
148 148
 	assert.NilError(c, err)
149 149
 	defer stdout.Close()
150
-	assert.Assert(c, cmd.Start(), checker.IsNil)
150
+	assert.Assert(c, cmd.Start() == nil)
151 151
 	defer func() {
152 152
 		cmd.Process.Kill()
153 153
 		cmd.Wait()
... ...
@@ -159,7 +159,7 @@ func (s *DockerSuite) TestAttachDisconnect(c *testing.T) {
159 159
 	assert.NilError(c, err)
160 160
 	assert.Equal(c, strings.TrimSpace(out), "hello")
161 161
 
162
-	assert.Assert(c, stdin.Close(), checker.IsNil)
162
+	assert.Assert(c, stdin.Close() == nil)
163 163
 
164 164
 	// Expect container to still be running after stdin is closed
165 165
 	running := inspectField(c, id, "State.Running")
... ...
@@ -51,7 +51,7 @@ func (s *DockerSuite) TestAttachClosedOnContainerStop(c *testing.T) {
51 51
 	case err := <-errChan:
52 52
 		tty.Close()
53 53
 		out, _ := ioutil.ReadAll(pty)
54
-		assert.Assert(c, err, checker.IsNil, check.Commentf("out: %v", string(out)))
54
+		assert.Assert(c, err == nil, check.Commentf("out: %v", string(out)))
55 55
 	case <-time.After(attachWait):
56 56
 		c.Fatal("timed out without attach returning")
57 57
 	}
... ...
@@ -74,7 +74,7 @@ func (s *DockerSuite) TestAttachAfterDetach(c *testing.T) {
74 74
 		close(cmdExit)
75 75
 	}()
76 76
 
77
-	assert.Assert(c, waitRun(name), checker.IsNil)
77
+	assert.Assert(c, waitRun(name) == nil)
78 78
 
79 79
 	cpty.Write([]byte{16})
80 80
 	time.Sleep(100 * time.Millisecond)
... ...
@@ -5513,8 +5513,8 @@ func (s *DockerSuite) TestBuildCacheFrom(c *testing.T) {
5513 5513
 
5514 5514
 	var layers1 []string
5515 5515
 	var layers2 []string
5516
-	assert.Assert(c, json.Unmarshal([]byte(layers1Str), &layers1), checker.IsNil)
5517
-	assert.Assert(c, json.Unmarshal([]byte(layers2Str), &layers2), checker.IsNil)
5516
+	assert.Assert(c, json.Unmarshal([]byte(layers1Str), &layers1) == nil)
5517
+	assert.Assert(c, json.Unmarshal([]byte(layers2Str), &layers2) == nil)
5518 5518
 
5519 5519
 	assert.Equal(c, len(layers1), len(layers2))
5520 5520
 	for i := 0; i < len(layers1)-1; i++ {
... ...
@@ -56,7 +56,7 @@ func (s *DockerSuite) TestBuildResourceConstraintsAreUsed(c *testing.T) {
56 56
 
57 57
 	var c1 hostConfig
58 58
 	err := json.Unmarshal([]byte(cfg), &c1)
59
-	assert.Assert(c, err, checker.IsNil, check.Commentf(cfg))
59
+	assert.Assert(c, err == nil, check.Commentf(cfg))
60 60
 
61 61
 	assert.Equal(c, c1.Memory, int64(64*1024*1024), check.Commentf("resource constraints not set properly for Memory"))
62 62
 	assert.Equal(c, c1.MemorySwap, int64(-1), check.Commentf("resource constraints not set properly for MemorySwap"))
... ...
@@ -74,7 +74,7 @@ func (s *DockerSuite) TestBuildResourceConstraintsAreUsed(c *testing.T) {
74 74
 
75 75
 	var c2 hostConfig
76 76
 	err = json.Unmarshal([]byte(cfg), &c2)
77
-	assert.Assert(c, err, checker.IsNil, check.Commentf(cfg))
77
+	assert.Assert(c, err == nil, check.Commentf(cfg))
78 78
 
79 79
 	assert.Assert(c, c2.Memory != int64(64*1024*1024), check.Commentf("resource leaked from build for Memory"))
80 80
 	assert.Assert(c, c2.MemorySwap != int64(-1), check.Commentf("resource leaked from build for MemorySwap"))
... ...
@@ -82,7 +82,7 @@ func (s *DockerSuite) TestBuildResourceConstraintsAreUsed(c *testing.T) {
82 82
 	assert.Assert(c, c2.CpusetMems != "0", check.Commentf("resource leaked from build for CpusetMems"))
83 83
 	assert.Assert(c, c2.CPUShares != int64(100), check.Commentf("resource leaked from build for CPUShares"))
84 84
 	assert.Assert(c, c2.CPUQuota != int64(8000), check.Commentf("resource leaked from build for CPUQuota"))
85
-	assert.Assert(c, c2.Ulimits, checker.IsNil, check.Commentf("resource leaked from build for Ulimits"))
85
+	assert.Assert(c, c2.Ulimits == nil, check.Commentf("resource leaked from build for Ulimits"))
86 86
 }
87 87
 
88 88
 func (s *DockerSuite) TestBuildAddChangeOwnership(c *testing.T) {
... ...
@@ -389,7 +389,7 @@ func (s *DockerRegistrySuite) TestListDanglingImagesWithDigests(c *testing.T) {
389 389
 
390 390
 func (s *DockerRegistrySuite) TestInspectImageWithDigests(c *testing.T) {
391 391
 	digest, err := setupImage(c)
392
-	assert.Assert(c, err, checker.IsNil, check.Commentf("error setting up image"))
392
+	assert.Assert(c, err == nil, check.Commentf("error setting up image"))
393 393
 
394 394
 	imageReference := fmt.Sprintf("%s@%s", repoName, digest)
395 395
 
... ...
@@ -568,14 +568,14 @@ func (s *DockerRegistrySuite) TestPullFailsWithAlteredManifest(c *testing.T) {
568 568
 func (s *DockerSchema1RegistrySuite) TestPullFailsWithAlteredManifest(c *testing.T) {
569 569
 	testRequires(c, DaemonIsLinux)
570 570
 	manifestDigest, err := setupImage(c)
571
-	assert.Assert(c, err, checker.IsNil, check.Commentf("error setting up image"))
571
+	assert.Assert(c, err == nil, check.Commentf("error setting up image"))
572 572
 
573 573
 	// Load the target manifest blob.
574 574
 	manifestBlob := s.reg.ReadBlobContents(c, manifestDigest)
575 575
 
576 576
 	var imgManifest schema1.Manifest
577 577
 	err = json.Unmarshal(manifestBlob, &imgManifest)
578
-	assert.Assert(c, err, checker.IsNil, check.Commentf("unable to decode image manifest from blob"))
578
+	assert.Assert(c, err == nil, check.Commentf("unable to decode image manifest from blob"))
579 579
 
580 580
 	// Change a layer in the manifest.
581 581
 	imgManifest.FSLayers[0] = schema1.FSLayer{
... ...
@@ -588,7 +588,7 @@ func (s *DockerSchema1RegistrySuite) TestPullFailsWithAlteredManifest(c *testing
588 588
 	defer undo()
589 589
 
590 590
 	alteredManifestBlob, err := json.MarshalIndent(imgManifest, "", "   ")
591
-	assert.Assert(c, err, checker.IsNil, check.Commentf("unable to encode altered image manifest to JSON"))
591
+	assert.Assert(c, err == nil, check.Commentf("unable to encode altered image manifest to JSON"))
592 592
 
593 593
 	s.reg.WriteBlobContents(c, manifestDigest, alteredManifestBlob)
594 594
 
... ...
@@ -610,14 +610,14 @@ func (s *DockerSchema1RegistrySuite) TestPullFailsWithAlteredManifest(c *testing
610 610
 func (s *DockerRegistrySuite) TestPullFailsWithAlteredLayer(c *testing.T) {
611 611
 	testRequires(c, DaemonIsLinux)
612 612
 	manifestDigest, err := setupImage(c)
613
-	assert.Assert(c, err, checker.IsNil)
613
+	assert.Assert(c, err == nil)
614 614
 
615 615
 	// Load the target manifest blob.
616 616
 	manifestBlob := s.reg.ReadBlobContents(c, manifestDigest)
617 617
 
618 618
 	var imgManifest schema2.Manifest
619 619
 	err = json.Unmarshal(manifestBlob, &imgManifest)
620
-	assert.Assert(c, err, checker.IsNil)
620
+	assert.Assert(c, err == nil)
621 621
 
622 622
 	// Next, get the digest of one of the layers from the manifest.
623 623
 	targetLayerDigest := imgManifest.Layers[0].Digest
... ...
@@ -653,14 +653,14 @@ func (s *DockerRegistrySuite) TestPullFailsWithAlteredLayer(c *testing.T) {
653 653
 func (s *DockerSchema1RegistrySuite) TestPullFailsWithAlteredLayer(c *testing.T) {
654 654
 	testRequires(c, DaemonIsLinux)
655 655
 	manifestDigest, err := setupImage(c)
656
-	assert.Assert(c, err, checker.IsNil)
656
+	assert.Assert(c, err == nil)
657 657
 
658 658
 	// Load the target manifest blob.
659 659
 	manifestBlob := s.reg.ReadBlobContents(c, manifestDigest)
660 660
 
661 661
 	var imgManifest schema1.Manifest
662 662
 	err = json.Unmarshal(manifestBlob, &imgManifest)
663
-	assert.Assert(c, err, checker.IsNil)
663
+	assert.Assert(c, err == nil)
664 664
 
665 665
 	// Next, get the digest of one of the layers from the manifest.
666 666
 	targetLayerDigest := imgManifest.FSLayers[0].BlobSum
... ...
@@ -36,38 +36,38 @@ func (s *DockerSuite) TestCpFromSymlinkDestination(c *testing.T) {
36 36
 	srcPath := containerCpPath(containerID, "/file2")
37 37
 	dstPath := cpPath(tmpDir, "symlinkToFile1")
38 38
 
39
-	assert.Assert(c, runDockerCp(c, srcPath, dstPath, nil), checker.IsNil)
39
+	assert.Assert(c, runDockerCp(c, srcPath, dstPath, nil) == nil)
40 40
 
41 41
 	// The symlink should not have been modified.
42
-	assert.Assert(c, symlinkTargetEquals(c, dstPath, "file1"), checker.IsNil)
42
+	assert.Assert(c, symlinkTargetEquals(c, dstPath, "file1") == nil)
43 43
 
44 44
 	// The file should have the contents of "file2" now.
45
-	assert.Assert(c, fileContentEquals(c, cpPath(tmpDir, "file1"), "file2\n"), checker.IsNil)
45
+	assert.Assert(c, fileContentEquals(c, cpPath(tmpDir, "file1"), "file2\n") == nil)
46 46
 
47 47
 	// Next, copy a file from the container to a symlink to a directory. This
48 48
 	// should copy the file into the symlink target directory.
49 49
 	dstPath = cpPath(tmpDir, "symlinkToDir1")
50 50
 
51
-	assert.Assert(c, runDockerCp(c, srcPath, dstPath, nil), checker.IsNil)
51
+	assert.Assert(c, runDockerCp(c, srcPath, dstPath, nil) == nil)
52 52
 
53 53
 	// The symlink should not have been modified.
54
-	assert.Assert(c, symlinkTargetEquals(c, dstPath, "dir1"), checker.IsNil)
54
+	assert.Assert(c, symlinkTargetEquals(c, dstPath, "dir1") == nil)
55 55
 
56 56
 	// The file should have the contents of "file2" now.
57
-	assert.Assert(c, fileContentEquals(c, cpPath(tmpDir, "file2"), "file2\n"), checker.IsNil)
57
+	assert.Assert(c, fileContentEquals(c, cpPath(tmpDir, "file2"), "file2\n") == nil)
58 58
 
59 59
 	// Next, copy a file from the container to a symlink to a file that does
60 60
 	// not exist (a broken symlink). This should create the target file with
61 61
 	// the contents of the source file.
62 62
 	dstPath = cpPath(tmpDir, "brokenSymlinkToFileX")
63 63
 
64
-	assert.Assert(c, runDockerCp(c, srcPath, dstPath, nil), checker.IsNil)
64
+	assert.Assert(c, runDockerCp(c, srcPath, dstPath, nil) == nil)
65 65
 
66 66
 	// The symlink should not have been modified.
67
-	assert.Assert(c, symlinkTargetEquals(c, dstPath, "fileX"), checker.IsNil)
67
+	assert.Assert(c, symlinkTargetEquals(c, dstPath, "fileX") == nil)
68 68
 
69 69
 	// The file should have the contents of "file2" now.
70
-	assert.Assert(c, fileContentEquals(c, cpPath(tmpDir, "fileX"), "file2\n"), checker.IsNil)
70
+	assert.Assert(c, fileContentEquals(c, cpPath(tmpDir, "fileX"), "file2\n") == nil)
71 71
 
72 72
 	// Next, copy a directory from the container to a symlink to a local
73 73
 	// directory. This should copy the directory into the symlink target
... ...
@@ -75,13 +75,13 @@ func (s *DockerSuite) TestCpFromSymlinkDestination(c *testing.T) {
75 75
 	srcPath = containerCpPath(containerID, "/dir2")
76 76
 	dstPath = cpPath(tmpDir, "symlinkToDir1")
77 77
 
78
-	assert.Assert(c, runDockerCp(c, srcPath, dstPath, nil), checker.IsNil)
78
+	assert.Assert(c, runDockerCp(c, srcPath, dstPath, nil) == nil)
79 79
 
80 80
 	// The symlink should not have been modified.
81
-	assert.Assert(c, symlinkTargetEquals(c, dstPath, "dir1"), checker.IsNil)
81
+	assert.Assert(c, symlinkTargetEquals(c, dstPath, "dir1") == nil)
82 82
 
83 83
 	// The directory should now contain a copy of "dir2".
84
-	assert.Assert(c, fileContentEquals(c, cpPath(tmpDir, "dir1/dir2/file2-1"), "file2-1\n"), checker.IsNil)
84
+	assert.Assert(c, fileContentEquals(c, cpPath(tmpDir, "dir1/dir2/file2-1"), "file2-1\n") == nil)
85 85
 
86 86
 	// Next, copy a directory from the container to a symlink to a local
87 87
 	// directory that does not exist (a broken symlink). This should create
... ...
@@ -89,13 +89,13 @@ func (s *DockerSuite) TestCpFromSymlinkDestination(c *testing.T) {
89 89
 	// should not modify the symlink.
90 90
 	dstPath = cpPath(tmpDir, "brokenSymlinkToDirX")
91 91
 
92
-	assert.Assert(c, runDockerCp(c, srcPath, dstPath, nil), checker.IsNil)
92
+	assert.Assert(c, runDockerCp(c, srcPath, dstPath, nil) == nil)
93 93
 
94 94
 	// The symlink should not have been modified.
95
-	assert.Assert(c, symlinkTargetEquals(c, dstPath, "dirX"), checker.IsNil)
95
+	assert.Assert(c, symlinkTargetEquals(c, dstPath, "dirX") == nil)
96 96
 
97 97
 	// The "dirX" directory should now be a copy of "dir2".
98
-	assert.Assert(c, fileContentEquals(c, cpPath(tmpDir, "dirX/file2-1"), "file2-1\n"), checker.IsNil)
98
+	assert.Assert(c, fileContentEquals(c, cpPath(tmpDir, "dirX/file2-1"), "file2-1\n") == nil)
99 99
 }
100 100
 
101 101
 // Possibilities are reduced to the remaining 10 cases:
... ...
@@ -129,9 +129,9 @@ func (s *DockerSuite) TestCpFromCaseA(c *testing.T) {
129 129
 	srcPath := containerCpPath(containerID, "/root/file1")
130 130
 	dstPath := cpPath(tmpDir, "itWorks.txt")
131 131
 
132
-	assert.Assert(c, runDockerCp(c, srcPath, dstPath, nil), checker.IsNil)
132
+	assert.Assert(c, runDockerCp(c, srcPath, dstPath, nil) == nil)
133 133
 
134
-	assert.Assert(c, fileContentEquals(c, dstPath, "file1\n"), checker.IsNil)
134
+	assert.Assert(c, fileContentEquals(c, dstPath, "file1\n") == nil)
135 135
 }
136 136
 
137 137
 // B. SRC specifies a file and DST (with trailing path separator) doesn't
... ...
@@ -170,11 +170,11 @@ func (s *DockerSuite) TestCpFromCaseC(c *testing.T) {
170 170
 	dstPath := cpPath(tmpDir, "file2")
171 171
 
172 172
 	// Ensure the local file starts with different content.
173
-	assert.Assert(c, fileContentEquals(c, dstPath, "file2\n"), checker.IsNil)
173
+	assert.Assert(c, fileContentEquals(c, dstPath, "file2\n") == nil)
174 174
 
175
-	assert.Assert(c, runDockerCp(c, srcPath, dstPath, nil), checker.IsNil)
175
+	assert.Assert(c, runDockerCp(c, srcPath, dstPath, nil) == nil)
176 176
 
177
-	assert.Assert(c, fileContentEquals(c, dstPath, "file1\n"), checker.IsNil)
177
+	assert.Assert(c, fileContentEquals(c, dstPath, "file1\n") == nil)
178 178
 }
179 179
 
180 180
 // D. SRC specifies a file and DST exists as a directory. This should place
... ...
@@ -197,23 +197,23 @@ func (s *DockerSuite) TestCpFromCaseD(c *testing.T) {
197 197
 	_, err := os.Stat(dstPath)
198 198
 	assert.Assert(c, os.IsNotExist(err), checker.True, check.Commentf("did not expect dstPath %q to exist", dstPath))
199 199
 
200
-	assert.Assert(c, runDockerCp(c, srcPath, dstDir, nil), checker.IsNil)
200
+	assert.Assert(c, runDockerCp(c, srcPath, dstDir, nil) == nil)
201 201
 
202
-	assert.Assert(c, fileContentEquals(c, dstPath, "file1\n"), checker.IsNil)
202
+	assert.Assert(c, fileContentEquals(c, dstPath, "file1\n") == nil)
203 203
 
204 204
 	// Now try again but using a trailing path separator for dstDir.
205 205
 
206 206
 	// unable to remove dstDir
207
-	assert.Assert(c, os.RemoveAll(dstDir), checker.IsNil)
207
+	assert.Assert(c, os.RemoveAll(dstDir) == nil)
208 208
 
209 209
 	// unable to make dstDir
210
-	assert.Assert(c, os.MkdirAll(dstDir, os.FileMode(0755)), checker.IsNil)
210
+	assert.Assert(c, os.MkdirAll(dstDir, os.FileMode(0755)) == nil)
211 211
 
212 212
 	dstDir = cpPathTrailingSep(tmpDir, "dir1")
213 213
 
214
-	assert.Assert(c, runDockerCp(c, srcPath, dstDir, nil), checker.IsNil)
214
+	assert.Assert(c, runDockerCp(c, srcPath, dstDir, nil) == nil)
215 215
 
216
-	assert.Assert(c, fileContentEquals(c, dstPath, "file1\n"), checker.IsNil)
216
+	assert.Assert(c, fileContentEquals(c, dstPath, "file1\n") == nil)
217 217
 }
218 218
 
219 219
 // E. SRC specifies a directory and DST does not exist. This should create a
... ...
@@ -231,20 +231,20 @@ func (s *DockerSuite) TestCpFromCaseE(c *testing.T) {
231 231
 	dstDir := cpPath(tmpDir, "testDir")
232 232
 	dstPath := filepath.Join(dstDir, "file1-1")
233 233
 
234
-	assert.Assert(c, runDockerCp(c, srcDir, dstDir, nil), checker.IsNil)
234
+	assert.Assert(c, runDockerCp(c, srcDir, dstDir, nil) == nil)
235 235
 
236
-	assert.Assert(c, fileContentEquals(c, dstPath, "file1-1\n"), checker.IsNil)
236
+	assert.Assert(c, fileContentEquals(c, dstPath, "file1-1\n") == nil)
237 237
 
238 238
 	// Now try again but using a trailing path separator for dstDir.
239 239
 
240 240
 	// unable to remove dstDir
241
-	assert.Assert(c, os.RemoveAll(dstDir), checker.IsNil)
241
+	assert.Assert(c, os.RemoveAll(dstDir) == nil)
242 242
 
243 243
 	dstDir = cpPathTrailingSep(tmpDir, "testDir")
244 244
 
245
-	assert.Assert(c, runDockerCp(c, srcDir, dstDir, nil), checker.IsNil)
245
+	assert.Assert(c, runDockerCp(c, srcDir, dstDir, nil) == nil)
246 246
 
247
-	assert.Assert(c, fileContentEquals(c, dstPath, "file1-1\n"), checker.IsNil)
247
+	assert.Assert(c, fileContentEquals(c, dstPath, "file1-1\n") == nil)
248 248
 }
249 249
 
250 250
 // F. SRC specifies a directory and DST exists as a file. This should cause an
... ...
@@ -288,23 +288,23 @@ func (s *DockerSuite) TestCpFromCaseG(c *testing.T) {
288 288
 	resultDir := filepath.Join(dstDir, "dir1")
289 289
 	dstPath := filepath.Join(resultDir, "file1-1")
290 290
 
291
-	assert.Assert(c, runDockerCp(c, srcDir, dstDir, nil), checker.IsNil)
291
+	assert.Assert(c, runDockerCp(c, srcDir, dstDir, nil) == nil)
292 292
 
293
-	assert.Assert(c, fileContentEquals(c, dstPath, "file1-1\n"), checker.IsNil)
293
+	assert.Assert(c, fileContentEquals(c, dstPath, "file1-1\n") == nil)
294 294
 
295 295
 	// Now try again but using a trailing path separator for dstDir.
296 296
 
297 297
 	// unable to remove dstDir
298
-	assert.Assert(c, os.RemoveAll(dstDir), checker.IsNil)
298
+	assert.Assert(c, os.RemoveAll(dstDir) == nil)
299 299
 
300 300
 	// unable to make dstDir
301
-	assert.Assert(c, os.MkdirAll(dstDir, os.FileMode(0755)), checker.IsNil)
301
+	assert.Assert(c, os.MkdirAll(dstDir, os.FileMode(0755)) == nil)
302 302
 
303 303
 	dstDir = cpPathTrailingSep(tmpDir, "dir2")
304 304
 
305
-	assert.Assert(c, runDockerCp(c, srcDir, dstDir, nil), checker.IsNil)
305
+	assert.Assert(c, runDockerCp(c, srcDir, dstDir, nil) == nil)
306 306
 
307
-	assert.Assert(c, fileContentEquals(c, dstPath, "file1-1\n"), checker.IsNil)
307
+	assert.Assert(c, fileContentEquals(c, dstPath, "file1-1\n") == nil)
308 308
 }
309 309
 
310 310
 // H. SRC specifies a directory's contents only and DST does not exist. This
... ...
@@ -322,20 +322,20 @@ func (s *DockerSuite) TestCpFromCaseH(c *testing.T) {
322 322
 	dstDir := cpPath(tmpDir, "testDir")
323 323
 	dstPath := filepath.Join(dstDir, "file1-1")
324 324
 
325
-	assert.Assert(c, runDockerCp(c, srcDir, dstDir, nil), checker.IsNil)
325
+	assert.Assert(c, runDockerCp(c, srcDir, dstDir, nil) == nil)
326 326
 
327
-	assert.Assert(c, fileContentEquals(c, dstPath, "file1-1\n"), checker.IsNil)
327
+	assert.Assert(c, fileContentEquals(c, dstPath, "file1-1\n") == nil)
328 328
 
329 329
 	// Now try again but using a trailing path separator for dstDir.
330 330
 
331 331
 	// unable to remove resultDir
332
-	assert.Assert(c, os.RemoveAll(dstDir), checker.IsNil)
332
+	assert.Assert(c, os.RemoveAll(dstDir) == nil)
333 333
 
334 334
 	dstDir = cpPathTrailingSep(tmpDir, "testDir")
335 335
 
336
-	assert.Assert(c, runDockerCp(c, srcDir, dstDir, nil), checker.IsNil)
336
+	assert.Assert(c, runDockerCp(c, srcDir, dstDir, nil) == nil)
337 337
 
338
-	assert.Assert(c, fileContentEquals(c, dstPath, "file1-1\n"), checker.IsNil)
338
+	assert.Assert(c, fileContentEquals(c, dstPath, "file1-1\n") == nil)
339 339
 }
340 340
 
341 341
 // I. SRC specifies a directory's contents only and DST exists as a file. This
... ...
@@ -380,21 +380,21 @@ func (s *DockerSuite) TestCpFromCaseJ(c *testing.T) {
380 380
 	dstDir := cpPath(tmpDir, "dir2")
381 381
 	dstPath := filepath.Join(dstDir, "file1-1")
382 382
 
383
-	assert.Assert(c, runDockerCp(c, srcDir, dstDir, nil), checker.IsNil)
383
+	assert.Assert(c, runDockerCp(c, srcDir, dstDir, nil) == nil)
384 384
 
385
-	assert.Assert(c, fileContentEquals(c, dstPath, "file1-1\n"), checker.IsNil)
385
+	assert.Assert(c, fileContentEquals(c, dstPath, "file1-1\n") == nil)
386 386
 
387 387
 	// Now try again but using a trailing path separator for dstDir.
388 388
 
389 389
 	// unable to remove dstDir
390
-	assert.Assert(c, os.RemoveAll(dstDir), checker.IsNil)
390
+	assert.Assert(c, os.RemoveAll(dstDir) == nil)
391 391
 
392 392
 	// unable to make dstDir
393
-	assert.Assert(c, os.MkdirAll(dstDir, os.FileMode(0755)), checker.IsNil)
393
+	assert.Assert(c, os.MkdirAll(dstDir, os.FileMode(0755)) == nil)
394 394
 
395 395
 	dstDir = cpPathTrailingSep(tmpDir, "dir2")
396 396
 
397
-	assert.Assert(c, runDockerCp(c, srcDir, dstDir, nil), checker.IsNil)
397
+	assert.Assert(c, runDockerCp(c, srcDir, dstDir, nil) == nil)
398 398
 
399
-	assert.Assert(c, fileContentEquals(c, dstPath, "file1-1\n"), checker.IsNil)
399
+	assert.Assert(c, fileContentEquals(c, dstPath, "file1-1\n") == nil)
400 400
 }
... ...
@@ -40,38 +40,38 @@ func (s *DockerSuite) TestCpToSymlinkDestination(c *testing.T) {
40 40
 	srcPath := cpPath(testVol, "file2")
41 41
 	dstPath := containerCpPath(containerID, "/vol2/symlinkToFile1")
42 42
 
43
-	assert.Assert(c, runDockerCp(c, srcPath, dstPath, nil), checker.IsNil)
43
+	assert.Assert(c, runDockerCp(c, srcPath, dstPath, nil) == nil)
44 44
 
45 45
 	// The symlink should not have been modified.
46
-	assert.Assert(c, symlinkTargetEquals(c, cpPath(testVol, "symlinkToFile1"), "file1"), checker.IsNil)
46
+	assert.Assert(c, symlinkTargetEquals(c, cpPath(testVol, "symlinkToFile1"), "file1") == nil)
47 47
 
48 48
 	// The file should have the contents of "file2" now.
49
-	assert.Assert(c, fileContentEquals(c, cpPath(testVol, "file1"), "file2\n"), checker.IsNil)
49
+	assert.Assert(c, fileContentEquals(c, cpPath(testVol, "file1"), "file2\n") == nil)
50 50
 
51 51
 	// Next, copy a local file to a symlink to a directory in the container.
52 52
 	// This should copy the file into the symlink target directory.
53 53
 	dstPath = containerCpPath(containerID, "/vol2/symlinkToDir1")
54 54
 
55
-	assert.Assert(c, runDockerCp(c, srcPath, dstPath, nil), checker.IsNil)
55
+	assert.Assert(c, runDockerCp(c, srcPath, dstPath, nil) == nil)
56 56
 
57 57
 	// The symlink should not have been modified.
58
-	assert.Assert(c, symlinkTargetEquals(c, cpPath(testVol, "symlinkToDir1"), "dir1"), checker.IsNil)
58
+	assert.Assert(c, symlinkTargetEquals(c, cpPath(testVol, "symlinkToDir1"), "dir1") == nil)
59 59
 
60 60
 	// The file should have the contents of "file2" now.
61
-	assert.Assert(c, fileContentEquals(c, cpPath(testVol, "file2"), "file2\n"), checker.IsNil)
61
+	assert.Assert(c, fileContentEquals(c, cpPath(testVol, "file2"), "file2\n") == nil)
62 62
 
63 63
 	// Next, copy a file to a symlink to a file that does not exist (a broken
64 64
 	// symlink) in the container. This should create the target file with the
65 65
 	// contents of the source file.
66 66
 	dstPath = containerCpPath(containerID, "/vol2/brokenSymlinkToFileX")
67 67
 
68
-	assert.Assert(c, runDockerCp(c, srcPath, dstPath, nil), checker.IsNil)
68
+	assert.Assert(c, runDockerCp(c, srcPath, dstPath, nil) == nil)
69 69
 
70 70
 	// The symlink should not have been modified.
71
-	assert.Assert(c, symlinkTargetEquals(c, cpPath(testVol, "brokenSymlinkToFileX"), "fileX"), checker.IsNil)
71
+	assert.Assert(c, symlinkTargetEquals(c, cpPath(testVol, "brokenSymlinkToFileX"), "fileX") == nil)
72 72
 
73 73
 	// The file should have the contents of "file2" now.
74
-	assert.Assert(c, fileContentEquals(c, cpPath(testVol, "fileX"), "file2\n"), checker.IsNil)
74
+	assert.Assert(c, fileContentEquals(c, cpPath(testVol, "fileX"), "file2\n") == nil)
75 75
 
76 76
 	// Next, copy a local directory to a symlink to a directory in the
77 77
 	// container. This should copy the directory into the symlink target
... ...
@@ -79,13 +79,13 @@ func (s *DockerSuite) TestCpToSymlinkDestination(c *testing.T) {
79 79
 	srcPath = cpPath(testVol, "/dir2")
80 80
 	dstPath = containerCpPath(containerID, "/vol2/symlinkToDir1")
81 81
 
82
-	assert.Assert(c, runDockerCp(c, srcPath, dstPath, nil), checker.IsNil)
82
+	assert.Assert(c, runDockerCp(c, srcPath, dstPath, nil) == nil)
83 83
 
84 84
 	// The symlink should not have been modified.
85
-	assert.Assert(c, symlinkTargetEquals(c, cpPath(testVol, "symlinkToDir1"), "dir1"), checker.IsNil)
85
+	assert.Assert(c, symlinkTargetEquals(c, cpPath(testVol, "symlinkToDir1"), "dir1") == nil)
86 86
 
87 87
 	// The directory should now contain a copy of "dir2".
88
-	assert.Assert(c, fileContentEquals(c, cpPath(testVol, "dir1/dir2/file2-1"), "file2-1\n"), checker.IsNil)
88
+	assert.Assert(c, fileContentEquals(c, cpPath(testVol, "dir1/dir2/file2-1"), "file2-1\n") == nil)
89 89
 
90 90
 	// Next, copy a local directory to a symlink to a local directory that does
91 91
 	// not exist (a broken symlink) in the container. This should create the
... ...
@@ -93,13 +93,13 @@ func (s *DockerSuite) TestCpToSymlinkDestination(c *testing.T) {
93 93
 	// should not modify the symlink.
94 94
 	dstPath = containerCpPath(containerID, "/vol2/brokenSymlinkToDirX")
95 95
 
96
-	assert.Assert(c, runDockerCp(c, srcPath, dstPath, nil), checker.IsNil)
96
+	assert.Assert(c, runDockerCp(c, srcPath, dstPath, nil) == nil)
97 97
 
98 98
 	// The symlink should not have been modified.
99
-	assert.Assert(c, symlinkTargetEquals(c, cpPath(testVol, "brokenSymlinkToDirX"), "dirX"), checker.IsNil)
99
+	assert.Assert(c, symlinkTargetEquals(c, cpPath(testVol, "brokenSymlinkToDirX"), "dirX") == nil)
100 100
 
101 101
 	// The "dirX" directory should now be a copy of "dir2".
102
-	assert.Assert(c, fileContentEquals(c, cpPath(testVol, "dirX/file2-1"), "file2-1\n"), checker.IsNil)
102
+	assert.Assert(c, fileContentEquals(c, cpPath(testVol, "dirX/file2-1"), "file2-1\n") == nil)
103 103
 }
104 104
 
105 105
 // Possibilities are reduced to the remaining 10 cases:
... ...
@@ -134,9 +134,9 @@ func (s *DockerSuite) TestCpToCaseA(c *testing.T) {
134 134
 	srcPath := cpPath(tmpDir, "file1")
135 135
 	dstPath := containerCpPath(containerID, "/root/itWorks.txt")
136 136
 
137
-	assert.Assert(c, runDockerCp(c, srcPath, dstPath, nil), checker.IsNil)
137
+	assert.Assert(c, runDockerCp(c, srcPath, dstPath, nil) == nil)
138 138
 
139
-	assert.Assert(c, containerStartOutputEquals(c, containerID, "file1\n"), checker.IsNil)
139
+	assert.Assert(c, containerStartOutputEquals(c, containerID, "file1\n") == nil)
140 140
 }
141 141
 
142 142
 // B. SRC specifies a file and DST (with trailing path separator) doesn't
... ...
@@ -179,12 +179,12 @@ func (s *DockerSuite) TestCpToCaseC(c *testing.T) {
179 179
 	dstPath := containerCpPath(containerID, "/root/file2")
180 180
 
181 181
 	// Ensure the container's file starts with the original content.
182
-	assert.Assert(c, containerStartOutputEquals(c, containerID, "file2\n"), checker.IsNil)
182
+	assert.Assert(c, containerStartOutputEquals(c, containerID, "file2\n") == nil)
183 183
 
184
-	assert.Assert(c, runDockerCp(c, srcPath, dstPath, nil), checker.IsNil)
184
+	assert.Assert(c, runDockerCp(c, srcPath, dstPath, nil) == nil)
185 185
 
186 186
 	// Should now contain file1's contents.
187
-	assert.Assert(c, containerStartOutputEquals(c, containerID, "file1\n"), checker.IsNil)
187
+	assert.Assert(c, containerStartOutputEquals(c, containerID, "file1\n") == nil)
188 188
 }
189 189
 
190 190
 // D. SRC specifies a file and DST exists as a directory. This should place
... ...
@@ -206,12 +206,12 @@ func (s *DockerSuite) TestCpToCaseD(c *testing.T) {
206 206
 	dstDir := containerCpPath(containerID, "dir1")
207 207
 
208 208
 	// Ensure that dstPath doesn't exist.
209
-	assert.Assert(c, containerStartOutputEquals(c, containerID, ""), checker.IsNil)
209
+	assert.Assert(c, containerStartOutputEquals(c, containerID, "") == nil)
210 210
 
211
-	assert.Assert(c, runDockerCp(c, srcPath, dstDir, nil), checker.IsNil)
211
+	assert.Assert(c, runDockerCp(c, srcPath, dstDir, nil) == nil)
212 212
 
213 213
 	// Should now contain file1's contents.
214
-	assert.Assert(c, containerStartOutputEquals(c, containerID, "file1\n"), checker.IsNil)
214
+	assert.Assert(c, containerStartOutputEquals(c, containerID, "file1\n") == nil)
215 215
 
216 216
 	// Now try again but using a trailing path separator for dstDir.
217 217
 
... ...
@@ -224,12 +224,12 @@ func (s *DockerSuite) TestCpToCaseD(c *testing.T) {
224 224
 	dstDir = containerCpPathTrailingSep(containerID, "dir1")
225 225
 
226 226
 	// Ensure that dstPath doesn't exist.
227
-	assert.Assert(c, containerStartOutputEquals(c, containerID, ""), checker.IsNil)
227
+	assert.Assert(c, containerStartOutputEquals(c, containerID, "") == nil)
228 228
 
229
-	assert.Assert(c, runDockerCp(c, srcPath, dstDir, nil), checker.IsNil)
229
+	assert.Assert(c, runDockerCp(c, srcPath, dstDir, nil) == nil)
230 230
 
231 231
 	// Should now contain file1's contents.
232
-	assert.Assert(c, containerStartOutputEquals(c, containerID, "file1\n"), checker.IsNil)
232
+	assert.Assert(c, containerStartOutputEquals(c, containerID, "file1\n") == nil)
233 233
 }
234 234
 
235 235
 // E. SRC specifies a directory and DST does not exist. This should create a
... ...
@@ -249,10 +249,10 @@ func (s *DockerSuite) TestCpToCaseE(c *testing.T) {
249 249
 	srcDir := cpPath(tmpDir, "dir1")
250 250
 	dstDir := containerCpPath(containerID, "testDir")
251 251
 
252
-	assert.Assert(c, runDockerCp(c, srcDir, dstDir, nil), checker.IsNil)
252
+	assert.Assert(c, runDockerCp(c, srcDir, dstDir, nil) == nil)
253 253
 
254 254
 	// Should now contain file1-1's contents.
255
-	assert.Assert(c, containerStartOutputEquals(c, containerID, "file1-1\n"), checker.IsNil)
255
+	assert.Assert(c, containerStartOutputEquals(c, containerID, "file1-1\n") == nil)
256 256
 
257 257
 	// Now try again but using a trailing path separator for dstDir.
258 258
 
... ...
@@ -263,10 +263,10 @@ func (s *DockerSuite) TestCpToCaseE(c *testing.T) {
263 263
 
264 264
 	dstDir = containerCpPathTrailingSep(containerID, "testDir")
265 265
 
266
-	assert.Assert(c, runDockerCp(c, srcDir, dstDir, nil), checker.IsNil)
266
+	assert.Assert(c, runDockerCp(c, srcDir, dstDir, nil) == nil)
267 267
 
268 268
 	// Should now contain file1-1's contents.
269
-	assert.Assert(c, containerStartOutputEquals(c, containerID, "file1-1\n"), checker.IsNil)
269
+	assert.Assert(c, containerStartOutputEquals(c, containerID, "file1-1\n") == nil)
270 270
 }
271 271
 
272 272
 // F. SRC specifies a directory and DST exists as a file. This should cause an
... ...
@@ -310,12 +310,12 @@ func (s *DockerSuite) TestCpToCaseG(c *testing.T) {
310 310
 	dstDir := containerCpPath(containerID, "/root/dir2")
311 311
 
312 312
 	// Ensure that dstPath doesn't exist.
313
-	assert.Assert(c, containerStartOutputEquals(c, containerID, ""), checker.IsNil)
313
+	assert.Assert(c, containerStartOutputEquals(c, containerID, "") == nil)
314 314
 
315
-	assert.Assert(c, runDockerCp(c, srcDir, dstDir, nil), checker.IsNil)
315
+	assert.Assert(c, runDockerCp(c, srcDir, dstDir, nil) == nil)
316 316
 
317 317
 	// Should now contain file1-1's contents.
318
-	assert.Assert(c, containerStartOutputEquals(c, containerID, "file1-1\n"), checker.IsNil)
318
+	assert.Assert(c, containerStartOutputEquals(c, containerID, "file1-1\n") == nil)
319 319
 
320 320
 	// Now try again but using a trailing path separator for dstDir.
321 321
 
... ...
@@ -328,12 +328,12 @@ func (s *DockerSuite) TestCpToCaseG(c *testing.T) {
328 328
 	dstDir = containerCpPathTrailingSep(containerID, "/dir2")
329 329
 
330 330
 	// Ensure that dstPath doesn't exist.
331
-	assert.Assert(c, containerStartOutputEquals(c, containerID, ""), checker.IsNil)
331
+	assert.Assert(c, containerStartOutputEquals(c, containerID, "") == nil)
332 332
 
333
-	assert.Assert(c, runDockerCp(c, srcDir, dstDir, nil), checker.IsNil)
333
+	assert.Assert(c, runDockerCp(c, srcDir, dstDir, nil) == nil)
334 334
 
335 335
 	// Should now contain file1-1's contents.
336
-	assert.Assert(c, containerStartOutputEquals(c, containerID, "file1-1\n"), checker.IsNil)
336
+	assert.Assert(c, containerStartOutputEquals(c, containerID, "file1-1\n") == nil)
337 337
 }
338 338
 
339 339
 // H. SRC specifies a directory's contents only and DST does not exist. This
... ...
@@ -353,10 +353,10 @@ func (s *DockerSuite) TestCpToCaseH(c *testing.T) {
353 353
 	srcDir := cpPathTrailingSep(tmpDir, "dir1") + "."
354 354
 	dstDir := containerCpPath(containerID, "testDir")
355 355
 
356
-	assert.Assert(c, runDockerCp(c, srcDir, dstDir, nil), checker.IsNil)
356
+	assert.Assert(c, runDockerCp(c, srcDir, dstDir, nil) == nil)
357 357
 
358 358
 	// Should now contain file1-1's contents.
359
-	assert.Assert(c, containerStartOutputEquals(c, containerID, "file1-1\n"), checker.IsNil)
359
+	assert.Assert(c, containerStartOutputEquals(c, containerID, "file1-1\n") == nil)
360 360
 
361 361
 	// Now try again but using a trailing path separator for dstDir.
362 362
 
... ...
@@ -367,10 +367,10 @@ func (s *DockerSuite) TestCpToCaseH(c *testing.T) {
367 367
 
368 368
 	dstDir = containerCpPathTrailingSep(containerID, "testDir")
369 369
 
370
-	assert.Assert(c, runDockerCp(c, srcDir, dstDir, nil), checker.IsNil)
370
+	assert.Assert(c, runDockerCp(c, srcDir, dstDir, nil) == nil)
371 371
 
372 372
 	// Should now contain file1-1's contents.
373
-	assert.Assert(c, containerStartOutputEquals(c, containerID, "file1-1\n"), checker.IsNil)
373
+	assert.Assert(c, containerStartOutputEquals(c, containerID, "file1-1\n") == nil)
374 374
 }
375 375
 
376 376
 // I. SRC specifies a directory's contents only and DST exists as a file. This
... ...
@@ -416,12 +416,12 @@ func (s *DockerSuite) TestCpToCaseJ(c *testing.T) {
416 416
 	dstDir := containerCpPath(containerID, "/dir2")
417 417
 
418 418
 	// Ensure that dstPath doesn't exist.
419
-	assert.Assert(c, containerStartOutputEquals(c, containerID, ""), checker.IsNil)
419
+	assert.Assert(c, containerStartOutputEquals(c, containerID, "") == nil)
420 420
 
421
-	assert.Assert(c, runDockerCp(c, srcDir, dstDir, nil), checker.IsNil)
421
+	assert.Assert(c, runDockerCp(c, srcDir, dstDir, nil) == nil)
422 422
 
423 423
 	// Should now contain file1-1's contents.
424
-	assert.Assert(c, containerStartOutputEquals(c, containerID, "file1-1\n"), checker.IsNil)
424
+	assert.Assert(c, containerStartOutputEquals(c, containerID, "file1-1\n") == nil)
425 425
 
426 426
 	// Now try again but using a trailing path separator for dstDir.
427 427
 
... ...
@@ -433,12 +433,12 @@ func (s *DockerSuite) TestCpToCaseJ(c *testing.T) {
433 433
 	dstDir = containerCpPathTrailingSep(containerID, "/dir2")
434 434
 
435 435
 	// Ensure that dstPath doesn't exist.
436
-	assert.Assert(c, containerStartOutputEquals(c, containerID, ""), checker.IsNil)
436
+	assert.Assert(c, containerStartOutputEquals(c, containerID, "") == nil)
437 437
 
438
-	assert.Assert(c, runDockerCp(c, srcDir, dstDir, nil), checker.IsNil)
438
+	assert.Assert(c, runDockerCp(c, srcDir, dstDir, nil) == nil)
439 439
 
440 440
 	// Should now contain file1-1's contents.
441
-	assert.Assert(c, containerStartOutputEquals(c, containerID, "file1-1\n"), checker.IsNil)
441
+	assert.Assert(c, containerStartOutputEquals(c, containerID, "file1-1\n") == nil)
442 442
 }
443 443
 
444 444
 // The `docker cp` command should also ensure that you cannot
... ...
@@ -465,7 +465,7 @@ func (s *DockerSuite) TestCpToErrReadOnlyRootfs(c *testing.T) {
465 465
 	assert.Assert(c, isCpCannotCopyReadOnly(err), checker.True, check.Commentf("expected ErrContainerRootfsReadonly error, but got %T: %s", err, err))
466 466
 
467 467
 	// Ensure that dstPath doesn't exist.
468
-	assert.Assert(c, containerStartOutputEquals(c, containerID, ""), checker.IsNil)
468
+	assert.Assert(c, containerStartOutputEquals(c, containerID, "") == nil)
469 469
 }
470 470
 
471 471
 // The `docker cp` command should also ensure that you
... ...
@@ -492,5 +492,5 @@ func (s *DockerSuite) TestCpToErrReadOnlyVolume(c *testing.T) {
492 492
 	assert.Assert(c, isCpCannotCopyReadOnly(err), checker.True, check.Commentf("expected ErrVolumeReadonly error, but got %T: %s", err, err))
493 493
 
494 494
 	// Ensure that dstPath doesn't exist.
495
-	assert.Assert(c, containerStartOutputEquals(c, containerID, ""), checker.IsNil)
495
+	assert.Assert(c, containerStartOutputEquals(c, containerID, "") == nil)
496 496
 }
... ...
@@ -37,7 +37,7 @@ func (s *DockerSuite) TestCreateArgs(c *testing.T) {
37 37
 	}
38 38
 
39 39
 	err := json.Unmarshal([]byte(out), &containers)
40
-	assert.Assert(c, err, checker.IsNil, check.Commentf("Error inspecting the container: %s", err))
40
+	assert.Assert(c, err == nil, check.Commentf("Error inspecting the container: %s", err))
41 41
 	assert.Equal(c, len(containers), 1)
42 42
 
43 43
 	cont := containers[0]
... ...
@@ -96,7 +96,7 @@ func (s *DockerSuite) TestCreateHostConfig(c *testing.T) {
96 96
 	}
97 97
 
98 98
 	err := json.Unmarshal([]byte(out), &containers)
99
-	assert.Assert(c, err, checker.IsNil, check.Commentf("Error inspecting the container: %s", err))
99
+	assert.Assert(c, err == nil, check.Commentf("Error inspecting the container: %s", err))
100 100
 	assert.Equal(c, len(containers), 1)
101 101
 
102 102
 	cont := containers[0]
... ...
@@ -117,7 +117,7 @@ func (s *DockerSuite) TestCreateWithPortRange(c *testing.T) {
117 117
 		}
118 118
 	}
119 119
 	err := json.Unmarshal([]byte(out), &containers)
120
-	assert.Assert(c, err, checker.IsNil, check.Commentf("Error inspecting the container: %s", err))
120
+	assert.Assert(c, err == nil, check.Commentf("Error inspecting the container: %s", err))
121 121
 	assert.Equal(c, len(containers), 1)
122 122
 
123 123
 	cont := containers[0]
... ...
@@ -147,7 +147,7 @@ func (s *DockerSuite) TestCreateWithLargePortRange(c *testing.T) {
147 147
 	}
148 148
 
149 149
 	err := json.Unmarshal([]byte(out), &containers)
150
-	assert.Assert(c, err, checker.IsNil, check.Commentf("Error inspecting the container: %s", err))
150
+	assert.Assert(c, err == nil, check.Commentf("Error inspecting the container: %s", err))
151 151
 	assert.Equal(c, len(containers), 1)
152 152
 
153 153
 	cont := containers[0]
... ...
@@ -179,7 +179,7 @@ func (s *DockerSuite) TestCreateVolumesCreated(c *testing.T) {
179 179
 	dockerCmd(c, "create", "--name", name, "-v", prefix+slash+"foo", "busybox")
180 180
 
181 181
 	dir, err := inspectMountSourceField(name, prefix+slash+"foo")
182
-	assert.Assert(c, err, checker.IsNil, check.Commentf("Error getting volume host path: %q", err))
182
+	assert.Assert(c, err == nil, check.Commentf("Error getting volume host path: %q", err))
183 183
 
184 184
 	if _, err := os.Stat(dir); err != nil && os.IsNotExist(err) {
185 185
 		c.Fatalf("Volume was not created")
... ...
@@ -130,7 +130,7 @@ func (s *DockerDaemonSuite) TestDaemonRestartUnlessStopped(c *testing.T) {
130 130
 		var format string
131 131
 		for name, shouldRun := range m {
132 132
 			out, err := s.d.Cmd("ps")
133
-			assert.Assert(c, err, checker.IsNil, check.Commentf("run ps: %v", out))
133
+			assert.Assert(c, err == nil, check.Commentf("run ps: %v", out))
134 134
 			if shouldRun {
135 135
 				format = "%scontainer %q is not running"
136 136
 			} else {
... ...
@@ -240,11 +240,11 @@ func (s *DockerDaemonSuite) TestDaemonRestartWithIncreasedBasesize(c *testing.T)
240 240
 	}
241 241
 
242 242
 	err := s.d.RestartWithError("--storage-opt", fmt.Sprintf("dm.basesize=%d", newBasesizeBytes))
243
-	assert.Assert(c, err, checker.IsNil, check.Commentf("we should have been able to start the daemon with increased base device size: %v", err))
243
+	assert.Assert(c, err == nil, check.Commentf("we should have been able to start the daemon with increased base device size: %v", err))
244 244
 
245 245
 	basesizeAfterRestart := getBaseDeviceSize(c, s.d)
246 246
 	newBasesize, err := convertBasesize(newBasesizeBytes)
247
-	assert.Assert(c, err, checker.IsNil, check.Commentf("Error in converting base device size: %v", err))
247
+	assert.Assert(c, err == nil, check.Commentf("Error in converting base device size: %v", err))
248 248
 	assert.Equal(c, newBasesize, basesizeAfterRestart, check.Commentf("Basesize passed is not equal to Basesize set"))
249 249
 	s.d.Stop(c)
250 250
 }
... ...
@@ -1151,7 +1151,7 @@ func (s *DockerDaemonSuite) TestDaemonLoggingDriverShouldBeIgnoredForBuild(c *te
1151 1151
 		build.WithoutCache,
1152 1152
 	)
1153 1153
 	comment := check.Commentf("Failed to build image. output %s, exitCode %d, err %v", result.Combined(), result.ExitCode, result.Error)
1154
-	assert.Assert(c, result.Error, checker.IsNil, comment)
1154
+	assert.Assert(c, result.Error == nil, comment)
1155 1155
 	assert.Equal(c, result.ExitCode, 0, comment)
1156 1156
 	assert.Assert(c, result.Combined(), checker.Contains, "foo", comment)
1157 1157
 }
... ...
@@ -1223,7 +1223,7 @@ func (s *DockerDaemonSuite) TestDaemonWithWrongkey(c *testing.T) {
1223 1223
 	}
1224 1224
 
1225 1225
 	content, err := s.d.ReadLogFile()
1226
-	assert.Assert(c, err, checker.IsNil)
1226
+	assert.Assert(c, err == nil)
1227 1227
 
1228 1228
 	if !strings.Contains(string(content), "Public Key ID does not match") {
1229 1229
 		c.Fatalf("Missing KeyID message from daemon logs: %s", string(content))
... ...
@@ -1749,7 +1749,7 @@ func (s *DockerDaemonSuite) TestBridgeIPIsExcludedFromAllocatorPool(c *testing.T
1749 1749
 			break
1750 1750
 		}
1751 1751
 		ip, err := s.d.Cmd("inspect", "--format", "'{{.NetworkSettings.IPAddress}}'", contName)
1752
-		assert.Assert(c, err, checker.IsNil, check.Commentf("%s", ip))
1752
+		assert.Assert(c, err == nil, check.Commentf("%s", ip))
1753 1753
 
1754 1754
 		assert.Assert(c, ip != bridgeIP)
1755 1755
 		cont++
... ...
@@ -1763,7 +1763,7 @@ func (s *DockerDaemonSuite) TestDaemonNoSpaceLeftOnDeviceError(c *testing.T) {
1763 1763
 	testDir, err := ioutil.TempDir("", "no-space-left-on-device-test")
1764 1764
 	assert.NilError(c, err)
1765 1765
 	defer os.RemoveAll(testDir)
1766
-	assert.Assert(c, mount.MakeRShared(testDir), checker.IsNil)
1766
+	assert.Assert(c, mount.MakeRShared(testDir) == nil)
1767 1767
 	defer mount.Unmount(testDir)
1768 1768
 
1769 1769
 	// create a 3MiB image (with a 2MiB ext4 fs) and mount it as graph root
... ...
@@ -1999,14 +1999,14 @@ func (s *DockerDaemonSuite) TestCleanupMountsAfterDaemonCrash(c *testing.T) {
1999 1999
 	id := strings.TrimSpace(out)
2000 2000
 
2001 2001
 	// kill the daemon
2002
-	assert.Assert(c, s.d.Kill(), checker.IsNil)
2002
+	assert.Assert(c, s.d.Kill() == nil)
2003 2003
 
2004 2004
 	// Check if there are mounts with container id visible from the host.
2005 2005
 	// If not, those mounts exist in container's own mount ns, and so
2006 2006
 	// the following check for mounts being cleared is pointless.
2007 2007
 	skipMountCheck := false
2008 2008
 	mountOut, err := ioutil.ReadFile("/proc/self/mountinfo")
2009
-	assert.Assert(c, err, checker.IsNil, check.Commentf("Output: %s", mountOut))
2009
+	assert.Assert(c, err == nil, check.Commentf("Output: %s", mountOut))
2010 2010
 	if !strings.Contains(string(mountOut), id) {
2011 2011
 		skipMountCheck = true
2012 2012
 	}
... ...
@@ -2031,7 +2031,7 @@ func (s *DockerDaemonSuite) TestCleanupMountsAfterDaemonCrash(c *testing.T) {
2031 2031
 	}
2032 2032
 	// Now, container mounts should be gone.
2033 2033
 	mountOut, err = ioutil.ReadFile("/proc/self/mountinfo")
2034
-	assert.Assert(c, err, checker.IsNil, check.Commentf("Output: %s", mountOut))
2034
+	assert.Assert(c, err == nil, check.Commentf("Output: %s", mountOut))
2035 2035
 	comment := check.Commentf("%s is still mounted from older daemon start:\nDaemon root repository %s\n%s", id, s.d.Root, mountOut)
2036 2036
 	assert.Equal(c, strings.Contains(string(mountOut), id), false, comment)
2037 2037
 }
... ...
@@ -2196,7 +2196,7 @@ func (s *DockerDaemonSuite) TestDaemonDiscoveryBackendConfigReload(c *testing.T)
2196 2196
 	// daemon config file
2197 2197
 	daemonConfig := `{ "debug" : false }`
2198 2198
 	configFile, err := ioutil.TempFile("", "test-daemon-discovery-backend-config-reload-config")
2199
-	assert.Assert(c, err, checker.IsNil, check.Commentf("could not create temp file for config reload"))
2199
+	assert.Assert(c, err == nil, check.Commentf("could not create temp file for config reload"))
2200 2200
 	configFilePath := configFile.Name()
2201 2201
 	defer func() {
2202 2202
 		configFile.Close()
... ...
@@ -2226,7 +2226,7 @@ func (s *DockerDaemonSuite) TestDaemonDiscoveryBackendConfigReload(c *testing.T)
2226 2226
 	assert.NilError(c, err)
2227 2227
 
2228 2228
 	err = s.d.ReloadConfig()
2229
-	assert.Assert(c, err, checker.IsNil, check.Commentf("error reloading daemon config"))
2229
+	assert.Assert(c, err == nil, check.Commentf("error reloading daemon config"))
2230 2230
 
2231 2231
 	out, err := s.d.Cmd("info")
2232 2232
 	assert.NilError(c, err)
... ...
@@ -2288,7 +2288,7 @@ func (s *DockerDaemonSuite) TestDaemonMaxConcurrencyWithConfigFile(c *testing.T)
2288 2288
 	fmt.Fprintf(configFile, "%s", daemonConfig)
2289 2289
 	configFile.Close()
2290 2290
 
2291
-	assert.Assert(c, s.d.Signal(unix.SIGHUP), checker.IsNil)
2291
+	assert.Assert(c, s.d.Signal(unix.SIGHUP) == nil)
2292 2292
 	// unix.Kill(s.d.cmd.Process.Pid, unix.SIGHUP)
2293 2293
 
2294 2294
 	time.Sleep(3 * time.Second)
... ...
@@ -2329,7 +2329,7 @@ func (s *DockerDaemonSuite) TestDaemonMaxConcurrencyWithConfigFileReload(c *test
2329 2329
 	fmt.Fprintf(configFile, "%s", daemonConfig)
2330 2330
 	configFile.Close()
2331 2331
 
2332
-	assert.Assert(c, s.d.Signal(unix.SIGHUP), checker.IsNil)
2332
+	assert.Assert(c, s.d.Signal(unix.SIGHUP) == nil)
2333 2333
 	// unix.Kill(s.d.cmd.Process.Pid, unix.SIGHUP)
2334 2334
 
2335 2335
 	time.Sleep(3 * time.Second)
... ...
@@ -2347,7 +2347,7 @@ func (s *DockerDaemonSuite) TestDaemonMaxConcurrencyWithConfigFileReload(c *test
2347 2347
 	fmt.Fprintf(configFile, "%s", daemonConfig)
2348 2348
 	configFile.Close()
2349 2349
 
2350
-	assert.Assert(c, s.d.Signal(unix.SIGHUP), checker.IsNil)
2350
+	assert.Assert(c, s.d.Signal(unix.SIGHUP) == nil)
2351 2351
 
2352 2352
 	time.Sleep(3 * time.Second)
2353 2353
 
... ...
@@ -2369,7 +2369,7 @@ func (s *DockerDaemonSuite) TestBuildOnDisabledBridgeNetworkDaemon(c *testing.T)
2369 2369
 		build.WithoutCache,
2370 2370
 	)
2371 2371
 	comment := check.Commentf("Failed to build image. output %s, exitCode %d, err %v", result.Combined(), result.ExitCode, result.Error)
2372
-	assert.Assert(c, result.Error, checker.IsNil, comment)
2372
+	assert.Assert(c, result.Error == nil, comment)
2373 2373
 	assert.Equal(c, result.ExitCode, 0, comment)
2374 2374
 }
2375 2375
 
... ...
@@ -2438,7 +2438,7 @@ func (s *DockerDaemonSuite) TestRunWithRuntimeFromConfigFile(c *testing.T) {
2438 2438
 }
2439 2439
 `
2440 2440
 	ioutil.WriteFile(configName, []byte(config), 0644)
2441
-	assert.Assert(c, s.d.Signal(unix.SIGHUP), checker.IsNil)
2441
+	assert.Assert(c, s.d.Signal(unix.SIGHUP) == nil)
2442 2442
 	// Give daemon time to reload config
2443 2443
 	<-time.After(1 * time.Second)
2444 2444
 
... ...
@@ -2467,7 +2467,7 @@ func (s *DockerDaemonSuite) TestRunWithRuntimeFromConfigFile(c *testing.T) {
2467 2467
 }
2468 2468
 `
2469 2469
 	ioutil.WriteFile(configName, []byte(config), 0644)
2470
-	assert.Assert(c, s.d.Signal(unix.SIGHUP), checker.IsNil)
2470
+	assert.Assert(c, s.d.Signal(unix.SIGHUP) == nil)
2471 2471
 	// Give daemon time to reload config
2472 2472
 	<-time.After(1 * time.Second)
2473 2473
 
... ...
@@ -2493,7 +2493,7 @@ func (s *DockerDaemonSuite) TestRunWithRuntimeFromConfigFile(c *testing.T) {
2493 2493
 }
2494 2494
 `
2495 2495
 	ioutil.WriteFile(configName, []byte(config), 0644)
2496
-	assert.Assert(c, s.d.Signal(unix.SIGHUP), checker.IsNil)
2496
+	assert.Assert(c, s.d.Signal(unix.SIGHUP) == nil)
2497 2497
 	// Give daemon time to reload config
2498 2498
 	<-time.After(1 * time.Second)
2499 2499
 
... ...
@@ -2570,10 +2570,10 @@ func (s *DockerDaemonSuite) TestDaemonRestartWithAutoRemoveContainer(c *testing.
2570 2570
 
2571 2571
 	// top1 will exist after daemon restarts
2572 2572
 	out, err := s.d.Cmd("run", "-d", "--name", "top1", "busybox:latest", "top")
2573
-	assert.Assert(c, err, checker.IsNil, check.Commentf("run top1: %v", out))
2573
+	assert.Assert(c, err == nil, check.Commentf("run top1: %v", out))
2574 2574
 	// top2 will be removed after daemon restarts
2575 2575
 	out, err = s.d.Cmd("run", "-d", "--rm", "--name", "top2", "busybox:latest", "top")
2576
-	assert.Assert(c, err, checker.IsNil, check.Commentf("run top2: %v", out))
2576
+	assert.Assert(c, err == nil, check.Commentf("run top2: %v", out))
2577 2577
 
2578 2578
 	out, err = s.d.Cmd("ps")
2579 2579
 	assert.NilError(c, err)
... ...
@@ -2668,7 +2668,7 @@ func (s *DockerDaemonSuite) TestDaemonShutdownTimeout(c *testing.T) {
2668 2668
 	_, err := s.d.Cmd("run", "-d", "busybox", "top")
2669 2669
 	assert.NilError(c, err)
2670 2670
 
2671
-	assert.Assert(c, s.d.Signal(unix.SIGINT), checker.IsNil)
2671
+	assert.Assert(c, s.d.Signal(unix.SIGINT) == nil)
2672 2672
 
2673 2673
 	select {
2674 2674
 	case <-s.d.Wait:
... ...
@@ -2702,7 +2702,7 @@ func (s *DockerDaemonSuite) TestDaemonShutdownTimeoutWithConfigFile(c *testing.T
2702 2702
 	fmt.Fprintf(configFile, "%s", daemonConfig)
2703 2703
 	configFile.Close()
2704 2704
 
2705
-	assert.Assert(c, s.d.Signal(unix.SIGHUP), checker.IsNil)
2705
+	assert.Assert(c, s.d.Signal(unix.SIGHUP) == nil)
2706 2706
 
2707 2707
 	select {
2708 2708
 	case <-s.d.Wait:
... ...
@@ -2727,17 +2727,17 @@ func (s *DockerDaemonSuite) TestExecWithUserAfterLiveRestore(c *testing.T) {
2727 2727
 
2728 2728
 	// Wait for shell command to be completed
2729 2729
 	_, err = s.d.Cmd("exec", "top", "sh", "-c", `for i in $(seq 1 5); do if [ -e /adduser_end ]; then rm -f /adduser_end && break; else sleep 1 && false; fi; done`)
2730
-	assert.Assert(c, err, checker.IsNil, check.Commentf("Timeout waiting for shell command to be completed"))
2730
+	assert.Assert(c, err == nil, check.Commentf("Timeout waiting for shell command to be completed"))
2731 2731
 
2732 2732
 	out1, err := s.d.Cmd("exec", "-u", "test", "top", "id")
2733 2733
 	// uid=100(test) gid=101(test) groups=101(test)
2734
-	assert.Assert(c, err, checker.IsNil, check.Commentf("Output: %s", out1))
2734
+	assert.Assert(c, err == nil, check.Commentf("Output: %s", out1))
2735 2735
 
2736 2736
 	// restart daemon.
2737 2737
 	s.d.Restart(c, "--live-restore")
2738 2738
 
2739 2739
 	out2, err := s.d.Cmd("exec", "-u", "test", "top", "id")
2740
-	assert.Assert(c, err, checker.IsNil, check.Commentf("Output: %s", out2))
2740
+	assert.Assert(c, err == nil, check.Commentf("Output: %s", out2))
2741 2741
 	assert.Equal(c, out2, out1, check.Commentf("Output: before restart '%s', after restart '%s'", out1, out2))
2742 2742
 
2743 2743
 	out, err = s.d.Cmd("stop", "top")
... ...
@@ -2790,7 +2790,7 @@ func (s *DockerDaemonSuite) TestRestartPolicyWithLiveRestore(c *testing.T) {
2790 2790
 		StartedAt time.Time
2791 2791
 	}
2792 2792
 	out, err = s.d.Cmd("inspect", "-f", "{{json .State}}", id)
2793
-	assert.Assert(c, err, checker.IsNil, check.Commentf("output: %s", out))
2793
+	assert.Assert(c, err == nil, check.Commentf("output: %s", out))
2794 2794
 
2795 2795
 	var origState state
2796 2796
 	err = json.Unmarshal([]byte(strings.TrimSpace(out)), &origState)
... ...
@@ -2816,7 +2816,7 @@ func (s *DockerDaemonSuite) TestRestartPolicyWithLiveRestore(c *testing.T) {
2816 2816
 		}
2817 2817
 
2818 2818
 		out, err := s.d.Cmd("inspect", "-f", "{{json .State}}", id)
2819
-		assert.Assert(c, err, checker.IsNil, check.Commentf("output: %s", out))
2819
+		assert.Assert(c, err == nil, check.Commentf("output: %s", out))
2820 2820
 
2821 2821
 		var newState state
2822 2822
 		err = json.Unmarshal([]byte(strings.TrimSpace(out)), &newState)
... ...
@@ -2855,13 +2855,13 @@ func (s *DockerDaemonSuite) TestShmSizeReload(c *testing.T) {
2855 2855
 	testRequires(c, DaemonIsLinux)
2856 2856
 
2857 2857
 	configPath, err := ioutil.TempDir("", "test-daemon-shm-size-reload-config")
2858
-	assert.Assert(c, err, checker.IsNil, check.Commentf("could not create temp file for config reload"))
2858
+	assert.Assert(c, err == nil, check.Commentf("could not create temp file for config reload"))
2859 2859
 	defer os.RemoveAll(configPath) // clean up
2860 2860
 	configFile := filepath.Join(configPath, "config.json")
2861 2861
 
2862 2862
 	size := 67108864 * 2
2863 2863
 	configData := []byte(fmt.Sprintf(`{"default-shm-size": "%dM"}`, size/1024/1024))
2864
-	assert.Assert(c, ioutil.WriteFile(configFile, configData, 0666), checker.IsNil, check.Commentf("could not write temp file for config reload"))
2864
+	assert.Assert(c, ioutil.WriteFile(configFile, configData, 0666) == nil, check.Commentf("could not write temp file for config reload"))
2865 2865
 	pattern := regexp.MustCompile(fmt.Sprintf("shm on /dev/shm type tmpfs(.*)size=%dk", size/1024))
2866 2866
 
2867 2867
 	s.d.StartWithBusybox(c, "--config-file", configFile)
... ...
@@ -2876,11 +2876,11 @@ func (s *DockerDaemonSuite) TestShmSizeReload(c *testing.T) {
2876 2876
 
2877 2877
 	size = 67108864 * 3
2878 2878
 	configData = []byte(fmt.Sprintf(`{"default-shm-size": "%dM"}`, size/1024/1024))
2879
-	assert.Assert(c, ioutil.WriteFile(configFile, configData, 0666), checker.IsNil, check.Commentf("could not write temp file for config reload"))
2879
+	assert.Assert(c, ioutil.WriteFile(configFile, configData, 0666) == nil, check.Commentf("could not write temp file for config reload"))
2880 2880
 	pattern = regexp.MustCompile(fmt.Sprintf("shm on /dev/shm type tmpfs(.*)size=%dk", size/1024))
2881 2881
 
2882 2882
 	err = s.d.ReloadConfig()
2883
-	assert.Assert(c, err, checker.IsNil, check.Commentf("error reloading daemon config"))
2883
+	assert.Assert(c, err == nil, check.Commentf("error reloading daemon config"))
2884 2884
 
2885 2885
 	name = "shm2"
2886 2886
 	out, err = s.d.Cmd("run", "--name", name, "busybox", "mount")
... ...
@@ -382,10 +382,10 @@ func (s *DockerExternalVolumeSuite) TestExternalVolumeDriverLookupNotBlocked(c *
382 382
 	cmd1 := exec.Command(dockerBinary, "volume", "create", "-d", "down-driver")
383 383
 	cmd2 := exec.Command(dockerBinary, "volume", "create")
384 384
 
385
-	assert.Assert(c, cmd1.Start(), checker.IsNil)
385
+	assert.Assert(c, cmd1.Start() == nil)
386 386
 	defer cmd1.Process.Kill()
387 387
 	time.Sleep(100 * time.Millisecond) // ensure API has been called
388
-	assert.Assert(c, cmd2.Start(), checker.IsNil)
388
+	assert.Assert(c, cmd2.Start() == nil)
389 389
 
390 390
 	go func() {
391 391
 		cmd1.Wait()
... ...
@@ -453,7 +453,7 @@ func (s *DockerExternalVolumeSuite) TestExternalVolumeDriverBindExternalVolume(c
453 453
 		Driver string
454 454
 	}
455 455
 	out := inspectFieldJSON(c, "testing", "Mounts")
456
-	assert.Assert(c, json.NewDecoder(strings.NewReader(out)).Decode(&mounts), checker.IsNil)
456
+	assert.Assert(c, json.NewDecoder(strings.NewReader(out)).Decode(&mounts) == nil)
457 457
 	assert.Equal(c, len(mounts), 1, check.Commentf("%s", out))
458 458
 	assert.Equal(c, mounts[0].Name, "foo")
459 459
 	assert.Equal(c, mounts[0].Driver, volumePluginName)
... ...
@@ -487,7 +487,7 @@ func (s *DockerExternalVolumeSuite) TestExternalVolumeDriverGet(c *testing.T) {
487 487
 	}
488 488
 	var st []vol
489 489
 
490
-	assert.Assert(c, json.Unmarshal([]byte(out), &st), checker.IsNil)
490
+	assert.Assert(c, json.Unmarshal([]byte(out), &st) == nil)
491 491
 	assert.Equal(c, len(st), 1)
492 492
 	assert.Equal(c, len(st[0].Status), 1, check.Commentf("%v", st[0]))
493 493
 	assert.Equal(c, st[0].Status["Hello"], "world", check.Commentf("%v", st[0].Status))
... ...
@@ -113,7 +113,7 @@ func (s *DockerSuite) TestHealth(c *testing.T) {
113 113
 
114 114
 	failsStr, _ := dockerCmd(c, "inspect", "--format={{.State.Health.FailingStreak}}", "fatal_healthcheck")
115 115
 	fails, err := strconv.Atoi(strings.TrimSpace(failsStr))
116
-	assert.Assert(c, err, checker.IsNil)
116
+	assert.Assert(c, err == nil)
117 117
 	assert.Equal(c, fails >= 3, true)
118 118
 	dockerCmd(c, "rm", "-f", "fatal_healthcheck")
119 119
 
... ...
@@ -97,7 +97,7 @@ func (s *DockerSuite) TestHistoryHumanOptionFalse(c *testing.T) {
97 97
 		sizeString := lines[i][startIndex:endIndex]
98 98
 
99 99
 		_, err := strconv.Atoi(strings.TrimSpace(sizeString))
100
-		assert.Assert(c, err, checker.IsNil, check.Commentf("The size '%s' was not an Integer", sizeString))
100
+		assert.Assert(c, err == nil, check.Commentf("The size '%s' was not an Integer", sizeString))
101 101
 	}
102 102
 }
103 103
 
... ...
@@ -50,7 +50,7 @@ func (s *DockerSuite) TestImportFile(c *testing.T) {
50 50
 	dockerCmd(c, "run", "--name", "test-import", "busybox", "true")
51 51
 
52 52
 	temporaryFile, err := ioutil.TempFile("", "exportImportTest")
53
-	assert.Assert(c, err, checker.IsNil, check.Commentf("failed to create temporary file"))
53
+	assert.Assert(c, err == nil, check.Commentf("failed to create temporary file"))
54 54
 	defer os.Remove(temporaryFile.Name())
55 55
 
56 56
 	icmd.RunCmd(icmd.Cmd{
... ...
@@ -71,7 +71,7 @@ func (s *DockerSuite) TestImportGzipped(c *testing.T) {
71 71
 	dockerCmd(c, "run", "--name", "test-import", "busybox", "true")
72 72
 
73 73
 	temporaryFile, err := ioutil.TempFile("", "exportImportTest")
74
-	assert.Assert(c, err, checker.IsNil, check.Commentf("failed to create temporary file"))
74
+	assert.Assert(c, err == nil, check.Commentf("failed to create temporary file"))
75 75
 	defer os.Remove(temporaryFile.Name())
76 76
 
77 77
 	w := gzip.NewWriter(temporaryFile)
... ...
@@ -79,7 +79,7 @@ func (s *DockerSuite) TestImportGzipped(c *testing.T) {
79 79
 		Command: []string{dockerBinary, "export", "test-import"},
80 80
 		Stdout:  w,
81 81
 	}).Assert(c, icmd.Success)
82
-	assert.Assert(c, w.Close(), checker.IsNil, check.Commentf("failed to close gzip writer"))
82
+	assert.Assert(c, w.Close() == nil, check.Commentf("failed to close gzip writer"))
83 83
 	temporaryFile.Close()
84 84
 	out, _ := dockerCmd(c, "import", temporaryFile.Name())
85 85
 	assert.Assert(c, strings.Count(out, "\n") == 1, "display is expected 1 '\\n' but didn't")
... ...
@@ -94,7 +94,7 @@ func (s *DockerSuite) TestImportFileWithMessage(c *testing.T) {
94 94
 	dockerCmd(c, "run", "--name", "test-import", "busybox", "true")
95 95
 
96 96
 	temporaryFile, err := ioutil.TempFile("", "exportImportTest")
97
-	assert.Assert(c, err, checker.IsNil, check.Commentf("failed to create temporary file"))
97
+	assert.Assert(c, err == nil, check.Commentf("failed to create temporary file"))
98 98
 	defer os.Remove(temporaryFile.Name())
99 99
 
100 100
 	icmd.RunCmd(icmd.Cmd{
... ...
@@ -130,7 +130,7 @@ func (s *DockerSuite) TestImportWithQuotedChanges(c *testing.T) {
130 130
 	cli.DockerCmd(c, "run", "--name", "test-import", "busybox", "true")
131 131
 
132 132
 	temporaryFile, err := ioutil.TempFile("", "exportImportTest")
133
-	assert.Assert(c, err, checker.IsNil, check.Commentf("failed to create temporary file"))
133
+	assert.Assert(c, err == nil, check.Commentf("failed to create temporary file"))
134 134
 	defer os.Remove(temporaryFile.Name())
135 135
 
136 136
 	cli.Docker(cli.Args("export", "test-import"), cli.WithStdout(bufio.NewWriter(temporaryFile))).Assert(c, icmd.Success)
... ...
@@ -130,7 +130,7 @@ func (s *DockerSuite) TestInspectImageFilterInt(c *testing.T) {
130 130
 	out := inspectField(c, imageTest, "Size")
131 131
 
132 132
 	size, err := strconv.Atoi(out)
133
-	assert.Assert(c, err, checker.IsNil, check.Commentf("failed to inspect size of the image: %s, %v", out, err))
133
+	assert.Assert(c, err == nil, check.Commentf("failed to inspect size of the image: %s, %v", out, err))
134 134
 
135 135
 	//now see if the size turns out to be the same
136 136
 	formatStr := fmt.Sprintf("--format={{eq .Size %d}}", size)
... ...
@@ -152,7 +152,7 @@ func (s *DockerSuite) TestInspectContainerFilterInt(c *testing.T) {
152 152
 	out = inspectField(c, id, "State.ExitCode")
153 153
 
154 154
 	exitCode, err := strconv.Atoi(out)
155
-	assert.Assert(c, err, checker.IsNil, check.Commentf("failed to inspect exitcode of the container: %s, %v", out, err))
155
+	assert.Assert(c, err == nil, check.Commentf("failed to inspect exitcode of the container: %s, %v", out, err))
156 156
 
157 157
 	//now get the exit code to verify
158 158
 	formatStr := fmt.Sprintf("--format={{eq .State.ExitCode %d}}", exitCode)
... ...
@@ -172,12 +172,12 @@ func (s *DockerSuite) TestInspectImageGraphDriver(c *testing.T) {
172 172
 	deviceID := inspectField(c, imageTest, "GraphDriver.Data.DeviceId")
173 173
 
174 174
 	_, err := strconv.Atoi(deviceID)
175
-	assert.Assert(c, err, checker.IsNil, check.Commentf("failed to inspect DeviceId of the image: %s, %v", deviceID, err))
175
+	assert.Assert(c, err == nil, check.Commentf("failed to inspect DeviceId of the image: %s, %v", deviceID, err))
176 176
 
177 177
 	deviceSize := inspectField(c, imageTest, "GraphDriver.Data.DeviceSize")
178 178
 
179 179
 	_, err = strconv.ParseUint(deviceSize, 10, 64)
180
-	assert.Assert(c, err, checker.IsNil, check.Commentf("failed to inspect DeviceSize of the image: %s, %v", deviceSize, err))
180
+	assert.Assert(c, err == nil, check.Commentf("failed to inspect DeviceSize of the image: %s, %v", deviceSize, err))
181 181
 }
182 182
 
183 183
 func (s *DockerSuite) TestInspectContainerGraphDriver(c *testing.T) {
... ...
@@ -197,12 +197,12 @@ func (s *DockerSuite) TestInspectContainerGraphDriver(c *testing.T) {
197 197
 	assert.Assert(c, imageDeviceID != deviceID)
198 198
 
199 199
 	_, err := strconv.Atoi(deviceID)
200
-	assert.Assert(c, err, checker.IsNil, check.Commentf("failed to inspect DeviceId of the image: %s, %v", deviceID, err))
200
+	assert.Assert(c, err == nil, check.Commentf("failed to inspect DeviceId of the image: %s, %v", deviceID, err))
201 201
 
202 202
 	deviceSize := inspectField(c, out, "GraphDriver.Data.DeviceSize")
203 203
 
204 204
 	_, err = strconv.ParseUint(deviceSize, 10, 64)
205
-	assert.Assert(c, err, checker.IsNil, check.Commentf("failed to inspect DeviceSize of the image: %s, %v", deviceSize, err))
205
+	assert.Assert(c, err == nil, check.Commentf("failed to inspect DeviceSize of the image: %s, %v", deviceSize, err))
206 206
 }
207 207
 
208 208
 func (s *DockerSuite) TestInspectBindMountPoint(c *testing.T) {
... ...
@@ -289,7 +289,7 @@ func (s *DockerSuite) TestInspectLogConfigNoType(c *testing.T) {
289 289
 	out := inspectFieldJSON(c, "test", "HostConfig.LogConfig")
290 290
 
291 291
 	err := json.NewDecoder(strings.NewReader(out)).Decode(&logConfig)
292
-	assert.Assert(c, err, checker.IsNil, check.Commentf("%v", out))
292
+	assert.Assert(c, err == nil, check.Commentf("%v", out))
293 293
 
294 294
 	assert.Equal(c, logConfig.Type, "json-file")
295 295
 	assert.Equal(c, logConfig.Config["max-file"], "42", check.Commentf("%v", logConfig))
... ...
@@ -148,7 +148,7 @@ func (s *DockerSuite) TestLinksHostsFilesInject(c *testing.T) {
148 148
 	out, _ = dockerCmd(c, "run", "-itd", "--name", "two", "--link", "one:onetwo", "busybox", "top")
149 149
 	idTwo := strings.TrimSpace(out)
150 150
 
151
-	assert.Assert(c, waitRun(idTwo), checker.IsNil)
151
+	assert.Assert(c, waitRun(idTwo) == nil)
152 152
 
153 153
 	readContainerFileWithExec(c, idOne, "/etc/hosts")
154 154
 	contentTwo := readContainerFileWithExec(c, idTwo, "/etc/hosts")
... ...
@@ -203,12 +203,12 @@ func (s *DockerSuite) TestLinkShortDefinition(c *testing.T) {
203 203
 	out, _ := dockerCmd(c, "run", "-d", "--name", "shortlinkdef", "busybox", "top")
204 204
 
205 205
 	cid := strings.TrimSpace(out)
206
-	assert.Assert(c, waitRun(cid), checker.IsNil)
206
+	assert.Assert(c, waitRun(cid) == nil)
207 207
 
208 208
 	out, _ = dockerCmd(c, "run", "-d", "--name", "link2", "--link", "shortlinkdef", "busybox", "top")
209 209
 
210 210
 	cid2 := strings.TrimSpace(out)
211
-	assert.Assert(c, waitRun(cid2), checker.IsNil)
211
+	assert.Assert(c, waitRun(cid2) == nil)
212 212
 
213 213
 	links := inspectFieldJSON(c, cid2, "HostConfig.Links")
214 214
 	assert.Equal(c, links, "[\"/shortlinkdef:/link2/shortlinkdef\"]")
... ...
@@ -505,7 +505,7 @@ func (s *DockerSuite) TestDockerInspectNetworkWithContainerName(c *testing.T) {
505 505
 	}()
506 506
 
507 507
 	out, _ := dockerCmd(c, "run", "-d", "--name", "testNetInspect1", "--net", "brNetForInspect", "busybox", "top")
508
-	assert.Assert(c, waitRun("testNetInspect1"), checker.IsNil)
508
+	assert.Assert(c, waitRun("testNetInspect1") == nil)
509 509
 	containerID := strings.TrimSpace(out)
510 510
 	defer func() {
511 511
 		// we don't stop container by name, because we'll rename it later
... ...
@@ -546,7 +546,7 @@ func (s *DockerNetworkSuite) TestDockerNetworkConnectDisconnect(c *testing.T) {
546 546
 
547 547
 	// run a container
548 548
 	out, _ := dockerCmd(c, "run", "-d", "--name", "test", "busybox", "top")
549
-	assert.Assert(c, waitRun("test"), checker.IsNil)
549
+	assert.Assert(c, waitRun("test") == nil)
550 550
 	containerID := strings.TrimSpace(out)
551 551
 
552 552
 	// connect the container to the test network
... ...
@@ -570,7 +570,7 @@ func (s *DockerNetworkSuite) TestDockerNetworkConnectDisconnect(c *testing.T) {
570 570
 
571 571
 	// run another container
572 572
 	out, _ = dockerCmd(c, "run", "-d", "--net", "test", "--name", "test2", "busybox", "top")
573
-	assert.Assert(c, waitRun("test2"), checker.IsNil)
573
+	assert.Assert(c, waitRun("test2") == nil)
574 574
 	containerID = strings.TrimSpace(out)
575 575
 
576 576
 	nr = getNwResource(c, "test")
... ...
@@ -974,7 +974,7 @@ func (s *DockerNetworkSuite) TestDockerNetworkDriverUngracefulRestart(c *testing
974 974
 	assert.NilError(c, err)
975 975
 
976 976
 	// Kill daemon and restart
977
-	assert.Assert(c, s.d.Kill(), checker.IsNil)
977
+	assert.Assert(c, s.d.Kill() == nil)
978 978
 
979 979
 	server.Close()
980 980
 
... ...
@@ -1094,7 +1094,7 @@ func (s *DockerNetworkSuite) TestDockerNetworkMultipleNetworksUngracefulDaemonRe
1094 1094
 	verifyContainerIsConnectedToNetworks(c, s.d, cName, nwList)
1095 1095
 
1096 1096
 	// Kill daemon and restart
1097
-	assert.Assert(c, s.d.Kill(), checker.IsNil)
1097
+	assert.Assert(c, s.d.Kill() == nil)
1098 1098
 	s.d.Restart(c)
1099 1099
 
1100 1100
 	// Restart container
... ...
@@ -1107,7 +1107,7 @@ func (s *DockerNetworkSuite) TestDockerNetworkMultipleNetworksUngracefulDaemonRe
1107 1107
 func (s *DockerNetworkSuite) TestDockerNetworkRunNetByID(c *testing.T) {
1108 1108
 	out, _ := dockerCmd(c, "network", "create", "one")
1109 1109
 	containerOut, _, err := dockerCmdWithError("run", "-d", "--net", strings.TrimSpace(out), "busybox", "top")
1110
-	assert.Assert(c, err, checker.IsNil, check.Commentf(containerOut))
1110
+	assert.Assert(c, err == nil, check.Commentf(containerOut))
1111 1111
 }
1112 1112
 
1113 1113
 func (s *DockerNetworkSuite) TestDockerNetworkHostModeUngracefulDaemonRestart(c *testing.T) {
... ...
@@ -1126,7 +1126,7 @@ func (s *DockerNetworkSuite) TestDockerNetworkHostModeUngracefulDaemonRestart(c
1126 1126
 	}
1127 1127
 
1128 1128
 	// Kill daemon ungracefully and restart
1129
-	assert.Assert(c, s.d.Kill(), checker.IsNil)
1129
+	assert.Assert(c, s.d.Kill() == nil)
1130 1130
 	s.d.Restart(c)
1131 1131
 
1132 1132
 	// make sure all the containers are up and running
... ...
@@ -1138,7 +1138,7 @@ func (s *DockerNetworkSuite) TestDockerNetworkHostModeUngracefulDaemonRestart(c
1138 1138
 
1139 1139
 func (s *DockerNetworkSuite) TestDockerNetworkConnectToHostFromOtherNetwork(c *testing.T) {
1140 1140
 	dockerCmd(c, "run", "-d", "--name", "container1", "busybox", "top")
1141
-	assert.Assert(c, waitRun("container1"), checker.IsNil)
1141
+	assert.Assert(c, waitRun("container1") == nil)
1142 1142
 	dockerCmd(c, "network", "disconnect", "bridge", "container1")
1143 1143
 	out, _, err := dockerCmdWithError("network", "connect", "host", "container1")
1144 1144
 	assert.ErrorContains(c, err, "", out)
... ...
@@ -1147,7 +1147,7 @@ func (s *DockerNetworkSuite) TestDockerNetworkConnectToHostFromOtherNetwork(c *t
1147 1147
 
1148 1148
 func (s *DockerNetworkSuite) TestDockerNetworkDisconnectFromHost(c *testing.T) {
1149 1149
 	dockerCmd(c, "run", "-d", "--name", "container1", "--net=host", "busybox", "top")
1150
-	assert.Assert(c, waitRun("container1"), checker.IsNil)
1150
+	assert.Assert(c, waitRun("container1") == nil)
1151 1151
 	out, _, err := dockerCmdWithError("network", "disconnect", "host", "container1")
1152 1152
 	assert.Assert(c, err, checker.NotNil, check.Commentf("Should err out disconnect from host"))
1153 1153
 	assert.Assert(c, out, checker.Contains, runconfig.ErrConflictHostNetwork.Error())
... ...
@@ -1157,7 +1157,7 @@ func (s *DockerNetworkSuite) TestDockerNetworkConnectWithPortMapping(c *testing.
1157 1157
 	testRequires(c, NotArm)
1158 1158
 	dockerCmd(c, "network", "create", "test1")
1159 1159
 	dockerCmd(c, "run", "-d", "--name", "c1", "-p", "5000:5000", "busybox", "top")
1160
-	assert.Assert(c, waitRun("c1"), checker.IsNil)
1160
+	assert.Assert(c, waitRun("c1") == nil)
1161 1161
 	dockerCmd(c, "network", "connect", "test1", "c1")
1162 1162
 }
1163 1163
 
... ...
@@ -1181,7 +1181,7 @@ func (s *DockerNetworkSuite) TestDockerNetworkConnectDisconnectWithPortMapping(c
1181 1181
 	dockerCmd(c, "network", "create", "ccc")
1182 1182
 
1183 1183
 	dockerCmd(c, "run", "-d", "--name", cnt, "-p", "9000:90", "-p", "70", "busybox", "top")
1184
-	assert.Assert(c, waitRun(cnt), checker.IsNil)
1184
+	assert.Assert(c, waitRun(cnt) == nil)
1185 1185
 	curPortMap, _ := dockerCmd(c, "port", cnt, "70")
1186 1186
 	curExplPortMap, _ := dockerCmd(c, "port", cnt, "90")
1187 1187
 
... ...
@@ -1211,7 +1211,7 @@ func (s *DockerNetworkSuite) TestDockerNetworkConnectWithMac(c *testing.T) {
1211 1211
 	macAddress := "02:42:ac:11:00:02"
1212 1212
 	dockerCmd(c, "network", "create", "mynetwork")
1213 1213
 	dockerCmd(c, "run", "--name=test", "-d", "--mac-address", macAddress, "busybox", "top")
1214
-	assert.Assert(c, waitRun("test"), checker.IsNil)
1214
+	assert.Assert(c, waitRun("test") == nil)
1215 1215
 	mac1 := inspectField(c, "test", "NetworkSettings.Networks.bridge.MacAddress")
1216 1216
 	assert.Equal(c, strings.TrimSpace(mac1), macAddress)
1217 1217
 	dockerCmd(c, "network", "connect", "mynetwork", "test")
... ...
@@ -1228,7 +1228,7 @@ func (s *DockerNetworkSuite) TestDockerNetworkInspectCreatedContainer(c *testing
1228 1228
 func (s *DockerNetworkSuite) TestDockerNetworkRestartWithMultipleNetworks(c *testing.T) {
1229 1229
 	dockerCmd(c, "network", "create", "test")
1230 1230
 	dockerCmd(c, "run", "--name=foo", "-d", "busybox", "top")
1231
-	assert.Assert(c, waitRun("foo"), checker.IsNil)
1231
+	assert.Assert(c, waitRun("foo") == nil)
1232 1232
 	dockerCmd(c, "network", "connect", "test", "foo")
1233 1233
 	dockerCmd(c, "restart", "foo")
1234 1234
 	networks := inspectField(c, "foo", "NetworkSettings.Networks")
... ...
@@ -1251,7 +1251,7 @@ func (s *DockerNetworkSuite) TestDockerNetworkConnectDisconnectToStoppedContaine
1251 1251
 
1252 1252
 	// start the container and test if we can ping it from another container in the same network
1253 1253
 	dockerCmd(c, "start", "foo")
1254
-	assert.Assert(c, waitRun("foo"), checker.IsNil)
1254
+	assert.Assert(c, waitRun("foo") == nil)
1255 1255
 	ip := inspectField(c, "foo", "NetworkSettings.Networks.test.IPAddress")
1256 1256
 	ip = strings.TrimSpace(ip)
1257 1257
 	dockerCmd(c, "run", "--net=test", "busybox", "sh", "-c", fmt.Sprintf("ping -c 1 %s", ip))
... ...
@@ -1296,7 +1296,7 @@ func (s *DockerNetworkSuite) TestDockerNetworkConnectPreferredIP(c *testing.T) {
1296 1296
 
1297 1297
 	// run a container on first network specifying the ip addresses
1298 1298
 	dockerCmd(c, "run", "-d", "--name", "c0", "--net=n0", "--ip", "172.28.99.88", "--ip6", "2001:db8:1234::9988", "busybox", "top")
1299
-	assert.Assert(c, waitRun("c0"), checker.IsNil)
1299
+	assert.Assert(c, waitRun("c0") == nil)
1300 1300
 	verifyIPAddressConfig(c, "c0", "n0", "172.28.99.88", "2001:db8:1234::9988")
1301 1301
 	verifyIPAddresses(c, "c0", "n0", "172.28.99.88", "2001:db8:1234::9988")
1302 1302
 
... ...
@@ -1336,7 +1336,7 @@ func (s *DockerNetworkSuite) TestDockerNetworkConnectPreferredIPStoppedContainer
1336 1336
 
1337 1337
 	// start the container, verify config has not changed and ip addresses are assigned
1338 1338
 	dockerCmd(c, "start", "c0")
1339
-	assert.Assert(c, waitRun("c0"), checker.IsNil)
1339
+	assert.Assert(c, waitRun("c0") == nil)
1340 1340
 	verifyIPAddressConfig(c, "c0", "n0", "172.30.55.44", "2001:db8:abcd::5544")
1341 1341
 	verifyIPAddresses(c, "c0", "n0", "172.30.55.44", "2001:db8:abcd::5544")
1342 1342
 
... ...
@@ -1406,13 +1406,13 @@ func (s *DockerNetworkSuite) TestDockerNetworkConnectLinkLocalIP(c *testing.T) {
1406 1406
 
1407 1407
 	// run two containers with link-local ip on the test network
1408 1408
 	dockerCmd(c, "run", "-d", "--name", "c0", "--net=n0", "--link-local-ip", "169.254.7.7", "--link-local-ip", "fe80::254:77", "busybox", "top")
1409
-	assert.Assert(c, waitRun("c0"), checker.IsNil)
1409
+	assert.Assert(c, waitRun("c0") == nil)
1410 1410
 	dockerCmd(c, "run", "-d", "--name", "c1", "--net=n0", "--link-local-ip", "169.254.8.8", "--link-local-ip", "fe80::254:88", "busybox", "top")
1411
-	assert.Assert(c, waitRun("c1"), checker.IsNil)
1411
+	assert.Assert(c, waitRun("c1") == nil)
1412 1412
 
1413 1413
 	// run a container on the default network and connect it to the test network specifying a link-local address
1414 1414
 	dockerCmd(c, "run", "-d", "--name", "c2", "busybox", "top")
1415
-	assert.Assert(c, waitRun("c2"), checker.IsNil)
1415
+	assert.Assert(c, waitRun("c2") == nil)
1416 1416
 	dockerCmd(c, "network", "connect", "--link-local-ip", "169.254.9.9", "n0", "c2")
1417 1417
 
1418 1418
 	// verify the three containers can ping each other via the link-local addresses
... ...
@@ -1446,13 +1446,13 @@ func (s *DockerSuite) TestUserDefinedNetworkConnectDisconnectLink(c *testing.T)
1446 1446
 	dockerCmd(c, "network", "create", "-d", "bridge", "foo2")
1447 1447
 
1448 1448
 	dockerCmd(c, "run", "-d", "--net=foo1", "--name=first", "busybox", "top")
1449
-	assert.Assert(c, waitRun("first"), checker.IsNil)
1449
+	assert.Assert(c, waitRun("first") == nil)
1450 1450
 
1451 1451
 	// run a container in a user-defined network with a link for an existing container
1452 1452
 	// and a link for a container that doesn't exist
1453 1453
 	dockerCmd(c, "run", "-d", "--net=foo1", "--name=second", "--link=first:FirstInFoo1",
1454 1454
 		"--link=third:bar", "busybox", "top")
1455
-	assert.Assert(c, waitRun("second"), checker.IsNil)
1455
+	assert.Assert(c, waitRun("second") == nil)
1456 1456
 
1457 1457
 	// ping to first and its alias FirstInFoo1 must succeed
1458 1458
 	_, _, err := dockerCmdWithError("exec", "second", "ping", "-c", "1", "first")
... ...
@@ -1494,7 +1494,7 @@ func (s *DockerNetworkSuite) TestDockerNetworkDisconnectDefault(c *testing.T) {
1494 1494
 	dockerCmd(c, "network", "disconnect", "bridge", containerName)
1495 1495
 
1496 1496
 	dockerCmd(c, "start", containerName)
1497
-	assert.Assert(c, waitRun(containerName), checker.IsNil)
1497
+	assert.Assert(c, waitRun(containerName) == nil)
1498 1498
 	networks := inspectField(c, containerName, "NetworkSettings.Networks")
1499 1499
 	assert.Assert(c, networks, checker.Contains, netWorkName1, check.Commentf(fmt.Sprintf("Should contain '%s' network", netWorkName1)))
1500 1500
 	assert.Assert(c, networks, checker.Contains, netWorkName2, check.Commentf(fmt.Sprintf("Should contain '%s' network", netWorkName2)))
... ...
@@ -1520,10 +1520,10 @@ func (s *DockerSuite) TestUserDefinedNetworkConnectDisconnectAlias(c *testing.T)
1520 1520
 	dockerCmd(c, "network", "create", "-d", "bridge", "net2")
1521 1521
 
1522 1522
 	cid, _ := dockerCmd(c, "run", "-d", "--net=net1", "--name=first", "--net-alias=foo", "busybox:glibc", "top")
1523
-	assert.Assert(c, waitRun("first"), checker.IsNil)
1523
+	assert.Assert(c, waitRun("first") == nil)
1524 1524
 
1525 1525
 	dockerCmd(c, "run", "-d", "--net=net1", "--name=second", "busybox:glibc", "top")
1526
-	assert.Assert(c, waitRun("second"), checker.IsNil)
1526
+	assert.Assert(c, waitRun("second") == nil)
1527 1527
 
1528 1528
 	// ping first container and its alias
1529 1529
 	_, _, err := dockerCmdWithError("exec", "second", "ping", "-c", "1", "first")
... ...
@@ -1574,10 +1574,10 @@ func (s *DockerSuite) TestUserDefinedNetworkConnectivity(c *testing.T) {
1574 1574
 	dockerCmd(c, "network", "create", "-d", "bridge", "br.net1")
1575 1575
 
1576 1576
 	dockerCmd(c, "run", "-d", "--net=br.net1", "--name=c1.net1", "busybox:glibc", "top")
1577
-	assert.Assert(c, waitRun("c1.net1"), checker.IsNil)
1577
+	assert.Assert(c, waitRun("c1.net1") == nil)
1578 1578
 
1579 1579
 	dockerCmd(c, "run", "-d", "--net=br.net1", "--name=c2.net1", "busybox:glibc", "top")
1580
-	assert.Assert(c, waitRun("c2.net1"), checker.IsNil)
1580
+	assert.Assert(c, waitRun("c2.net1") == nil)
1581 1581
 
1582 1582
 	// ping first container by its unqualified name
1583 1583
 	_, _, err := dockerCmdWithError("exec", "c2.net1", "ping", "-c", "1", "c1.net1")
... ...
@@ -1602,7 +1602,7 @@ func (s *DockerSuite) TestEmbeddedDNSInvalidInput(c *testing.T) {
1602 1602
 
1603 1603
 func (s *DockerSuite) TestDockerNetworkConnectFailsNoInspectChange(c *testing.T) {
1604 1604
 	dockerCmd(c, "run", "-d", "--name=bb", "busybox", "top")
1605
-	assert.Assert(c, waitRun("bb"), checker.IsNil)
1605
+	assert.Assert(c, waitRun("bb") == nil)
1606 1606
 	defer dockerCmd(c, "stop", "bb")
1607 1607
 
1608 1608
 	ns0 := inspectField(c, "bb", "NetworkSettings.Networks.bridge")
... ...
@@ -1622,9 +1622,9 @@ func (s *DockerSuite) TestDockerNetworkInternalMode(c *testing.T) {
1622 1622
 	assert.Assert(c, nr.Internal, checker.True)
1623 1623
 
1624 1624
 	dockerCmd(c, "run", "-d", "--net=internal", "--name=first", "busybox:glibc", "top")
1625
-	assert.Assert(c, waitRun("first"), checker.IsNil)
1625
+	assert.Assert(c, waitRun("first") == nil)
1626 1626
 	dockerCmd(c, "run", "-d", "--net=internal", "--name=second", "busybox:glibc", "top")
1627
-	assert.Assert(c, waitRun("second"), checker.IsNil)
1627
+	assert.Assert(c, waitRun("second") == nil)
1628 1628
 	out, _, err := dockerCmdWithError("exec", "first", "ping", "-W", "4", "-c", "1", "8.8.8.8")
1629 1629
 	assert.ErrorContains(c, err, "")
1630 1630
 	assert.Assert(c, out, checker.Contains, "100% packet loss")
... ...
@@ -1733,7 +1733,7 @@ func (s *DockerNetworkSuite) TestDockerNetworkValidateIP(c *testing.T) {
1733 1733
 
1734 1734
 	_, _, err = dockerCmdWithError("run", "-d", "--name", "mynet0", "--net=mynet", "--ip", "172.28.99.88", "--ip6", "2001:db8:1234::9988", "busybox", "top")
1735 1735
 	assert.NilError(c, err)
1736
-	assert.Assert(c, waitRun("mynet0"), checker.IsNil)
1736
+	assert.Assert(c, waitRun("mynet0") == nil)
1737 1737
 	verifyIPAddressConfig(c, "mynet0", "mynet", "172.28.99.88", "2001:db8:1234::9988")
1738 1738
 	verifyIPAddresses(c, "mynet0", "mynet", "172.28.99.88", "2001:db8:1234::9988")
1739 1739
 
... ...
@@ -180,7 +180,7 @@ func (ps *DockerPluginSuite) TestPluginSet(c *testing.T) {
180 180
 			{Name: "pdev2", Settable: []string{"path"}}, // Device without Path is invalid.
181 181
 		}
182 182
 	})
183
-	assert.Assert(c, err, checker.IsNil, check.Commentf("failed to create test plugin"))
183
+	assert.Assert(c, err == nil, check.Commentf("failed to create test plugin"))
184 184
 
185 185
 	env, _ := dockerCmd(c, "plugin", "inspect", "-f", "{{.Settings.Env}}", name)
186 186
 	assert.Equal(c, strings.TrimSpace(env), "[DEBUG=0]")
... ...
@@ -363,7 +363,7 @@ func (ps *DockerPluginSuite) TestPluginIDPrefix(c *testing.T) {
363 363
 	})
364 364
 	cancel()
365 365
 
366
-	assert.Assert(c, err, checker.IsNil, check.Commentf("failed to create test plugin"))
366
+	assert.Assert(c, err == nil, check.Commentf("failed to create test plugin"))
367 367
 
368 368
 	// Find ID first
369 369
 	id, _, err := dockerCmdWithError("plugin", "inspect", "-f", "{{.Id}}", name)
... ...
@@ -425,7 +425,7 @@ func (ps *DockerPluginSuite) TestPluginListDefaultFormat(c *testing.T) {
425 425
 	err = plugin.Create(ctx, client, name, func(cfg *plugin.Config) {
426 426
 		cfg.Description = "test plugin"
427 427
 	})
428
-	assert.Assert(c, err, checker.IsNil, check.Commentf("failed to create test plugin"))
428
+	assert.Assert(c, err == nil, check.Commentf("failed to create test plugin"))
429 429
 
430 430
 	out, _ := dockerCmd(c, "plugin", "inspect", "--format", "{{.ID}}", name)
431 431
 	id := strings.TrimSpace(out)
... ...
@@ -480,7 +480,7 @@ func (s *DockerSuite) TestPluginMetricsCollector(c *testing.T) {
480 480
 
481 481
 	name := "cpuguy83/docker-metrics-plugin-test:latest"
482 482
 	r := cli.Docker(cli.Args("plugin", "install", "--grant-all-permissions", name), cli.Daemon(d))
483
-	assert.Assert(c, r.Error, checker.IsNil, check.Commentf(r.Combined()))
483
+	assert.Assert(c, r.Error == nil, check.Commentf(r.Combined()))
484 484
 
485 485
 	// plugin lisens on localhost:19393 and proxies the metrics
486 486
 	resp, err := http.Get("http://localhost:19393/metrics")
... ...
@@ -314,7 +314,7 @@ func (s *DockerSuite) TestPortExposeHostBinding(c *testing.T) {
314 314
 	out, _ = dockerCmd(c, "port", firstID, "80")
315 315
 
316 316
 	_, exposedPort, err := net.SplitHostPort(out)
317
-	assert.Assert(c, err, checker.IsNil, check.Commentf("out: %s", out))
317
+	assert.Assert(c, err == nil, check.Commentf("out: %s", out))
318 318
 
319 319
 	dockerCmd(c, "run", "--net=host", "busybox",
320 320
 		"nc", "localhost", strings.TrimSpace(exposedPort))
... ...
@@ -335,7 +335,7 @@ func (s *DockerSuite) TestPortBindingOnSandbox(c *testing.T) {
335 335
 
336 336
 	dockerCmd(c, "run", "--net", "internal-net", "-d", "--name", "c1",
337 337
 		"-p", "8080:8080", "busybox", "nc", "-l", "-p", "8080")
338
-	assert.Assert(c, waitRun("c1"), checker.IsNil)
338
+	assert.Assert(c, waitRun("c1") == nil)
339 339
 
340 340
 	_, _, err := dockerCmdWithError("run", "--net=host", "busybox", "nc", "localhost", "8080")
341 341
 	assert.Assert(c, err, checker.NotNil, check.Commentf("Port mapping on internal network is expected to fail"))
... ...
@@ -344,5 +344,5 @@ func (s *DockerSuite) TestPortBindingOnSandbox(c *testing.T) {
344 344
 	dockerCmd(c, "network", "connect", "foo-net", "c1")
345 345
 
346 346
 	_, _, err = dockerCmdWithError("run", "--net=host", "busybox", "nc", "localhost", "8080")
347
-	assert.Assert(c, err, checker.IsNil, check.Commentf("Port mapping on the new network is expected to succeed"))
347
+	assert.Assert(c, err == nil, check.Commentf("Port mapping on the new network is expected to succeed"))
348 348
 }
... ...
@@ -35,13 +35,13 @@ func (s *DockerSuite) TestPsListContainersBase(c *testing.T) {
35 35
 	fourthID := strings.TrimSpace(out)
36 36
 
37 37
 	// make sure the second is running
38
-	assert.Assert(c, waitRun(secondID), checker.IsNil)
38
+	assert.Assert(c, waitRun(secondID) == nil)
39 39
 
40 40
 	// make sure third one is not running
41 41
 	dockerCmd(c, "wait", thirdID)
42 42
 
43 43
 	// make sure the forth is running
44
-	assert.Assert(c, waitRun(fourthID), checker.IsNil)
44
+	assert.Assert(c, waitRun(fourthID) == nil)
45 45
 
46 46
 	// all
47 47
 	out, _ = dockerCmd(c, "ps", "-a")
... ...
@@ -593,7 +593,7 @@ func (s *DockerSuite) TestPsImageIDAfterUpdate(c *testing.T) {
593 593
 func (s *DockerSuite) TestPsNotShowPortsOfStoppedContainer(c *testing.T) {
594 594
 	testRequires(c, DaemonIsLinux)
595 595
 	dockerCmd(c, "run", "--name=foo", "-d", "-p", "5000:5000", "busybox", "top")
596
-	assert.Assert(c, waitRun("foo"), checker.IsNil)
596
+	assert.Assert(c, waitRun("foo") == nil)
597 597
 	out, _ := dockerCmd(c, "ps")
598 598
 	lines := strings.Split(strings.TrimSpace(string(out)), "\n")
599 599
 	expected := "0.0.0.0:5000->5000/tcp"
... ...
@@ -618,9 +618,9 @@ func (s *DockerSuite) TestPsShowMounts(c *testing.T) {
618 618
 	dockerCmd(c, "volume", "create", "ps-volume-test")
619 619
 	// volume mount containers
620 620
 	runSleepingContainer(c, "--name=volume-test-1", "--volume", "ps-volume-test:"+mp)
621
-	assert.Assert(c, waitRun("volume-test-1"), checker.IsNil)
621
+	assert.Assert(c, waitRun("volume-test-1") == nil)
622 622
 	runSleepingContainer(c, "--name=volume-test-2", "--volume", mp)
623
-	assert.Assert(c, waitRun("volume-test-2"), checker.IsNil)
623
+	assert.Assert(c, waitRun("volume-test-2") == nil)
624 624
 	// bind mount container
625 625
 	var bindMountSource string
626 626
 	var bindMountDestination string
... ...
@@ -632,7 +632,7 @@ func (s *DockerSuite) TestPsShowMounts(c *testing.T) {
632 632
 		bindMountDestination = "/t"
633 633
 	}
634 634
 	runSleepingContainer(c, "--name=bind-mount-test", "-v", bindMountSource+":"+bindMountDestination)
635
-	assert.Assert(c, waitRun("bind-mount-test"), checker.IsNil)
635
+	assert.Assert(c, waitRun("bind-mount-test") == nil)
636 636
 
637 637
 	out, _ := dockerCmd(c, "ps", "--format", "{{.Names}} {{.Mounts}}")
638 638
 
... ...
@@ -340,10 +340,10 @@ func (s *DockerRegistrySuite) TestPullManifestList(c *testing.T) {
340 340
 	// Add to revision store
341 341
 	revisionDir := filepath.Join(registryV2Path, "repositories", remoteRepoName, "_manifests", "revisions", "sha256", hexDigest)
342 342
 	err = os.Mkdir(revisionDir, 0755)
343
-	assert.Assert(c, err, checker.IsNil, check.Commentf("error creating revision dir"))
343
+	assert.Assert(c, err == nil, check.Commentf("error creating revision dir"))
344 344
 	revisionPath := filepath.Join(revisionDir, "link")
345 345
 	err = ioutil.WriteFile(revisionPath, []byte(manifestListDigest.String()), 0644)
346
-	assert.Assert(c, err, checker.IsNil, check.Commentf("error writing revision link"))
346
+	assert.Assert(c, err == nil, check.Commentf("error writing revision link"))
347 347
 
348 348
 	// Update tag
349 349
 	tagPath := filepath.Join(registryV2Path, "repositories", remoteRepoName, "_manifests", "tags", "latest", "current", "link")
... ...
@@ -211,13 +211,13 @@ func (s *DockerSuite) TestUserDefinedNetworkLinks(c *testing.T) {
211 211
 	dockerCmd(c, "network", "create", "-d", "bridge", "udlinkNet")
212 212
 
213 213
 	dockerCmd(c, "run", "-d", "--net=udlinkNet", "--name=first", "busybox", "top")
214
-	assert.Assert(c, waitRun("first"), checker.IsNil)
214
+	assert.Assert(c, waitRun("first") == nil)
215 215
 
216 216
 	// run a container in user-defined network udlinkNet with a link for an existing container
217 217
 	// and a link for a container that doesn't exist
218 218
 	dockerCmd(c, "run", "-d", "--net=udlinkNet", "--name=second", "--link=first:foo",
219 219
 		"--link=third:bar", "busybox", "top")
220
-	assert.Assert(c, waitRun("second"), checker.IsNil)
220
+	assert.Assert(c, waitRun("second") == nil)
221 221
 
222 222
 	// ping to first and its alias foo must succeed
223 223
 	_, _, err := dockerCmdWithError("exec", "second", "ping", "-c", "1", "first")
... ...
@@ -233,7 +233,7 @@ func (s *DockerSuite) TestUserDefinedNetworkLinks(c *testing.T) {
233 233
 
234 234
 	// start third container now
235 235
 	dockerCmd(c, "run", "-d", "--net=udlinkNet", "--name=third", "busybox", "top")
236
-	assert.Assert(c, waitRun("third"), checker.IsNil)
236
+	assert.Assert(c, waitRun("third") == nil)
237 237
 
238 238
 	// ping to third and its alias must succeed now
239 239
 	_, _, err = dockerCmdWithError("exec", "second", "ping", "-c", "1", "third")
... ...
@@ -247,11 +247,11 @@ func (s *DockerSuite) TestUserDefinedNetworkLinksWithRestart(c *testing.T) {
247 247
 	dockerCmd(c, "network", "create", "-d", "bridge", "udlinkNet")
248 248
 
249 249
 	dockerCmd(c, "run", "-d", "--net=udlinkNet", "--name=first", "busybox", "top")
250
-	assert.Assert(c, waitRun("first"), checker.IsNil)
250
+	assert.Assert(c, waitRun("first") == nil)
251 251
 
252 252
 	dockerCmd(c, "run", "-d", "--net=udlinkNet", "--name=second", "--link=first:foo",
253 253
 		"busybox", "top")
254
-	assert.Assert(c, waitRun("second"), checker.IsNil)
254
+	assert.Assert(c, waitRun("second") == nil)
255 255
 
256 256
 	// ping to first and its alias foo must succeed
257 257
 	_, _, err := dockerCmdWithError("exec", "second", "ping", "-c", "1", "first")
... ...
@@ -261,7 +261,7 @@ func (s *DockerSuite) TestUserDefinedNetworkLinksWithRestart(c *testing.T) {
261 261
 
262 262
 	// Restart first container
263 263
 	dockerCmd(c, "restart", "first")
264
-	assert.Assert(c, waitRun("first"), checker.IsNil)
264
+	assert.Assert(c, waitRun("first") == nil)
265 265
 
266 266
 	// ping to first and its alias foo must still succeed
267 267
 	_, _, err = dockerCmdWithError("exec", "second", "ping", "-c", "1", "first")
... ...
@@ -271,7 +271,7 @@ func (s *DockerSuite) TestUserDefinedNetworkLinksWithRestart(c *testing.T) {
271 271
 
272 272
 	// Restart second container
273 273
 	dockerCmd(c, "restart", "second")
274
-	assert.Assert(c, waitRun("second"), checker.IsNil)
274
+	assert.Assert(c, waitRun("second") == nil)
275 275
 
276 276
 	// ping to first and its alias foo must still succeed
277 277
 	_, _, err = dockerCmdWithError("exec", "second", "ping", "-c", "1", "first")
... ...
@@ -296,7 +296,7 @@ func (s *DockerSuite) TestUserDefinedNetworkAlias(c *testing.T) {
296 296
 	dockerCmd(c, "network", "create", "-d", "bridge", "net1")
297 297
 
298 298
 	cid1, _ := dockerCmd(c, "run", "-d", "--net=net1", "--name=first", "--net-alias=foo1", "--net-alias=foo2", "busybox:glibc", "top")
299
-	assert.Assert(c, waitRun("first"), checker.IsNil)
299
+	assert.Assert(c, waitRun("first") == nil)
300 300
 
301 301
 	// Check if default short-id alias is added automatically
302 302
 	id := strings.TrimSpace(cid1)
... ...
@@ -304,7 +304,7 @@ func (s *DockerSuite) TestUserDefinedNetworkAlias(c *testing.T) {
304 304
 	assert.Assert(c, aliases, checker.Contains, stringid.TruncateID(id))
305 305
 
306 306
 	cid2, _ := dockerCmd(c, "run", "-d", "--net=net1", "--name=second", "busybox:glibc", "top")
307
-	assert.Assert(c, waitRun("second"), checker.IsNil)
307
+	assert.Assert(c, waitRun("second") == nil)
308 308
 
309 309
 	// Check if default short-id alias is added automatically
310 310
 	id = strings.TrimSpace(cid2)
... ...
@@ -324,7 +324,7 @@ func (s *DockerSuite) TestUserDefinedNetworkAlias(c *testing.T) {
324 324
 
325 325
 	// Restart first container
326 326
 	dockerCmd(c, "restart", "first")
327
-	assert.Assert(c, waitRun("first"), checker.IsNil)
327
+	assert.Assert(c, waitRun("first") == nil)
328 328
 
329 329
 	// ping to first and its network-scoped aliases must succeed
330 330
 	_, _, err = dockerCmdWithError("exec", "second", "ping", "-c", "1", "first")
... ...
@@ -2813,7 +2813,7 @@ func (s *DockerSuite) TestRunPIDHostWithChildIsKillable(c *testing.T) {
2813 2813
 	name := "ibuildthecloud"
2814 2814
 	dockerCmd(c, "run", "-d", "--pid=host", "--name", name, "busybox", "sh", "-c", "sleep 30; echo hi")
2815 2815
 
2816
-	assert.Assert(c, waitRun(name), checker.IsNil)
2816
+	assert.Assert(c, waitRun(name) == nil)
2817 2817
 
2818 2818
 	errchan := make(chan error)
2819 2819
 	go func() {
... ...
@@ -3464,7 +3464,7 @@ func (s *DockerSuite) TestContainersInUserDefinedNetwork(c *testing.T) {
3464 3464
 	testRequires(c, DaemonIsLinux, NotUserNamespace, NotArm)
3465 3465
 	dockerCmd(c, "network", "create", "-d", "bridge", "testnetwork")
3466 3466
 	dockerCmd(c, "run", "-d", "--net=testnetwork", "--name=first", "busybox", "top")
3467
-	assert.Assert(c, waitRun("first"), checker.IsNil)
3467
+	assert.Assert(c, waitRun("first") == nil)
3468 3468
 	dockerCmd(c, "run", "-t", "--net=testnetwork", "--name=second", "busybox", "ping", "-c", "1", "first")
3469 3469
 }
3470 3470
 
... ...
@@ -3475,9 +3475,9 @@ func (s *DockerSuite) TestContainersInMultipleNetworks(c *testing.T) {
3475 3475
 	dockerCmd(c, "network", "create", "-d", "bridge", "testnetwork2")
3476 3476
 	// Run and connect containers to testnetwork1
3477 3477
 	dockerCmd(c, "run", "-d", "--net=testnetwork1", "--name=first", "busybox", "top")
3478
-	assert.Assert(c, waitRun("first"), checker.IsNil)
3478
+	assert.Assert(c, waitRun("first") == nil)
3479 3479
 	dockerCmd(c, "run", "-d", "--net=testnetwork1", "--name=second", "busybox", "top")
3480
-	assert.Assert(c, waitRun("second"), checker.IsNil)
3480
+	assert.Assert(c, waitRun("second") == nil)
3481 3481
 	// Check connectivity between containers in testnetwork2
3482 3482
 	dockerCmd(c, "exec", "first", "ping", "-c", "1", "second.testnetwork1")
3483 3483
 	// Connect containers to testnetwork2
... ...
@@ -3494,9 +3494,9 @@ func (s *DockerSuite) TestContainersNetworkIsolation(c *testing.T) {
3494 3494
 	dockerCmd(c, "network", "create", "-d", "bridge", "testnetwork2")
3495 3495
 	// Run 1 container in testnetwork1 and another in testnetwork2
3496 3496
 	dockerCmd(c, "run", "-d", "--net=testnetwork1", "--name=first", "busybox", "top")
3497
-	assert.Assert(c, waitRun("first"), checker.IsNil)
3497
+	assert.Assert(c, waitRun("first") == nil)
3498 3498
 	dockerCmd(c, "run", "-d", "--net=testnetwork2", "--name=second", "busybox", "top")
3499
-	assert.Assert(c, waitRun("second"), checker.IsNil)
3499
+	assert.Assert(c, waitRun("second") == nil)
3500 3500
 
3501 3501
 	// Check Isolation between containers : ping must fail
3502 3502
 	_, _, err := dockerCmdWithError("exec", "first", "ping", "-c", "1", "second")
... ...
@@ -3520,9 +3520,9 @@ func (s *DockerSuite) TestNetworkRmWithActiveContainers(c *testing.T) {
3520 3520
 	dockerCmd(c, "network", "create", "-d", "bridge", "testnetwork1")
3521 3521
 	// Run and connect containers to testnetwork1
3522 3522
 	dockerCmd(c, "run", "-d", "--net=testnetwork1", "--name=first", "busybox", "top")
3523
-	assert.Assert(c, waitRun("first"), checker.IsNil)
3523
+	assert.Assert(c, waitRun("first") == nil)
3524 3524
 	dockerCmd(c, "run", "-d", "--net=testnetwork1", "--name=second", "busybox", "top")
3525
-	assert.Assert(c, waitRun("second"), checker.IsNil)
3525
+	assert.Assert(c, waitRun("second") == nil)
3526 3526
 	// Network delete with active containers must fail
3527 3527
 	_, _, err := dockerCmdWithError("network", "rm", "testnetwork1")
3528 3528
 	assert.ErrorContains(c, err, "")
... ...
@@ -3540,9 +3540,9 @@ func (s *DockerSuite) TestContainerRestartInMultipleNetworks(c *testing.T) {
3540 3540
 
3541 3541
 	// Run and connect containers to testnetwork1
3542 3542
 	dockerCmd(c, "run", "-d", "--net=testnetwork1", "--name=first", "busybox", "top")
3543
-	assert.Assert(c, waitRun("first"), checker.IsNil)
3543
+	assert.Assert(c, waitRun("first") == nil)
3544 3544
 	dockerCmd(c, "run", "-d", "--net=testnetwork1", "--name=second", "busybox", "top")
3545
-	assert.Assert(c, waitRun("second"), checker.IsNil)
3545
+	assert.Assert(c, waitRun("second") == nil)
3546 3546
 	// Check connectivity between containers in testnetwork2
3547 3547
 	dockerCmd(c, "exec", "first", "ping", "-c", "1", "second.testnetwork1")
3548 3548
 	// Connect containers to testnetwork2
... ...
@@ -3568,7 +3568,7 @@ func (s *DockerSuite) TestContainerWithConflictingHostNetworks(c *testing.T) {
3568 3568
 	testRequires(c, DaemonIsLinux, NotUserNamespace)
3569 3569
 	// Run a container with --net=host
3570 3570
 	dockerCmd(c, "run", "-d", "--net=host", "--name=first", "busybox", "top")
3571
-	assert.Assert(c, waitRun("first"), checker.IsNil)
3571
+	assert.Assert(c, waitRun("first") == nil)
3572 3572
 
3573 3573
 	// Create a network using bridge driver
3574 3574
 	dockerCmd(c, "network", "create", "-d", "bridge", "testnetwork1")
... ...
@@ -3581,10 +3581,10 @@ func (s *DockerSuite) TestContainerWithConflictingHostNetworks(c *testing.T) {
3581 3581
 func (s *DockerSuite) TestContainerWithConflictingSharedNetwork(c *testing.T) {
3582 3582
 	testRequires(c, DaemonIsLinux)
3583 3583
 	dockerCmd(c, "run", "-d", "--name=first", "busybox", "top")
3584
-	assert.Assert(c, waitRun("first"), checker.IsNil)
3584
+	assert.Assert(c, waitRun("first") == nil)
3585 3585
 	// Run second container in first container's network namespace
3586 3586
 	dockerCmd(c, "run", "-d", "--net=container:first", "--name=second", "busybox", "top")
3587
-	assert.Assert(c, waitRun("second"), checker.IsNil)
3587
+	assert.Assert(c, waitRun("second") == nil)
3588 3588
 
3589 3589
 	// Create a network using bridge driver
3590 3590
 	dockerCmd(c, "network", "create", "-d", "bridge", "testnetwork1")
... ...
@@ -3598,7 +3598,7 @@ func (s *DockerSuite) TestContainerWithConflictingSharedNetwork(c *testing.T) {
3598 3598
 func (s *DockerSuite) TestContainerWithConflictingNoneNetwork(c *testing.T) {
3599 3599
 	testRequires(c, DaemonIsLinux)
3600 3600
 	dockerCmd(c, "run", "-d", "--net=none", "--name=first", "busybox", "top")
3601
-	assert.Assert(c, waitRun("first"), checker.IsNil)
3601
+	assert.Assert(c, waitRun("first") == nil)
3602 3602
 
3603 3603
 	// Create a network using bridge driver
3604 3604
 	dockerCmd(c, "network", "create", "-d", "bridge", "testnetwork1")
... ...
@@ -3610,7 +3610,7 @@ func (s *DockerSuite) TestContainerWithConflictingNoneNetwork(c *testing.T) {
3610 3610
 
3611 3611
 	// create a container connected to testnetwork1
3612 3612
 	dockerCmd(c, "run", "-d", "--net=testnetwork1", "--name=second", "busybox", "top")
3613
-	assert.Assert(c, waitRun("second"), checker.IsNil)
3613
+	assert.Assert(c, waitRun("second") == nil)
3614 3614
 
3615 3615
 	// Connect second container to none network. it must fail as well
3616 3616
 	_, _, err = dockerCmdWithError("network", "connect", "none", "second")
... ...
@@ -3626,7 +3626,7 @@ func (s *DockerSuite) TestRunStdinBlockedAfterContainerExit(c *testing.T) {
3626 3626
 	stdout := bytes.NewBuffer(nil)
3627 3627
 	cmd.Stdout = stdout
3628 3628
 	cmd.Stderr = stdout
3629
-	assert.Assert(c, cmd.Start(), checker.IsNil)
3629
+	assert.Assert(c, cmd.Start() == nil)
3630 3630
 
3631 3631
 	waitChan := make(chan error)
3632 3632
 	go func() {
... ...
@@ -3635,7 +3635,7 @@ func (s *DockerSuite) TestRunStdinBlockedAfterContainerExit(c *testing.T) {
3635 3635
 
3636 3636
 	select {
3637 3637
 	case err := <-waitChan:
3638
-		assert.Assert(c, err, checker.IsNil, check.Commentf(stdout.String()))
3638
+		assert.Assert(c, err == nil, check.Commentf(stdout.String()))
3639 3639
 	case <-time.After(30 * time.Second):
3640 3640
 		c.Fatal("timeout waiting for command to exit")
3641 3641
 	}
... ...
@@ -3942,7 +3942,7 @@ func (s *DockerSuite) TestRunAttachFailedNoLeak(c *testing.T) {
3942 3942
 	runSleepingContainer(c, "--name=test", "-p", "8000:8000")
3943 3943
 
3944 3944
 	// Wait until container is fully up and running
3945
-	assert.Assert(c, waitRun("test"), checker.IsNil)
3945
+	assert.Assert(c, waitRun("test") == nil)
3946 3946
 
3947 3947
 	out, _, err := dockerCmdWithError("run", "--name=fail", "-p", "8000:8000", "busybox", "true")
3948 3948
 	// We will need the following `inspect` to diagnose the issue if test fails (#21247)
... ...
@@ -3959,7 +3959,7 @@ func (s *DockerSuite) TestRunAttachFailedNoLeak(c *testing.T) {
3959 3959
 	dockerCmd(c, "rm", "-f", "test")
3960 3960
 
3961 3961
 	// NGoroutines is not updated right away, so we need to wait before failing
3962
-	assert.Assert(c, waitForGoroutines(nroutines), checker.IsNil)
3962
+	assert.Assert(c, waitForGoroutines(nroutines) == nil)
3963 3963
 }
3964 3964
 
3965 3965
 // Test for one character directory name case (#20122)
... ...
@@ -4052,7 +4052,7 @@ func (s *DockerSuite) TestRunRmAndWait(c *testing.T) {
4052 4052
 	dockerCmd(c, "run", "--name=test", "--rm", "-d", "busybox", "sh", "-c", "sleep 3;exit 2")
4053 4053
 
4054 4054
 	out, code, err := dockerCmdWithError("wait", "test")
4055
-	assert.Assert(c, err, checker.IsNil, check.Commentf("out: %s; exit code: %d", out, code))
4055
+	assert.Assert(c, err == nil, check.Commentf("out: %s; exit code: %d", out, code))
4056 4056
 	assert.Equal(c, out, "2\n", "exit code: %d", code)
4057 4057
 	assert.Equal(c, code, 0)
4058 4058
 }
... ...
@@ -4142,7 +4142,7 @@ func (s *DockerSuite) TestRunStoppedLoggingDriverNoLeak(c *testing.T) {
4142 4142
 	assert.Assert(c, out, checker.Contains, "failed to initialize logging driver", check.Commentf("error should be about logging driver, got output %s", out))
4143 4143
 
4144 4144
 	// NGoroutines is not updated right away, so we need to wait before failing
4145
-	assert.Assert(c, waitForGoroutines(nroutines), checker.IsNil)
4145
+	assert.Assert(c, waitForGoroutines(nroutines) == nil)
4146 4146
 }
4147 4147
 
4148 4148
 // Handles error conditions for --credentialspec. Validating E2E success cases
... ...
@@ -4495,8 +4495,8 @@ func (s *DockerSuite) TestRunMount(c *testing.T) {
4495 4495
 			_, _, err := dockerCmdWithError(append([]string{"run", "-i", "-d", "--name", cName},
4496 4496
 				append(opts, []string{"busybox", "top"}...)...)...)
4497 4497
 			if testCase.valid {
4498
-				assert.Assert(c, err, checker.IsNil, check.Commentf("got error while creating a container with %v (%s)", opts, cName))
4499
-				assert.Assert(c, testCase.fn(cName), checker.IsNil, check.Commentf("got error while executing test for %v (%s)", opts, cName))
4498
+				assert.Assert(c, err == nil, check.Commentf("got error while creating a container with %v (%s)", opts, cName))
4499
+				assert.Assert(c, testCase.fn(cName) == nil, check.Commentf("got error while executing test for %v (%s)", opts, cName))
4500 4500
 				dockerCmd(c, "rm", "-f", cName)
4501 4501
 			} else {
4502 4502
 				assert.Assert(c, err, checker.NotNil, check.Commentf("got nil while creating a container with %v (%s)", opts, cName))
... ...
@@ -35,7 +35,7 @@ import (
35 35
 func (s *DockerSuite) TestRunRedirectStdout(c *testing.T) {
36 36
 	checkRedirect := func(command string) {
37 37
 		_, tty, err := pty.Open()
38
-		assert.Assert(c, err, checker.IsNil, check.Commentf("Could not open pty"))
38
+		assert.Assert(c, err == nil, check.Commentf("Could not open pty"))
39 39
 		cmd := exec.Command("sh", "-c", command)
40 40
 		cmd.Stdin = tty
41 41
 		cmd.Stdout = tty
... ...
@@ -51,7 +51,7 @@ func (s *DockerSuite) TestRunRedirectStdout(c *testing.T) {
51 51
 		case <-time.After(10 * time.Second):
52 52
 			c.Fatal("command timeout")
53 53
 		case err := <-ch:
54
-			assert.Assert(c, err, checker.IsNil, check.Commentf("wait err"))
54
+			assert.Assert(c, err == nil, check.Commentf("wait err"))
55 55
 		}
56 56
 	}
57 57
 
... ...
@@ -70,8 +70,8 @@ func (s *DockerSuite) TestRunWithVolumesIsRecursive(c *testing.T) {
70 70
 
71 71
 	// Create a temporary tmpfs mount.
72 72
 	tmpfsDir := filepath.Join(tmpDir, "tmpfs")
73
-	assert.Assert(c, os.MkdirAll(tmpfsDir, 0777), checker.IsNil, check.Commentf("failed to mkdir at %s", tmpfsDir))
74
-	assert.Assert(c, mount.Mount("tmpfs", tmpfsDir, "tmpfs", ""), checker.IsNil, check.Commentf("failed to create a tmpfs mount at %s", tmpfsDir))
73
+	assert.Assert(c, os.MkdirAll(tmpfsDir, 0777) == nil, check.Commentf("failed to mkdir at %s", tmpfsDir))
74
+	assert.Assert(c, mount.Mount("tmpfs", tmpfsDir, "tmpfs", "") == nil, check.Commentf("failed to create a tmpfs mount at %s", tmpfsDir))
75 75
 
76 76
 	f, err := ioutil.TempFile(tmpfsDir, "touch-me")
77 77
 	assert.NilError(c, err)
... ...
@@ -108,7 +108,7 @@ func (s *DockerSuite) TestRunAttachDetach(c *testing.T) {
108 108
 	defer cpty.Close()
109 109
 	cmd.Stdin = tty
110 110
 	assert.NilError(c, cmd.Start())
111
-	assert.Assert(c, waitRun(name), checker.IsNil)
111
+	assert.Assert(c, waitRun(name) == nil)
112 112
 
113 113
 	_, err = cpty.Write([]byte("hello\n"))
114 114
 	assert.NilError(c, err)
... ...
@@ -167,7 +167,7 @@ func (s *DockerSuite) TestRunAttachDetachFromFlag(c *testing.T) {
167 167
 	if err := cmd.Start(); err != nil {
168 168
 		c.Fatal(err)
169 169
 	}
170
-	assert.Assert(c, waitRun(name), checker.IsNil)
170
+	assert.Assert(c, waitRun(name) == nil)
171 171
 
172 172
 	if _, err := cpty.Write([]byte("hello\n")); err != nil {
173 173
 		c.Fatal(err)
... ...
@@ -210,7 +210,7 @@ func (s *DockerSuite) TestRunAttachDetachFromFlag(c *testing.T) {
210 210
 func (s *DockerSuite) TestRunAttachDetachFromInvalidFlag(c *testing.T) {
211 211
 	name := "attach-detach"
212 212
 	dockerCmd(c, "run", "--name", name, "-itd", "busybox", "top")
213
-	assert.Assert(c, waitRun(name), checker.IsNil)
213
+	assert.Assert(c, waitRun(name) == nil)
214 214
 
215 215
 	// specify an invalid detach key, container will ignore it and use default
216 216
 	cmd := exec.Command(dockerBinary, "attach", "--detach-keys=ctrl-A,a", name)
... ...
@@ -283,7 +283,7 @@ func (s *DockerSuite) TestRunAttachDetachFromConfig(c *testing.T) {
283 283
 	if err := cmd.Start(); err != nil {
284 284
 		c.Fatal(err)
285 285
 	}
286
-	assert.Assert(c, waitRun(name), checker.IsNil)
286
+	assert.Assert(c, waitRun(name) == nil)
287 287
 
288 288
 	if _, err := cpty.Write([]byte("hello\n")); err != nil {
289 289
 		c.Fatal(err)
... ...
@@ -366,7 +366,7 @@ func (s *DockerSuite) TestRunAttachDetachKeysOverrideConfig(c *testing.T) {
366 366
 	if err := cmd.Start(); err != nil {
367 367
 		c.Fatal(err)
368 368
 	}
369
-	assert.Assert(c, waitRun(name), checker.IsNil)
369
+	assert.Assert(c, waitRun(name) == nil)
370 370
 
371 371
 	if _, err := cpty.Write([]byte("hello\n")); err != nil {
372 372
 		c.Fatal(err)
... ...
@@ -427,7 +427,7 @@ func (s *DockerSuite) TestRunAttachInvalidDetachKeySequencePreserved(c *testing.
427 427
 		c.Fatal(err)
428 428
 	}
429 429
 	go cmd.Wait()
430
-	assert.Assert(c, waitRun(name), checker.IsNil)
430
+	assert.Assert(c, waitRun(name) == nil)
431 431
 
432 432
 	// Invalid escape sequence aba, should print aba in output
433 433
 	if _, err := cpty.Write(keyA); err != nil {
... ...
@@ -709,7 +709,7 @@ func (s *DockerSuite) TestStopContainerSignal(c *testing.T) {
709 709
 	out, _ := dockerCmd(c, "run", "--stop-signal", "SIGUSR1", "-d", "busybox", "/bin/sh", "-c", `trap 'echo "exit trapped"; exit 0' USR1; while true; do sleep 1; done`)
710 710
 	containerID := strings.TrimSpace(out)
711 711
 
712
-	assert.Assert(c, waitRun(containerID), checker.IsNil)
712
+	assert.Assert(c, waitRun(containerID) == nil)
713 713
 
714 714
 	dockerCmd(c, "stop", containerID)
715 715
 	out, _ = dockerCmd(c, "logs", containerID)
... ...
@@ -137,13 +137,13 @@ func (s *DockerSuite) TestSaveImageId(c *testing.T) {
137 137
 
138 138
 	var err error
139 139
 	tarCmd.Stdin, err = saveCmd.StdoutPipe()
140
-	assert.Assert(c, err, checker.IsNil, check.Commentf("cannot set stdout pipe for tar: %v", err))
140
+	assert.Assert(c, err == nil, check.Commentf("cannot set stdout pipe for tar: %v", err))
141 141
 	grepCmd := exec.Command("grep", cleanedLongImageID)
142 142
 	grepCmd.Stdin, err = tarCmd.StdoutPipe()
143
-	assert.Assert(c, err, checker.IsNil, check.Commentf("cannot set stdout pipe for grep: %v", err))
143
+	assert.Assert(c, err == nil, check.Commentf("cannot set stdout pipe for grep: %v", err))
144 144
 
145
-	assert.Assert(c, tarCmd.Start(), checker.IsNil, check.Commentf("tar failed with error: %v", err))
146
-	assert.Assert(c, saveCmd.Start(), checker.IsNil, check.Commentf("docker save failed with error: %v", err))
145
+	assert.Assert(c, tarCmd.Start() == nil, check.Commentf("tar failed with error: %v", err))
146
+	assert.Assert(c, saveCmd.Start() == nil, check.Commentf("docker save failed with error: %v", err))
147 147
 	defer func() {
148 148
 		saveCmd.Wait()
149 149
 		tarCmd.Wait()
... ...
@@ -152,7 +152,7 @@ func (s *DockerSuite) TestSaveImageId(c *testing.T) {
152 152
 
153 153
 	out, _, err = runCommandWithOutput(grepCmd)
154 154
 
155
-	assert.Assert(c, err, checker.IsNil, check.Commentf("failed to save repo with image ID: %s, %v", out, err))
155
+	assert.Assert(c, err == nil, check.Commentf("failed to save repo with image ID: %s, %v", out, err))
156 156
 }
157 157
 
158 158
 // save a repo and try to load it using flags
... ...
@@ -264,7 +264,7 @@ func (s *DockerSuite) TestSaveDirectoryPermissions(c *testing.T) {
264 264
 
265 265
 	name := "save-directory-permissions"
266 266
 	tmpDir, err := ioutil.TempDir("", "save-layers-with-directories")
267
-	assert.Assert(c, err, checker.IsNil, check.Commentf("failed to create temporary directory: %s", err))
267
+	assert.Assert(c, err == nil, check.Commentf("failed to create temporary directory: %s", err))
268 268
 	extractionDirectory := filepath.Join(tmpDir, "image-extraction-dir")
269 269
 	os.Mkdir(extractionDirectory, 0777)
270 270
 
... ...
@@ -41,7 +41,7 @@ func (s *DockerSwarmSuite) TestServiceCreateMountVolume(c *testing.T) {
41 41
 	assert.NilError(c, err, out)
42 42
 
43 43
 	var mountConfig []mount.Mount
44
-	assert.Assert(c, json.Unmarshal([]byte(out), &mountConfig), checker.IsNil)
44
+	assert.Assert(c, json.Unmarshal([]byte(out), &mountConfig) == nil)
45 45
 	assert.Equal(c, len(mountConfig), 1)
46 46
 
47 47
 	assert.Equal(c, mountConfig[0].Source, "foo")
... ...
@@ -55,7 +55,7 @@ func (s *DockerSwarmSuite) TestServiceCreateMountVolume(c *testing.T) {
55 55
 	assert.NilError(c, err, out)
56 56
 
57 57
 	var mounts []types.MountPoint
58
-	assert.Assert(c, json.Unmarshal([]byte(out), &mounts), checker.IsNil)
58
+	assert.Assert(c, json.Unmarshal([]byte(out), &mounts) == nil)
59 59
 	assert.Equal(c, len(mounts), 1)
60 60
 
61 61
 	assert.Equal(c, mounts[0].Type, mount.TypeVolume)
... ...
@@ -84,7 +84,7 @@ func (s *DockerSwarmSuite) TestServiceCreateWithSecretSimple(c *testing.T) {
84 84
 	assert.NilError(c, err)
85 85
 
86 86
 	var refs []swarm.SecretReference
87
-	assert.Assert(c, json.Unmarshal([]byte(out), &refs), checker.IsNil)
87
+	assert.Assert(c, json.Unmarshal([]byte(out), &refs) == nil)
88 88
 	assert.Equal(c, len(refs), 1)
89 89
 
90 90
 	assert.Equal(c, refs[0].SecretName, testName)
... ...
@@ -133,7 +133,7 @@ func (s *DockerSwarmSuite) TestServiceCreateWithSecretSourceTargetPaths(c *testi
133 133
 	assert.NilError(c, err)
134 134
 
135 135
 	var refs []swarm.SecretReference
136
-	assert.Assert(c, json.Unmarshal([]byte(out), &refs), checker.IsNil)
136
+	assert.Assert(c, json.Unmarshal([]byte(out), &refs) == nil)
137 137
 	assert.Equal(c, len(refs), len(testPaths))
138 138
 
139 139
 	var tasks []swarm.Task
... ...
@@ -183,7 +183,7 @@ func (s *DockerSwarmSuite) TestServiceCreateWithSecretReferencedTwice(c *testing
183 183
 	assert.NilError(c, err)
184 184
 
185 185
 	var refs []swarm.SecretReference
186
-	assert.Assert(c, json.Unmarshal([]byte(out), &refs), checker.IsNil)
186
+	assert.Assert(c, json.Unmarshal([]byte(out), &refs) == nil)
187 187
 	assert.Equal(c, len(refs), 2)
188 188
 
189 189
 	var tasks []swarm.Task
... ...
@@ -232,7 +232,7 @@ func (s *DockerSwarmSuite) TestServiceCreateWithConfigSimple(c *testing.T) {
232 232
 	assert.NilError(c, err)
233 233
 
234 234
 	var refs []swarm.ConfigReference
235
-	assert.Assert(c, json.Unmarshal([]byte(out), &refs), checker.IsNil)
235
+	assert.Assert(c, json.Unmarshal([]byte(out), &refs) == nil)
236 236
 	assert.Equal(c, len(refs), 1)
237 237
 
238 238
 	assert.Equal(c, refs[0].ConfigName, testName)
... ...
@@ -280,7 +280,7 @@ func (s *DockerSwarmSuite) TestServiceCreateWithConfigSourceTargetPaths(c *testi
280 280
 	assert.NilError(c, err)
281 281
 
282 282
 	var refs []swarm.ConfigReference
283
-	assert.Assert(c, json.Unmarshal([]byte(out), &refs), checker.IsNil)
283
+	assert.Assert(c, json.Unmarshal([]byte(out), &refs) == nil)
284 284
 	assert.Equal(c, len(refs), len(testPaths))
285 285
 
286 286
 	var tasks []swarm.Task
... ...
@@ -330,7 +330,7 @@ func (s *DockerSwarmSuite) TestServiceCreateWithConfigReferencedTwice(c *testing
330 330
 	assert.NilError(c, err)
331 331
 
332 332
 	var refs []swarm.ConfigReference
333
-	assert.Assert(c, json.Unmarshal([]byte(out), &refs), checker.IsNil)
333
+	assert.Assert(c, json.Unmarshal([]byte(out), &refs) == nil)
334 334
 	assert.Equal(c, len(refs), 2)
335 335
 
336 336
 	var tasks []swarm.Task
... ...
@@ -384,7 +384,7 @@ func (s *DockerSwarmSuite) TestServiceCreateMountTmpfs(c *testing.T) {
384 384
 	assert.NilError(c, err, out)
385 385
 
386 386
 	var mountConfig []mount.Mount
387
-	assert.Assert(c, json.Unmarshal([]byte(out), &mountConfig), checker.IsNil)
387
+	assert.Assert(c, json.Unmarshal([]byte(out), &mountConfig) == nil)
388 388
 	assert.Equal(c, len(mountConfig), 1)
389 389
 
390 390
 	assert.Equal(c, mountConfig[0].Source, "")
... ...
@@ -398,7 +398,7 @@ func (s *DockerSwarmSuite) TestServiceCreateMountTmpfs(c *testing.T) {
398 398
 	assert.NilError(c, err, out)
399 399
 
400 400
 	var mounts []types.MountPoint
401
-	assert.Assert(c, json.Unmarshal([]byte(out), &mounts), checker.IsNil)
401
+	assert.Assert(c, json.Unmarshal([]byte(out), &mounts) == nil)
402 402
 	assert.Equal(c, len(mounts), 1)
403 403
 
404 404
 	assert.Equal(c, mounts[0].Type, mount.TypeTmpfs)
... ...
@@ -441,7 +441,7 @@ func (s *DockerSwarmSuite) TestServiceCreateWithNetworkAlias(c *testing.T) {
441 441
 
442 442
 	// Make sure the only alias seen is the container-id
443 443
 	var aliases []string
444
-	assert.Assert(c, json.Unmarshal([]byte(out), &aliases), checker.IsNil)
444
+	assert.Assert(c, json.Unmarshal([]byte(out), &aliases) == nil)
445 445
 	assert.Equal(c, len(aliases), 1)
446 446
 
447 447
 	assert.Assert(c, task.Status.ContainerStatus.ContainerID, checker.Contains, aliases[0])
... ...
@@ -117,7 +117,7 @@ func (s *DockerSwarmSuite) TestSwarmInit(c *testing.T) {
117 117
 	assert.Equal(c, spec.CAConfig.ExternalCAs[0].CACert, "")
118 118
 	assert.Equal(c, spec.CAConfig.ExternalCAs[1].CACert, string(expected))
119 119
 
120
-	assert.Assert(c, d.SwarmLeave(c, true), checker.IsNil)
120
+	assert.Assert(c, d.SwarmLeave(c, true) == nil)
121 121
 	cli.Docker(cli.Args("swarm", "init"), cli.Daemon(d)).Assert(c, icmd.Success)
122 122
 
123 123
 	spec = getSpec()
... ...
@@ -171,7 +171,7 @@ func (s *DockerSwarmSuite) TestSwarmIncompatibleDaemon(c *testing.T) {
171 171
 func (s *DockerSwarmSuite) TestSwarmServiceTemplatingHostname(c *testing.T) {
172 172
 	d := s.AddDaemon(c, true, true)
173 173
 	hostname, err := d.Cmd("node", "inspect", "--format", "{{.Description.Hostname}}", "self")
174
-	assert.Assert(c, err, checker.IsNil, check.Commentf("%s", hostname))
174
+	assert.Assert(c, err == nil, check.Commentf("%s", hostname))
175 175
 
176 176
 	out, err := d.Cmd("service", "create", "--detach", "--no-resolve-image", "--name", "test", "--hostname", "{{.Service.Name}}-{{.Task.Slot}}-{{.Node.Hostname}}", "busybox", "top")
177 177
 	assert.NilError(c, err, out)
... ...
@@ -431,7 +431,7 @@ func (s *DockerSwarmSuite) TestOverlayAttachableOnSwarmLeave(c *testing.T) {
431 431
 	assert.NilError(c, err, out)
432 432
 
433 433
 	// Leave the swarm
434
-	assert.Assert(c, d.SwarmLeave(c, true), checker.IsNil)
434
+	assert.Assert(c, d.SwarmLeave(c, true) == nil)
435 435
 
436 436
 	// Check the container is disconnected
437 437
 	out, err = d.Cmd("inspect", "c1", "--format", "{{.NetworkSettings.Networks."+nwName+"}}")
... ...
@@ -1059,7 +1059,7 @@ func (s *DockerSwarmSuite) TestSwarmInitLocked(c *testing.T) {
1059 1059
 	d := s.AddDaemon(c, false, false)
1060 1060
 
1061 1061
 	outs, err := d.Cmd("swarm", "init", "--autolock")
1062
-	assert.Assert(c, err, checker.IsNil, check.Commentf("%s", outs))
1062
+	assert.Assert(c, err == nil, check.Commentf("%s", outs))
1063 1063
 	unlockKey := getUnlockKey(d, c, outs)
1064 1064
 
1065 1065
 	assert.Equal(c, getNodeStatus(c, d), swarm.LocalNodeStateActive)
... ...
@@ -1084,16 +1084,16 @@ func (s *DockerSwarmSuite) TestSwarmInitLocked(c *testing.T) {
1084 1084
 	assert.Equal(c, getNodeStatus(c, d), swarm.LocalNodeStateActive)
1085 1085
 
1086 1086
 	outs, err = d.Cmd("node", "ls")
1087
-	assert.Assert(c, err, checker.IsNil, check.Commentf("%s", outs))
1087
+	assert.Assert(c, err == nil, check.Commentf("%s", outs))
1088 1088
 	assert.Assert(c, outs, checker.Not(checker.Contains), "Swarm is encrypted and needs to be unlocked")
1089 1089
 
1090 1090
 	outs, err = d.Cmd("swarm", "update", "--autolock=false")
1091
-	assert.Assert(c, err, checker.IsNil, check.Commentf("%s", outs))
1091
+	assert.Assert(c, err == nil, check.Commentf("%s", outs))
1092 1092
 
1093 1093
 	checkSwarmLockedToUnlocked(c, d)
1094 1094
 
1095 1095
 	outs, err = d.Cmd("node", "ls")
1096
-	assert.Assert(c, err, checker.IsNil, check.Commentf("%s", outs))
1096
+	assert.Assert(c, err == nil, check.Commentf("%s", outs))
1097 1097
 	assert.Assert(c, outs, checker.Not(checker.Contains), "Swarm is encrypted and needs to be unlocked")
1098 1098
 }
1099 1099
 
... ...
@@ -1101,7 +1101,7 @@ func (s *DockerSwarmSuite) TestSwarmLeaveLocked(c *testing.T) {
1101 1101
 	d := s.AddDaemon(c, false, false)
1102 1102
 
1103 1103
 	outs, err := d.Cmd("swarm", "init", "--autolock")
1104
-	assert.Assert(c, err, checker.IsNil, check.Commentf("%s", outs))
1104
+	assert.Assert(c, err == nil, check.Commentf("%s", outs))
1105 1105
 
1106 1106
 	// It starts off locked
1107 1107
 	d.RestartNode(c)
... ...
@@ -1118,13 +1118,13 @@ func (s *DockerSwarmSuite) TestSwarmLeaveLocked(c *testing.T) {
1118 1118
 
1119 1119
 	// It is OK for user to leave a locked swarm with --force
1120 1120
 	outs, err = d.Cmd("swarm", "leave", "--force")
1121
-	assert.Assert(c, err, checker.IsNil, check.Commentf("%s", outs))
1121
+	assert.Assert(c, err == nil, check.Commentf("%s", outs))
1122 1122
 
1123 1123
 	info = d.SwarmInfo(c)
1124 1124
 	assert.Equal(c, info.LocalNodeState, swarm.LocalNodeStateInactive)
1125 1125
 
1126 1126
 	outs, err = d.Cmd("swarm", "init")
1127
-	assert.Assert(c, err, checker.IsNil, check.Commentf("%s", outs))
1127
+	assert.Assert(c, err == nil, check.Commentf("%s", outs))
1128 1128
 
1129 1129
 	info = d.SwarmInfo(c)
1130 1130
 	assert.Equal(c, info.LocalNodeState, swarm.LocalNodeStateActive)
... ...
@@ -1144,7 +1144,7 @@ func (s *DockerSwarmSuite) TestSwarmLockUnlockCluster(c *testing.T) {
1144 1144
 
1145 1145
 	// enable autolock
1146 1146
 	outs, err := d1.Cmd("swarm", "update", "--autolock")
1147
-	assert.Assert(c, err, checker.IsNil, check.Commentf("%s", outs))
1147
+	assert.Assert(c, err == nil, check.Commentf("%s", outs))
1148 1148
 	unlockKey := getUnlockKey(d1, c, outs)
1149 1149
 
1150 1150
 	// The ones that got the cluster update should be set to locked
... ...
@@ -1166,7 +1166,7 @@ func (s *DockerSwarmSuite) TestSwarmLockUnlockCluster(c *testing.T) {
1166 1166
 
1167 1167
 	// leave it locked, and set the cluster to no longer autolock
1168 1168
 	outs, err = d1.Cmd("swarm", "update", "--autolock=false")
1169
-	assert.Assert(c, err, checker.IsNil, check.Commentf("out: %v", outs))
1169
+	assert.Assert(c, err == nil, check.Commentf("out: %v", outs))
1170 1170
 
1171 1171
 	// the ones that got the update are now set to unlocked
1172 1172
 	for _, d := range []*daemon.Daemon{d1, d3} {
... ...
@@ -1196,7 +1196,7 @@ func (s *DockerSwarmSuite) TestSwarmJoinPromoteLocked(c *testing.T) {
1196 1196
 
1197 1197
 	// enable autolock
1198 1198
 	outs, err := d1.Cmd("swarm", "update", "--autolock")
1199
-	assert.Assert(c, err, checker.IsNil, check.Commentf("out: %v", outs))
1199
+	assert.Assert(c, err == nil, check.Commentf("out: %v", outs))
1200 1200
 	unlockKey := getUnlockKey(d1, c, outs)
1201 1201
 
1202 1202
 	// joined workers start off unlocked
... ...
@@ -1254,13 +1254,13 @@ func (s *DockerSwarmSuite) TestSwarmRotateUnlockKey(c *testing.T) {
1254 1254
 	d := s.AddDaemon(c, true, true)
1255 1255
 
1256 1256
 	outs, err := d.Cmd("swarm", "update", "--autolock")
1257
-	assert.Assert(c, err, checker.IsNil, check.Commentf("out: %v", outs))
1257
+	assert.Assert(c, err == nil, check.Commentf("out: %v", outs))
1258 1258
 	unlockKey := getUnlockKey(d, c, outs)
1259 1259
 
1260 1260
 	// Rotate multiple times
1261 1261
 	for i := 0; i != 3; i++ {
1262 1262
 		outs, err = d.Cmd("swarm", "unlock-key", "-q", "--rotate")
1263
-		assert.Assert(c, err, checker.IsNil, check.Commentf("out: %v", outs))
1263
+		assert.Assert(c, err == nil, check.Commentf("out: %v", outs))
1264 1264
 		// Strip \n
1265 1265
 		newUnlockKey := outs[:len(outs)-1]
1266 1266
 		assert.Assert(c, newUnlockKey != "")
... ...
@@ -1343,13 +1343,13 @@ func (s *DockerSwarmSuite) TestSwarmClusterRotateUnlockKey(c *testing.T) {
1343 1343
 	d3 := s.AddDaemon(c, true, true)
1344 1344
 
1345 1345
 	outs, err := d1.Cmd("swarm", "update", "--autolock")
1346
-	assert.Assert(c, err, checker.IsNil, check.Commentf("%s", outs))
1346
+	assert.Assert(c, err == nil, check.Commentf("%s", outs))
1347 1347
 	unlockKey := getUnlockKey(d1, c, outs)
1348 1348
 
1349 1349
 	// Rotate multiple times
1350 1350
 	for i := 0; i != 3; i++ {
1351 1351
 		outs, err = d1.Cmd("swarm", "unlock-key", "-q", "--rotate")
1352
-		assert.Assert(c, err, checker.IsNil, check.Commentf("%s", outs))
1352
+		assert.Assert(c, err == nil, check.Commentf("%s", outs))
1353 1353
 		// Strip \n
1354 1354
 		newUnlockKey := outs[:len(outs)-1]
1355 1355
 		assert.Assert(c, newUnlockKey != "")
... ...
@@ -1410,7 +1410,7 @@ func (s *DockerSwarmSuite) TestSwarmClusterRotateUnlockKey(c *testing.T) {
1410 1410
 						continue
1411 1411
 					}
1412 1412
 				}
1413
-				assert.Assert(c, err, checker.IsNil, check.Commentf("%s", outs))
1413
+				assert.Assert(c, err == nil, check.Commentf("%s", outs))
1414 1414
 				assert.Assert(c, outs, checker.Not(checker.Contains), "Swarm is encrypted and needs to be unlocked")
1415 1415
 				break
1416 1416
 			}
... ...
@@ -1426,7 +1426,7 @@ func (s *DockerSwarmSuite) TestSwarmAlternateLockUnlock(c *testing.T) {
1426 1426
 	for i := 0; i < 2; i++ {
1427 1427
 		// set to lock
1428 1428
 		outs, err := d.Cmd("swarm", "update", "--autolock")
1429
-		assert.Assert(c, err, checker.IsNil, check.Commentf("out: %v", outs))
1429
+		assert.Assert(c, err == nil, check.Commentf("out: %v", outs))
1430 1430
 		assert.Assert(c, outs, checker.Contains, "docker swarm unlock")
1431 1431
 		unlockKey := getUnlockKey(d, c, outs)
1432 1432
 
... ...
@@ -1439,7 +1439,7 @@ func (s *DockerSwarmSuite) TestSwarmAlternateLockUnlock(c *testing.T) {
1439 1439
 		assert.Equal(c, getNodeStatus(c, d), swarm.LocalNodeStateActive)
1440 1440
 
1441 1441
 		outs, err = d.Cmd("swarm", "update", "--autolock=false")
1442
-		assert.Assert(c, err, checker.IsNil, check.Commentf("out: %v", outs))
1442
+		assert.Assert(c, err == nil, check.Commentf("out: %v", outs))
1443 1443
 
1444 1444
 		checkSwarmLockedToUnlocked(c, d)
1445 1445
 	}
... ...
@@ -2019,7 +2019,7 @@ func (s *DockerSwarmSuite) TestSwarmClusterEventsConfig(c *testing.T) {
2019 2019
 
2020 2020
 func getUnlockKey(d *daemon.Daemon, c *testing.T, autolockOutput string) string {
2021 2021
 	unlockKey, err := d.Cmd("swarm", "unlock-key", "-q")
2022
-	assert.Assert(c, err, checker.IsNil, check.Commentf("%s", unlockKey))
2022
+	assert.Assert(c, err == nil, check.Commentf("%s", unlockKey))
2023 2023
 	unlockKey = strings.TrimSuffix(unlockKey, "\n")
2024 2024
 
2025 2025
 	// Check that "docker swarm init --autolock" or "docker swarm update --autolock"
... ...
@@ -60,7 +60,7 @@ func (s *DockerDaemonSuite) TestDaemonUserNamespaceRootSetting(c *testing.T) {
60 60
 	assert.Equal(c, statNotExists.GID(), uint32(gid), check.Commentf("Created directory not owned by remapped root GID"))
61 61
 
62 62
 	pid, err := s.d.Cmd("inspect", "--format={{.State.Pid}}", "userns")
63
-	assert.Assert(c, err, checker.IsNil, check.Commentf("Could not inspect running container: out: %q", pid))
63
+	assert.Assert(c, err == nil, check.Commentf("Could not inspect running container: out: %q", pid))
64 64
 	// check the uid and gid maps for the PID to ensure root is remapped
65 65
 	// (cmd = cat /proc/<pid>/uid_map | grep -E '0\s+9999\s+1')
66 66
 	_, err = RunCommandPipelineWithOutput(
... ...
@@ -81,7 +81,7 @@ func (s *DockerDaemonSuite) TestDaemonUserNamespaceRootSetting(c *testing.T) {
81 81
 
82 82
 	// use host usernamespace
83 83
 	out, err = s.d.Cmd("run", "-d", "--name", "userns_skip", "--userns", "host", "busybox", "sh", "-c", "touch /goofy/testfile; top")
84
-	assert.Assert(c, err, checker.IsNil, check.Commentf("Output: %s", out))
84
+	assert.Assert(c, err == nil, check.Commentf("Output: %s", out))
85 85
 	user = s.findUser(c, "userns_skip")
86 86
 	// userns are skipped, user is root
87 87
 	assert.Equal(c, user, "root")
... ...
@@ -90,7 +90,7 @@ func (s *DockerDaemonSuite) TestDaemonUserNamespaceRootSetting(c *testing.T) {
90 90
 // findUser finds the uid or name of the user of the first process that runs in a container
91 91
 func (s *DockerDaemonSuite) findUser(c *testing.T, container string) string {
92 92
 	out, err := s.d.Cmd("top", container)
93
-	assert.Assert(c, err, checker.IsNil, check.Commentf("Output: %s", out))
93
+	assert.Assert(c, err == nil, check.Commentf("Output: %s", out))
94 94
 	rows := strings.Split(out, "\n")
95 95
 	if len(rows) < 2 {
96 96
 		// No process rows founds
... ...
@@ -488,7 +488,7 @@ func (s *DockerSuite) TestDuplicateMountpointsForVolumesFrom(c *testing.T) {
488 488
 	assert.Assert(c, strings.TrimSpace(out), checker.Contains, data2)
489 489
 
490 490
 	out, _, err := dockerCmdWithError("run", "--name=app", "--volumes-from=data1", "--volumes-from=data2", "-d", "busybox", "top")
491
-	assert.Assert(c, err, checker.IsNil, check.Commentf("Out: %s", out))
491
+	assert.Assert(c, err == nil, check.Commentf("Out: %s", out))
492 492
 
493 493
 	// Only the second volume will be referenced, this is backward compatible
494 494
 	out, _ = dockerCmd(c, "inspect", "--format", "{{(index .Mounts 0).Name}}", "app")
... ...
@@ -531,7 +531,7 @@ func (s *DockerSuite) TestDuplicateMountpointsForVolumesFromAndBind(c *testing.T
531 531
 
532 532
 	// /tmp/data is automatically created, because we are not using the modern mount API here
533 533
 	out, _, err := dockerCmdWithError("run", "--name=app", "--volumes-from=data1", "--volumes-from=data2", "-v", "/tmp/data:/tmp/data", "-d", "busybox", "top")
534
-	assert.Assert(c, err, checker.IsNil, check.Commentf("Out: %s", out))
534
+	assert.Assert(c, err == nil, check.Commentf("Out: %s", out))
535 535
 
536 536
 	// No volume will be referenced (mount is /tmp/data), this is backward compatible
537 537
 	out, _ = dockerCmd(c, "inspect", "--format", "{{(index .Mounts 0).Name}}", "app")
... ...
@@ -70,7 +70,7 @@ func (s *DockerHubPullSuite) TearDownTest(c *testing.T) {
70 70
 // output. The function fails the test when the command returns an error.
71 71
 func (s *DockerHubPullSuite) Cmd(c *testing.T, name string, arg ...string) string {
72 72
 	out, err := s.CmdWithError(name, arg...)
73
-	assert.Assert(c, err, checker.IsNil, check.Commentf("%q failed with errors: %s, %v", strings.Join(arg, " "), out, err))
73
+	assert.Assert(c, err == nil, check.Commentf("%q failed with errors: %s, %v", strings.Join(arg, " "), out, err))
74 74
 	return out
75 75
 }
76 76
 
... ...
@@ -77,7 +77,7 @@ func inspectFieldAndUnmarshall(c *testing.T, name, field string, output interfac
77 77
 	str := inspectFieldJSON(c, name, field)
78 78
 	err := json.Unmarshal([]byte(str), output)
79 79
 	if c != nil {
80
-		assert.Assert(c, err, checker.IsNil, check.Commentf("failed to unmarshal: %v", err))
80
+		assert.Assert(c, err == nil, check.Commentf("failed to unmarshal: %v", err))
81 81
 	}
82 82
 }
83 83
 
... ...
@@ -201,7 +201,7 @@ func buildImage(name string, cmdOperators ...cli.CmdOperator) *icmd.Result {
201 201
 // Fail the test when error occurs.
202 202
 func writeFile(dst, content string, c *testing.T) {
203 203
 	// Create subdirectories if necessary
204
-	assert.Assert(c, os.MkdirAll(path.Dir(dst), 0700), checker.IsNil)
204
+	assert.Assert(c, os.MkdirAll(path.Dir(dst), 0700) == nil)
205 205
 	f, err := os.OpenFile(dst, os.O_CREATE|os.O_RDWR|os.O_TRUNC, 0700)
206 206
 	assert.NilError(c, err)
207 207
 	defer f.Close()
... ...
@@ -263,7 +263,7 @@ func daemonTime(c *testing.T) time.Time {
263 263
 	assert.NilError(c, err)
264 264
 
265 265
 	dt, err := time.Parse(time.RFC3339Nano, info.SystemTime)
266
-	assert.Assert(c, err, checker.IsNil, check.Commentf("invalid time format in GET /info response"))
266
+	assert.Assert(c, err == nil, check.Commentf("invalid time format in GET /info response"))
267 267
 	return dt
268 268
 }
269 269
 
... ...
@@ -408,7 +408,7 @@ func waitForGoroutines(expected int) error {
408 408
 // getErrorMessage returns the error message from an error API response
409 409
 func getErrorMessage(c *testing.T, body []byte) string {
410 410
 	var resp types.ErrorResponse
411
-	assert.Assert(c, json.Unmarshal(body, &resp), checker.IsNil)
411
+	assert.Assert(c, json.Unmarshal(body, &resp) == nil)
412 412
 	return strings.TrimSpace(resp.Message)
413 413
 }
414 414
 
... ...
@@ -15,12 +15,12 @@ var _ = check.Suite(&DiscoverySuite{})
15 15
 
16 16
 func (s *DiscoverySuite) TestNewEntry(c *testing.T) {
17 17
 	entry, err := NewEntry("127.0.0.1:2375")
18
-	assert.Assert(c, err, checker.IsNil)
18
+	assert.Assert(c, err == nil)
19 19
 	assert.Equal(c, entry.Equals(&Entry{Host: "127.0.0.1", Port: "2375"}), true)
20 20
 	assert.Equal(c, entry.String(), "127.0.0.1:2375")
21 21
 
22 22
 	entry, err = NewEntry("[2001:db8:0:f101::2]:2375")
23
-	assert.Assert(c, err, checker.IsNil)
23
+	assert.Assert(c, err == nil)
24 24
 	assert.Equal(c, entry.Equals(&Entry{Host: "2001:db8:0:f101::2", Port: "2375"}), true)
25 25
 	assert.Equal(c, entry.String(), "[2001:db8:0:f101::2]:2375")
26 26
 
... ...
@@ -53,10 +53,10 @@ func (s *DiscoverySuite) TestParse(c *testing.T) {
53 53
 func (s *DiscoverySuite) TestCreateEntries(c *testing.T) {
54 54
 	entries, err := CreateEntries(nil)
55 55
 	assert.DeepEqual(c, entries, Entries{})
56
-	assert.Assert(c, err, checker.IsNil)
56
+	assert.Assert(c, err == nil)
57 57
 
58 58
 	entries, err = CreateEntries([]string{"127.0.0.1:2375", "127.0.0.2:2375", "[2001:db8:0:f101::2]:2375", ""})
59
-	assert.Assert(c, err, checker.IsNil)
59
+	assert.Assert(c, err == nil)
60 60
 	expected := Entries{
61 61
 		&Entry{Host: "127.0.0.1", Port: "2375"},
62 62
 		&Entry{Host: "127.0.0.2", Port: "2375"},
... ...
@@ -70,7 +70,7 @@ func (s *DiscoverySuite) TestCreateEntries(c *testing.T) {
70 70
 
71 71
 func (s *DiscoverySuite) TestContainsEntry(c *testing.T) {
72 72
 	entries, err := CreateEntries([]string{"127.0.0.1:2375", "127.0.0.2:2375", ""})
73
-	assert.Assert(c, err, checker.IsNil)
73
+	assert.Assert(c, err == nil)
74 74
 	assert.Equal(c, entries.Contains(&Entry{Host: "127.0.0.1", Port: "2375"}), true)
75 75
 	assert.Equal(c, entries.Contains(&Entry{Host: "127.0.0.3", Port: "2375"}), false)
76 76
 }
... ...
@@ -25,7 +25,7 @@ func (s *DiscoverySuite) TestInitialize(c *testing.T) {
25 25
 
26 26
 func (s *DiscoverySuite) TestNew(c *testing.T) {
27 27
 	d, err := discovery.New("file:///path/to/file", 0, 0, nil)
28
-	assert.Assert(c, err, checker.IsNil)
28
+	assert.Assert(c, err == nil)
29 29
 	assert.Equal(c, d.(*Discovery).path, "/path/to/file")
30 30
 }
31 31
 
... ...
@@ -75,9 +75,9 @@ func (s *DiscoverySuite) TestWatch(c *testing.T) {
75 75
 
76 76
 	// Create a temporary file and remove it.
77 77
 	tmp, err := ioutil.TempFile(os.TempDir(), "discovery-file-test")
78
-	assert.Assert(c, err, checker.IsNil)
79
-	assert.Assert(c, tmp.Close(), checker.IsNil)
80
-	assert.Assert(c, os.Remove(tmp.Name()), checker.IsNil)
78
+	assert.Assert(c, err == nil)
79
+	assert.Assert(c, tmp.Close() == nil)
80
+	assert.Assert(c, os.Remove(tmp.Name()) == nil)
81 81
 
82 82
 	// Set up file discovery.
83 83
 	d := &Discovery{}
... ...
@@ -94,21 +94,21 @@ func (s *DiscoverySuite) TestWatch(c *testing.T) {
94 94
 	}()
95 95
 
96 96
 	// Write the file and make sure we get the expected value back.
97
-	assert.Assert(c, ioutil.WriteFile(tmp.Name(), []byte(data), 0600), checker.IsNil)
97
+	assert.Assert(c, ioutil.WriteFile(tmp.Name(), []byte(data), 0600) == nil)
98 98
 	assert.DeepEqual(c, <-ch, expected)
99 99
 
100 100
 	// Add a new entry and look it up.
101 101
 	expected = append(expected, &discovery.Entry{Host: "3.3.3.3", Port: "3333"})
102 102
 	f, err := os.OpenFile(tmp.Name(), os.O_APPEND|os.O_WRONLY, 0600)
103
-	assert.Assert(c, err, checker.IsNil)
103
+	assert.Assert(c, err == nil)
104 104
 	assert.Assert(c, f, checker.NotNil)
105 105
 	_, err = f.WriteString("\n3.3.3.3:3333\n")
106
-	assert.Assert(c, err, checker.IsNil)
106
+	assert.Assert(c, err == nil)
107 107
 	f.Close()
108 108
 	assert.DeepEqual(c, <-ch, expected)
109 109
 
110 110
 	// Stop and make sure it closes all channels.
111 111
 	close(stopCh)
112
-	assert.Assert(c, <-ch, checker.IsNil)
113
-	assert.Assert(c, <-errCh, checker.IsNil)
112
+	assert.Assert(c, <-ch == nil)
113
+	assert.Assert(c, <-errCh == nil)
114 114
 }
... ...
@@ -181,12 +181,12 @@ BFrwkQE4HQtQBV60hYQUzzlSk44VFDz+jxIEtacRHaomDRh2FtOTz+I=
181 181
 -----END RSA PRIVATE KEY-----
182 182
 `
183 183
 	certFile, err := ioutil.TempFile("", "cert")
184
-	assert.Assert(c, err, checker.IsNil)
184
+	assert.Assert(c, err == nil)
185 185
 	defer os.Remove(certFile.Name())
186 186
 	certFile.Write([]byte(cert))
187 187
 	certFile.Close()
188 188
 	keyFile, err := ioutil.TempFile("", "key")
189
-	assert.Assert(c, err, checker.IsNil)
189
+	assert.Assert(c, err == nil)
190 190
 	defer os.Remove(keyFile.Name())
191 191
 	keyFile.Write([]byte(key))
192 192
 	keyFile.Close()
... ...
@@ -198,7 +198,7 @@ BFrwkQE4HQtQBV60hYQUzzlSk44VFDz+jxIEtacRHaomDRh2FtOTz+I=
198 198
 		"kv.certfile":   certFile.Name(),
199 199
 		"kv.keyfile":    keyFile.Name(),
200 200
 	})
201
-	assert.Assert(c, err, checker.IsNil)
201
+	assert.Assert(c, err == nil)
202 202
 	s := d.store.(*Mock)
203 203
 	assert.Assert(c, s.Options.TLS, checker.NotNil)
204 204
 	assert.Assert(c, s.Options.TLS.RootCAs, checker.NotNil)
... ...
@@ -253,8 +253,8 @@ func (ds *DiscoverySuite) TestWatch(c *testing.T) {
253 253
 
254 254
 	// Stop and make sure it closes all channels.
255 255
 	close(stopCh)
256
-	assert.Assert(c, <-ch, checker.IsNil)
257
-	assert.Assert(c, <-errCh, checker.IsNil)
256
+	assert.Assert(c, <-ch == nil)
257
+	assert.Assert(c, <-errCh == nil)
258 258
 }
259 259
 
260 260
 // FakeStore implements store.Store methods. It mocks all store
... ...
@@ -30,7 +30,7 @@ func (s *discoverySuite) TestWatch(c *testing.T) {
30 30
 		&discovery.Entry{Host: "1.1.1.1", Port: "1111"},
31 31
 	}
32 32
 
33
-	assert.Assert(c, d.Register("1.1.1.1:1111"), checker.IsNil)
33
+	assert.Assert(c, d.Register("1.1.1.1:1111") == nil)
34 34
 	assert.DeepEqual(c, <-ch, expected)
35 35
 
36 36
 	expected = discovery.Entries{
... ...
@@ -38,11 +38,11 @@ func (s *discoverySuite) TestWatch(c *testing.T) {
38 38
 		&discovery.Entry{Host: "2.2.2.2", Port: "2222"},
39 39
 	}
40 40
 
41
-	assert.Assert(c, d.Register("2.2.2.2:2222"), checker.IsNil)
41
+	assert.Assert(c, d.Register("2.2.2.2:2222") == nil)
42 42
 	assert.DeepEqual(c, <-ch, expected)
43 43
 
44 44
 	// Stop and make sure it closes all channels.
45 45
 	close(stopCh)
46
-	assert.Assert(c, <-ch, checker.IsNil)
47
-	assert.Assert(c, <-errCh, checker.IsNil)
46
+	assert.Assert(c, <-ch == nil)
47
+	assert.Assert(c, <-errCh == nil)
48 48
 }