Browse code

rm-gocheck: convert check.Commentf to string - with just one string

sed -E -i 's#\bcheck.Commentf\(("[^"]+")\)#\1#g' \
-- "integration-cli/daemon/daemon_swarm.go" "integration-cli/docker_api_containers_test.go" "integration-cli/docker_api_swarm_test.go" "integration-cli/docker_cli_build_unix_test.go" "integration-cli/docker_cli_by_digest_test.go" "integration-cli/docker_cli_daemon_test.go" "integration-cli/docker_cli_external_volume_driver_unix_test.go" "integration-cli/docker_cli_history_test.go" "integration-cli/docker_cli_import_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_logs_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_utils_test.go"

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

Tibor Vass authored on 2019/09/10 06:08:22
Showing 22 changed files
... ...
@@ -176,7 +176,7 @@ func (d *Daemon) CheckLeader(c *testing.T) (interface{}, check.CommentInterface)
176 176
 	cli := d.NewClientT(c)
177 177
 	defer cli.Close()
178 178
 
179
-	errList := check.Commentf("could not get node list")
179
+	errList := "could not get node list"
180 180
 
181 181
 	ls, err := cli.NodeList(context.Background(), types.NodeListOptions{})
182 182
 	if err != nil {
... ...
@@ -188,7 +188,7 @@ func (d *Daemon) CheckLeader(c *testing.T) (interface{}, check.CommentInterface)
188 188
 			return nil, nil
189 189
 		}
190 190
 	}
191
-	return fmt.Errorf("no leader"), check.Commentf("could not find leader")
191
+	return fmt.Errorf("no leader"), "could not find leader"
192 192
 }
193 193
 
194 194
 // CmdRetryOutOfSequence tries the specified command against the current daemon
... ...
@@ -121,7 +121,7 @@ func (s *DockerSuite) TestContainerAPIGetExport(c *testing.T) {
121 121
 			break
122 122
 		}
123 123
 	}
124
-	assert.Assert(c, found, check.Commentf("The created test file has not been found in the exported image"))
124
+	assert.Assert(c, found, "The created test file has not been found in the exported image")
125 125
 }
126 126
 
127 127
 func (s *DockerSuite) TestContainerAPIGetChanges(c *testing.T) {
... ...
@@ -144,7 +144,7 @@ func (s *DockerSuite) TestContainerAPIGetChanges(c *testing.T) {
144 144
 			success = true
145 145
 		}
146 146
 	}
147
-	assert.Assert(c, success, check.Commentf("/etc/passwd has been removed but is not present in the diff"))
147
+	assert.Assert(c, success, "/etc/passwd has been removed but is not present in the diff")
148 148
 }
149 149
 
150 150
 func (s *DockerSuite) TestGetContainerStats(c *testing.T) {
... ...
@@ -215,7 +215,7 @@ func (s *DockerSuite) TestGetContainerStatsRmRunning(c *testing.T) {
215 215
 
216 216
 	// Now remove without `-f` and make sure we are still pulling stats
217 217
 	_, _, err = dockerCmdWithError("rm", id)
218
-	assert.Assert(c, err != nil, check.Commentf("rm should have failed but didn't"))
218
+	assert.Assert(c, err != nil, "rm should have failed but didn't")
219 219
 	_, err = buf.ReadTimeout(b, 2*time.Second)
220 220
 	assert.NilError(c, err)
221 221
 
... ...
@@ -389,7 +389,7 @@ func (s *DockerSuite) TestContainerAPIPause(c *testing.T) {
389 389
 	assert.NilError(c, err)
390 390
 
391 391
 	pausedContainers = getPaused(c)
392
-	assert.Equal(c, len(pausedContainers), 0, check.Commentf("There should be no paused container."))
392
+	assert.Equal(c, len(pausedContainers), 0, "There should be no paused container.")
393 393
 }
394 394
 
395 395
 func (s *DockerSuite) TestContainerAPITop(c *testing.T) {
... ...
@@ -615,7 +615,7 @@ func UtilCreateNetworkMode(c *testing.T, networkMode containertypes.NetworkMode)
615 615
 	containerJSON, err := cli.ContainerInspect(context.Background(), container.ID)
616 616
 	assert.NilError(c, err)
617 617
 
618
-	assert.Equal(c, containerJSON.HostConfig.NetworkMode, containertypes.NetworkMode(networkMode), check.Commentf("Mismatched NetworkMode"))
618
+	assert.Equal(c, containerJSON.HostConfig.NetworkMode, containertypes.NetworkMode(networkMode), "Mismatched NetworkMode")
619 619
 }
620 620
 
621 621
 func (s *DockerSuite) TestContainerAPICreateWithCpuSharesCpuset(c *testing.T) {
... ...
@@ -888,7 +888,7 @@ func (s *DockerSuite) TestContainerAPIRename(c *testing.T) {
888 888
 	assert.NilError(c, err)
889 889
 
890 890
 	name := inspectField(c, containerID, "Name")
891
-	assert.Equal(c, name, "/"+newName, check.Commentf("Failed to rename container"))
891
+	assert.Equal(c, name, "/"+newName, "Failed to rename container")
892 892
 }
893 893
 
894 894
 func (s *DockerSuite) TestContainerAPIKill(c *testing.T) {
... ...
@@ -1168,7 +1168,7 @@ func (s *DockerSuite) TestContainerAPIDeleteRemoveLinks(c *testing.T) {
1168 1168
 	assert.Assert(c, waitRun(id2) == nil)
1169 1169
 
1170 1170
 	links := inspectFieldJSON(c, id2, "HostConfig.Links")
1171
-	assert.Equal(c, links, "[\"/tlink1:/tlink2/tlink1\"]", check.Commentf("expected to have links between containers"))
1171
+	assert.Equal(c, links, "[\"/tlink1:/tlink2/tlink1\"]", "expected to have links between containers")
1172 1172
 
1173 1173
 	removeOptions := types.ContainerRemoveOptions{
1174 1174
 		RemoveLinks: true,
... ...
@@ -1182,7 +1182,7 @@ func (s *DockerSuite) TestContainerAPIDeleteRemoveLinks(c *testing.T) {
1182 1182
 	assert.NilError(c, err)
1183 1183
 
1184 1184
 	linksPostRm := inspectFieldJSON(c, id2, "HostConfig.Links")
1185
-	assert.Equal(c, linksPostRm, "null", check.Commentf("call to api deleteContainer links should have removed the specified links"))
1185
+	assert.Equal(c, linksPostRm, "null", "call to api deleteContainer links should have removed the specified links")
1186 1186
 }
1187 1187
 
1188 1188
 func (s *DockerSuite) TestContainerAPIDeleteConflict(c *testing.T) {
... ...
@@ -1250,7 +1250,7 @@ func (s *DockerSuite) TestContainerAPIChunkedEncoding(c *testing.T) {
1250 1250
 		req.ContentLength = -1
1251 1251
 		return nil
1252 1252
 	}))
1253
-	assert.Assert(c, err == nil, check.Commentf("error creating container with chunked encoding"))
1253
+	assert.Assert(c, err == nil, "error creating container with chunked encoding")
1254 1254
 	defer resp.Body.Close()
1255 1255
 	assert.Equal(c, resp.StatusCode, http.StatusCreated)
1256 1256
 }
... ...
@@ -232,7 +232,7 @@ func (s *DockerSwarmSuite) TestAPISwarmPromoteDemote(c *testing.T) {
232 232
 		if err == nil && len(certs) > 0 && len(certs[0].Subject.OrganizationalUnit) > 0 {
233 233
 			return certs[0].Subject.OrganizationalUnit[0], nil
234 234
 		}
235
-		return "", check.Commentf("could not get organizational unit from certificate")
235
+		return "", "could not get organizational unit from certificate"
236 236
 	}, checker.Equals, "swarm-worker")
237 237
 
238 238
 	// Demoting last node should fail
... ...
@@ -340,7 +340,7 @@ func (s *DockerSwarmSuite) TestAPISwarmLeaderElection(c *testing.T) {
340 340
 			}
341 341
 
342 342
 			if leader == nil {
343
-				return false, check.Commentf("no leader elected")
343
+				return false, "no leader elected"
344 344
 			}
345 345
 
346 346
 			return true, fmt.Sprintf("elected %v", leader.ID())
... ...
@@ -742,7 +742,7 @@ func checkClusterHealth(c *testing.T, cl []*daemon.Daemon, managerCount, workerC
742 742
 			client := d.NewClientT(c)
743 743
 			daemonInfo, err := client.Info(context.Background())
744 744
 			info = daemonInfo.Swarm
745
-			return err, check.Commentf("cluster not ready in time")
745
+			return err, "cluster not ready in time"
746 746
 		}
747 747
 		waitAndAssert(c, defaultReconciliationTimeout, checkInfo, checker.IsNil)
748 748
 		if !info.ControlAvailable {
... ...
@@ -58,14 +58,14 @@ func (s *DockerSuite) TestBuildResourceConstraintsAreUsed(c *testing.T) {
58 58
 	err := json.Unmarshal([]byte(cfg), &c1)
59 59
 	assert.Assert(c, err == nil, check.Commentf(cfg))
60 60
 
61
-	assert.Equal(c, c1.Memory, int64(64*1024*1024), check.Commentf("resource constraints not set properly for Memory"))
62
-	assert.Equal(c, c1.MemorySwap, int64(-1), check.Commentf("resource constraints not set properly for MemorySwap"))
63
-	assert.Equal(c, c1.CpusetCpus, "0", check.Commentf("resource constraints not set properly for CpusetCpus"))
64
-	assert.Equal(c, c1.CpusetMems, "0", check.Commentf("resource constraints not set properly for CpusetMems"))
65
-	assert.Equal(c, c1.CPUShares, int64(100), check.Commentf("resource constraints not set properly for CPUShares"))
66
-	assert.Equal(c, c1.CPUQuota, int64(8000), check.Commentf("resource constraints not set properly for CPUQuota"))
67
-	assert.Equal(c, c1.Ulimits[0].Name, "nofile", check.Commentf("resource constraints not set properly for Ulimits"))
68
-	assert.Equal(c, c1.Ulimits[0].Hard, int64(42), check.Commentf("resource constraints not set properly for Ulimits"))
61
+	assert.Equal(c, c1.Memory, int64(64*1024*1024), "resource constraints not set properly for Memory")
62
+	assert.Equal(c, c1.MemorySwap, int64(-1), "resource constraints not set properly for MemorySwap")
63
+	assert.Equal(c, c1.CpusetCpus, "0", "resource constraints not set properly for CpusetCpus")
64
+	assert.Equal(c, c1.CpusetMems, "0", "resource constraints not set properly for CpusetMems")
65
+	assert.Equal(c, c1.CPUShares, int64(100), "resource constraints not set properly for CPUShares")
66
+	assert.Equal(c, c1.CPUQuota, int64(8000), "resource constraints not set properly for CPUQuota")
67
+	assert.Equal(c, c1.Ulimits[0].Name, "nofile", "resource constraints not set properly for Ulimits")
68
+	assert.Equal(c, c1.Ulimits[0].Hard, int64(42), "resource constraints not set properly for Ulimits")
69 69
 
70 70
 	// Make sure constraints aren't saved to image
71 71
 	cli.DockerCmd(c, "run", "--name=test", name)
... ...
@@ -76,13 +76,13 @@ func (s *DockerSuite) TestBuildResourceConstraintsAreUsed(c *testing.T) {
76 76
 	err = json.Unmarshal([]byte(cfg), &c2)
77 77
 	assert.Assert(c, err == nil, check.Commentf(cfg))
78 78
 
79
-	assert.Assert(c, c2.Memory != int64(64*1024*1024), check.Commentf("resource leaked from build for Memory"))
80
-	assert.Assert(c, c2.MemorySwap != int64(-1), check.Commentf("resource leaked from build for MemorySwap"))
81
-	assert.Assert(c, c2.CpusetCpus != "0", check.Commentf("resource leaked from build for CpusetCpus"))
82
-	assert.Assert(c, c2.CpusetMems != "0", check.Commentf("resource leaked from build for CpusetMems"))
83
-	assert.Assert(c, c2.CPUShares != int64(100), check.Commentf("resource leaked from build for CPUShares"))
84
-	assert.Assert(c, c2.CPUQuota != int64(8000), check.Commentf("resource leaked from build for CPUQuota"))
85
-	assert.Assert(c, c2.Ulimits == nil, check.Commentf("resource leaked from build for Ulimits"))
79
+	assert.Assert(c, c2.Memory != int64(64*1024*1024), "resource leaked from build for Memory")
80
+	assert.Assert(c, c2.MemorySwap != int64(-1), "resource leaked from build for MemorySwap")
81
+	assert.Assert(c, c2.CpusetCpus != "0", "resource leaked from build for CpusetCpus")
82
+	assert.Assert(c, c2.CpusetMems != "0", "resource leaked from build for CpusetMems")
83
+	assert.Assert(c, c2.CPUShares != int64(100), "resource leaked from build for CPUShares")
84
+	assert.Assert(c, c2.CPUQuota != int64(8000), "resource leaked from build for CPUQuota")
85
+	assert.Assert(c, c2.Ulimits == nil, "resource leaked from build for Ulimits")
86 86
 }
87 87
 
88 88
 func (s *DockerSuite) TestBuildAddChangeOwnership(c *testing.T) {
... ...
@@ -115,8 +115,8 @@ func testPullByDigestNoFallback(c *testing.T) {
115 115
 	// pull from the registry using the <name>@<digest> reference
116 116
 	imageReference := fmt.Sprintf("%s@sha256:ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff", repoName)
117 117
 	out, _, err := dockerCmdWithError("pull", imageReference)
118
-	assert.Assert(c, err != nil, check.Commentf("expected non-zero exit status and correct error message when pulling non-existing image"))
119
-	assert.Assert(c, strings.Contains(out, fmt.Sprintf("manifest for %s not found", imageReference)), check.Commentf("expected non-zero exit status and correct error message when pulling non-existing image"))
118
+	assert.Assert(c, err != nil, "expected non-zero exit status and correct error message when pulling non-existing image")
119
+	assert.Assert(c, strings.Contains(out, fmt.Sprintf("manifest for %s not found", imageReference)), "expected non-zero exit status and correct error message when pulling non-existing image")
120 120
 }
121 121
 
122 122
 func (s *DockerRegistrySuite) TestPullByDigestNoFallback(c *testing.T) {
... ...
@@ -234,7 +234,7 @@ func (s *DockerRegistrySuite) TestListImagesWithoutDigests(c *testing.T) {
234 234
 	dockerCmd(c, "pull", imageReference)
235 235
 
236 236
 	out, _ := dockerCmd(c, "images")
237
-	assert.Assert(c, !strings.Contains(out, "DIGEST"), check.Commentf("list output should not have contained DIGEST header"))
237
+	assert.Assert(c, !strings.Contains(out, "DIGEST"), "list output should not have contained DIGEST header")
238 238
 }
239 239
 
240 240
 func (s *DockerRegistrySuite) TestListImagesWithDigests(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 == nil, check.Commentf("error setting up image"))
392
+	assert.Assert(c, err == nil, "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 == nil, check.Commentf("error setting up image"))
571
+	assert.Assert(c, err == nil, "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 == nil, check.Commentf("unable to decode image manifest from blob"))
578
+	assert.Assert(c, err == nil, "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 == nil, check.Commentf("unable to encode altered image manifest to JSON"))
591
+	assert.Assert(c, err == nil, "unable to encode altered image manifest to JSON")
592 592
 
593 593
 	s.reg.WriteBlobContents(c, manifestDigest, alteredManifestBlob)
594 594
 
... ...
@@ -641,7 +641,7 @@ func (s *DockerRegistrySuite) TestPullFailsWithAlteredLayer(c *testing.T) {
641 641
 	// Pull from the registry using the <name>@<digest> reference.
642 642
 	imageReference := fmt.Sprintf("%s@%s", repoName, manifestDigest)
643 643
 	out, exitStatus, _ := dockerCmdWithError("pull", imageReference)
644
-	assert.Assert(c, exitStatus != 0, check.Commentf("expected a non-zero exit status"))
644
+	assert.Assert(c, exitStatus != 0, "expected a non-zero exit status")
645 645
 
646 646
 	expectedErrorMsg := fmt.Sprintf("filesystem layer verification failed for digest %s", targetLayerDigest)
647 647
 	assert.Assert(c, strings.Contains(out, expectedErrorMsg), fmt.Sprintf("expected error message in output: %s", out))
... ...
@@ -684,7 +684,7 @@ func (s *DockerSchema1RegistrySuite) TestPullFailsWithAlteredLayer(c *testing.T)
684 684
 	// Pull from the registry using the <name>@<digest> reference.
685 685
 	imageReference := fmt.Sprintf("%s@%s", repoName, manifestDigest)
686 686
 	out, exitStatus, _ := dockerCmdWithError("pull", imageReference)
687
-	assert.Assert(c, exitStatus != 0, check.Commentf("expected a non-zero exit status"))
687
+	assert.Assert(c, exitStatus != 0, "expected a non-zero exit status")
688 688
 
689 689
 	expectedErrorMsg := fmt.Sprintf("filesystem layer verification failed for digest %s", targetLayerDigest)
690 690
 	assert.Assert(c, strings.Contains(out, expectedErrorMsg), fmt.Sprintf("expected error message in output: %s", out))
... ...
@@ -246,7 +246,7 @@ func (s *DockerDaemonSuite) TestDaemonRestartWithIncreasedBasesize(c *testing.T)
246 246
 	basesizeAfterRestart := getBaseDeviceSize(c, s.d)
247 247
 	newBasesize, err := convertBasesize(newBasesizeBytes)
248 248
 	assert.Assert(c, err == nil, fmt.Sprintf("Error in converting base device size: %v", err))
249
-	assert.Equal(c, newBasesize, basesizeAfterRestart, check.Commentf("Basesize passed is not equal to Basesize set"))
249
+	assert.Equal(c, newBasesize, basesizeAfterRestart, "Basesize passed is not equal to Basesize set")
250 250
 	s.d.Stop(c)
251 251
 }
252 252
 
... ...
@@ -435,12 +435,12 @@ func (s *DockerDaemonSuite) TestDaemonIPv6FixedCIDR(c *testing.T) {
435 435
 	out = strings.Trim(out, " \r\n'")
436 436
 
437 437
 	ip := net.ParseIP(out)
438
-	assert.Assert(c, ip != nil, check.Commentf("Container should have a global IPv6 address"))
438
+	assert.Assert(c, ip != nil, "Container should have a global IPv6 address")
439 439
 
440 440
 	out, err = s.d.Cmd("inspect", "--format", "{{.NetworkSettings.Networks.bridge.IPv6Gateway}}", "ipv6test")
441 441
 	assert.NilError(c, err, out)
442 442
 
443
-	assert.Equal(c, strings.Trim(out, " \r\n'"), "2001:db8:2::100", check.Commentf("Container should have a global IPv6 gateway"))
443
+	assert.Equal(c, strings.Trim(out, " \r\n'"), "2001:db8:2::100", "Container should have a global IPv6 gateway")
444 444
 }
445 445
 
446 446
 // TestDaemonIPv6FixedCIDRAndMac checks that when the daemon is started with ipv6 fixed CIDR
... ...
@@ -478,7 +478,7 @@ func (s *DockerDaemonSuite) TestDaemonIPv6HostMode(c *testing.T) {
478 478
 }
479 479
 
480 480
 func (s *DockerDaemonSuite) TestDaemonLogLevelWrong(c *testing.T) {
481
-	assert.Assert(c, s.d.StartWithError("--log-level=bogus") != nil, check.Commentf("Daemon shouldn't start with wrong log level"))
481
+	assert.Assert(c, s.d.StartWithError("--log-level=bogus") != nil, "Daemon shouldn't start with wrong log level")
482 482
 }
483 483
 
484 484
 func (s *DockerDaemonSuite) TestDaemonLogLevelDebug(c *testing.T) {
... ...
@@ -845,7 +845,7 @@ func (s *DockerDaemonSuite) TestDaemonIP(c *testing.T) {
845 845
 	defer d.Restart(c)
846 846
 
847 847
 	out, err := d.Cmd("run", "-d", "-p", "8000:8000", "busybox", "top")
848
-	assert.Assert(c, err != nil, check.Commentf("Running a container must fail with an invalid --ip option"))
848
+	assert.Assert(c, err != nil, "Running a container must fail with an invalid --ip option")
849 849
 	assert.Equal(c, strings.Contains(out, "Error starting userland proxy"), true)
850 850
 
851 851
 	ifName := "dummy"
... ...
@@ -1137,7 +1137,7 @@ func (s *DockerDaemonSuite) TestDaemonLoggingDriverNoneLogsError(c *testing.T) {
1137 1137
 	assert.NilError(c, err, out)
1138 1138
 
1139 1139
 	out, err = s.d.Cmd("logs", "test")
1140
-	assert.Assert(c, err != nil, check.Commentf("Logs should fail with 'none' driver"))
1140
+	assert.Assert(c, err != nil, "Logs should fail with 'none' driver")
1141 1141
 	expected := `configured logging driver does not support reading`
1142 1142
 	assert.Assert(c, strings.Contains(out, expected))
1143 1143
 }
... ...
@@ -1631,7 +1631,7 @@ func (s *DockerDaemonSuite) TestDaemonRestartRmVolumeInUse(c *testing.T) {
1631 1631
 	s.d.Restart(c)
1632 1632
 
1633 1633
 	out, err = s.d.Cmd("volume", "rm", "test")
1634
-	assert.Assert(c, err != nil, check.Commentf("should not be able to remove in use volume after daemon restart"))
1634
+	assert.Assert(c, err != nil, "should not be able to remove in use volume after daemon restart")
1635 1635
 	assert.Assert(c, strings.Contains(out, "in use"))
1636 1636
 }
1637 1637
 
... ...
@@ -2194,7 +2194,7 @@ func (s *DockerDaemonSuite) TestDaemonDiscoveryBackendConfigReload(c *testing.T)
2194 2194
 	// daemon config file
2195 2195
 	daemonConfig := `{ "debug" : false }`
2196 2196
 	configFile, err := ioutil.TempFile("", "test-daemon-discovery-backend-config-reload-config")
2197
-	assert.Assert(c, err == nil, check.Commentf("could not create temp file for config reload"))
2197
+	assert.Assert(c, err == nil, "could not create temp file for config reload")
2198 2198
 	configFilePath := configFile.Name()
2199 2199
 	defer func() {
2200 2200
 		configFile.Close()
... ...
@@ -2224,7 +2224,7 @@ func (s *DockerDaemonSuite) TestDaemonDiscoveryBackendConfigReload(c *testing.T)
2224 2224
 	assert.NilError(c, err)
2225 2225
 
2226 2226
 	err = s.d.ReloadConfig()
2227
-	assert.Assert(c, err == nil, check.Commentf("error reloading daemon config"))
2227
+	assert.Assert(c, err == nil, "error reloading daemon config")
2228 2228
 
2229 2229
 	out, err := s.d.Cmd("info")
2230 2230
 	assert.NilError(c, err)
... ...
@@ -2562,15 +2562,15 @@ func (s *DockerDaemonSuite) TestDaemonRestartWithAutoRemoveContainer(c *testing.
2562 2562
 
2563 2563
 	out, err = s.d.Cmd("ps")
2564 2564
 	assert.NilError(c, err)
2565
-	assert.Assert(c, strings.Contains(out, "top1"), check.Commentf("top1 should be running"))
2566
-	assert.Assert(c, strings.Contains(out, "top2"), check.Commentf("top2 should be running"))
2565
+	assert.Assert(c, strings.Contains(out, "top1"), "top1 should be running")
2566
+	assert.Assert(c, strings.Contains(out, "top2"), "top2 should be running")
2567 2567
 	// now restart daemon gracefully
2568 2568
 	s.d.Restart(c)
2569 2569
 
2570 2570
 	out, err = s.d.Cmd("ps", "-a")
2571 2571
 	assert.NilError(c, err, "out: %v", out)
2572
-	assert.Assert(c, strings.Contains(out, "top1"), check.Commentf("top1 should exist after daemon restarts"))
2573
-	assert.Assert(c, !strings.Contains(out, "top2"), check.Commentf("top2 should be removed after daemon restarts"))
2572
+	assert.Assert(c, strings.Contains(out, "top1"), "top1 should exist after daemon restarts")
2573
+	assert.Assert(c, !strings.Contains(out, "top2"), "top2 should be removed after daemon restarts")
2574 2574
 }
2575 2575
 
2576 2576
 func (s *DockerDaemonSuite) TestDaemonRestartSaveContainerExitCode(c *testing.T) {
... ...
@@ -2710,7 +2710,7 @@ func (s *DockerDaemonSuite) TestExecWithUserAfterLiveRestore(c *testing.T) {
2710 2710
 
2711 2711
 	// Wait for shell command to be completed
2712 2712
 	_, 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`)
2713
-	assert.Assert(c, err == nil, check.Commentf("Timeout waiting for shell command to be completed"))
2713
+	assert.Assert(c, err == nil, "Timeout waiting for shell command to be completed")
2714 2714
 
2715 2715
 	out1, err := s.d.Cmd("exec", "-u", "test", "top", "id")
2716 2716
 	// uid=100(test) gid=101(test) groups=101(test)
... ...
@@ -2838,13 +2838,13 @@ func (s *DockerDaemonSuite) TestShmSizeReload(c *testing.T) {
2838 2838
 	testRequires(c, DaemonIsLinux)
2839 2839
 
2840 2840
 	configPath, err := ioutil.TempDir("", "test-daemon-shm-size-reload-config")
2841
-	assert.Assert(c, err == nil, check.Commentf("could not create temp file for config reload"))
2841
+	assert.Assert(c, err == nil, "could not create temp file for config reload")
2842 2842
 	defer os.RemoveAll(configPath) // clean up
2843 2843
 	configFile := filepath.Join(configPath, "config.json")
2844 2844
 
2845 2845
 	size := 67108864 * 2
2846 2846
 	configData := []byte(fmt.Sprintf(`{"default-shm-size": "%dM"}`, size/1024/1024))
2847
-	assert.Assert(c, ioutil.WriteFile(configFile, configData, 0666) == nil, check.Commentf("could not write temp file for config reload"))
2847
+	assert.Assert(c, ioutil.WriteFile(configFile, configData, 0666) == nil, "could not write temp file for config reload")
2848 2848
 	pattern := regexp.MustCompile(fmt.Sprintf("shm on /dev/shm type tmpfs(.*)size=%dk", size/1024))
2849 2849
 
2850 2850
 	s.d.StartWithBusybox(c, "--config-file", configFile)
... ...
@@ -2859,11 +2859,11 @@ func (s *DockerDaemonSuite) TestShmSizeReload(c *testing.T) {
2859 2859
 
2860 2860
 	size = 67108864 * 3
2861 2861
 	configData = []byte(fmt.Sprintf(`{"default-shm-size": "%dM"}`, size/1024/1024))
2862
-	assert.Assert(c, ioutil.WriteFile(configFile, configData, 0666) == nil, check.Commentf("could not write temp file for config reload"))
2862
+	assert.Assert(c, ioutil.WriteFile(configFile, configData, 0666) == nil, "could not write temp file for config reload")
2863 2863
 	pattern = regexp.MustCompile(fmt.Sprintf("shm on /dev/shm type tmpfs(.*)size=%dk", size/1024))
2864 2864
 
2865 2865
 	err = s.d.ReloadConfig()
2866
-	assert.Assert(c, err == nil, check.Commentf("error reloading daemon config"))
2866
+	assert.Assert(c, err == nil, "error reloading daemon config")
2867 2867
 
2868 2868
 	name = "shm2"
2869 2869
 	out, err = s.d.Cmd("run", "--name", name, "busybox", "mount")
... ...
@@ -285,7 +285,7 @@ func (s *DockerExternalVolumeSuite) TestVolumeCLICreateOptionConflict(c *testing
285 285
 	dockerCmd(c, "volume", "create", "test")
286 286
 
287 287
 	out, _, err := dockerCmdWithError("volume", "create", "test", "--driver", volumePluginName)
288
-	assert.Assert(c, err != nil, check.Commentf("volume create exception name already in use with another driver"))
288
+	assert.Assert(c, err != nil, "volume create exception name already in use with another driver")
289 289
 	assert.Assert(c, strings.Contains(out, "must be unique"))
290 290
 	out, _ = dockerCmd(c, "volume", "inspect", "--format={{ .Driver }}", "test")
291 291
 	_, _, err = dockerCmdWithError("volume", "create", "test", "--driver", strings.TrimSpace(out))
... ...
@@ -63,7 +63,7 @@ func (s *DockerSuite) TestHistoryExistentImage(c *testing.T) {
63 63
 
64 64
 func (s *DockerSuite) TestHistoryNonExistentImage(c *testing.T) {
65 65
 	_, _, err := dockerCmdWithError("history", "testHistoryNonExistentImage")
66
-	assert.Assert(c, err != nil, check.Commentf("history on a non-existent image should fail."))
66
+	assert.Assert(c, err != nil, "history on a non-existent image should fail.")
67 67
 }
68 68
 
69 69
 func (s *DockerSuite) TestHistoryImageWithComment(c *testing.T) {
... ...
@@ -36,7 +36,7 @@ func (s *DockerSuite) TestImportDisplay(c *testing.T) {
36 36
 
37 37
 func (s *DockerSuite) TestImportBadURL(c *testing.T) {
38 38
 	out, _, err := dockerCmdWithError("import", "http://nourl/bad")
39
-	assert.Assert(c, err != nil, check.Commentf("import was supposed to fail but didn't"))
39
+	assert.Assert(c, err != nil, "import was supposed to fail but didn't")
40 40
 	// Depending on your system you can get either of these errors
41 41
 	if !strings.Contains(out, "dial tcp") &&
42 42
 		!strings.Contains(out, "ApplyLayer exit status 1 stdout:  stderr: archive/tar: invalid tar header") &&
... ...
@@ -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 == nil, check.Commentf("failed to create temporary file"))
53
+	assert.Assert(c, err == nil, "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 == nil, check.Commentf("failed to create temporary file"))
74
+	assert.Assert(c, err == nil, "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() == nil, check.Commentf("failed to close gzip writer"))
82
+	assert.Assert(c, w.Close() == nil, "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 == nil, check.Commentf("failed to create temporary file"))
97
+	assert.Assert(c, err == nil, "failed to create temporary file")
98 98
 	defer os.Remove(temporaryFile.Name())
99 99
 
100 100
 	icmd.RunCmd(icmd.Cmd{
... ...
@@ -110,11 +110,11 @@ func (s *DockerSuite) TestImportFileWithMessage(c *testing.T) {
110 110
 	out, _ = dockerCmd(c, "history", image)
111 111
 	split := strings.Split(out, "\n")
112 112
 
113
-	assert.Equal(c, len(split), 3, check.Commentf("expected 3 lines from image history"))
113
+	assert.Equal(c, len(split), 3, "expected 3 lines from image history")
114 114
 	r := regexp.MustCompile("[\\s]{2,}")
115 115
 	split = r.Split(split[1], -1)
116 116
 
117
-	assert.Equal(c, message, split[3], check.Commentf("didn't get expected value in commit message"))
117
+	assert.Equal(c, message, split[3], "didn't get expected value in commit message")
118 118
 
119 119
 	out, _ = dockerCmd(c, "run", "--rm", image, "true")
120 120
 	assert.Equal(c, out, "", "command output should've been nothing")
... ...
@@ -122,7 +122,7 @@ func (s *DockerSuite) TestImportFileWithMessage(c *testing.T) {
122 122
 
123 123
 func (s *DockerSuite) TestImportFileNonExistentFile(c *testing.T) {
124 124
 	_, _, err := dockerCmdWithError("import", "example.com/myImage.tar")
125
-	assert.Assert(c, err != nil, check.Commentf("import non-existing file must failed"))
125
+	assert.Assert(c, err != nil, "import non-existing file must failed")
126 126
 }
127 127
 
128 128
 func (s *DockerSuite) TestImportWithQuotedChanges(c *testing.T) {
... ...
@@ -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 == nil, check.Commentf("failed to create temporary file"))
133
+	assert.Assert(c, err == nil, "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)
... ...
@@ -62,7 +62,7 @@ func (s *DockerNetworkSuite) TearDownTest(c *testing.T) {
62 62
 func (s *DockerNetworkSuite) SetUpSuite(c *testing.T) {
63 63
 	mux := http.NewServeMux()
64 64
 	s.server = httptest.NewServer(mux)
65
-	assert.Assert(c, s.server != nil, check.Commentf("Failed to start an HTTP Server"))
65
+	assert.Assert(c, s.server != nil, "Failed to start an HTTP Server")
66 66
 	setupRemoteNetworkDrivers(c, mux, s.server.URL, dummyNetworkDriver, dummyIPAMDriver)
67 67
 }
68 68
 
... ...
@@ -1146,7 +1146,7 @@ func (s *DockerNetworkSuite) TestDockerNetworkDisconnectFromHost(c *testing.T) {
1146 1146
 	dockerCmd(c, "run", "-d", "--name", "container1", "--net=host", "busybox", "top")
1147 1147
 	assert.Assert(c, waitRun("container1") == nil)
1148 1148
 	out, _, err := dockerCmdWithError("network", "disconnect", "host", "container1")
1149
-	assert.Assert(c, err != nil, check.Commentf("Should err out disconnect from host"))
1149
+	assert.Assert(c, err != nil, "Should err out disconnect from host")
1150 1150
 	assert.Assert(c, strings.Contains(out, runconfig.ErrConflictHostNetwork.Error()))
1151 1151
 }
1152 1152
 
... ...
@@ -1219,7 +1219,7 @@ func (s *DockerNetworkSuite) TestDockerNetworkConnectWithMac(c *testing.T) {
1219 1219
 func (s *DockerNetworkSuite) TestDockerNetworkInspectCreatedContainer(c *testing.T) {
1220 1220
 	dockerCmd(c, "create", "--name", "test", "busybox")
1221 1221
 	networks := inspectField(c, "test", "NetworkSettings.Networks")
1222
-	assert.Assert(c, strings.Contains(networks, "bridge"), check.Commentf("Should return 'bridge' network"))
1222
+	assert.Assert(c, strings.Contains(networks, "bridge"), "Should return 'bridge' network")
1223 1223
 }
1224 1224
 
1225 1225
 func (s *DockerNetworkSuite) TestDockerNetworkRestartWithMultipleNetworks(c *testing.T) {
... ...
@@ -1229,8 +1229,8 @@ func (s *DockerNetworkSuite) TestDockerNetworkRestartWithMultipleNetworks(c *tes
1229 1229
 	dockerCmd(c, "network", "connect", "test", "foo")
1230 1230
 	dockerCmd(c, "restart", "foo")
1231 1231
 	networks := inspectField(c, "foo", "NetworkSettings.Networks")
1232
-	assert.Assert(c, strings.Contains(networks, "bridge"), check.Commentf("Should contain 'bridge' network"))
1233
-	assert.Assert(c, strings.Contains(networks, "test"), check.Commentf("Should contain 'test' network"))
1232
+	assert.Assert(c, strings.Contains(networks, "bridge"), "Should contain 'bridge' network")
1233
+	assert.Assert(c, strings.Contains(networks, "test"), "Should contain 'test' network")
1234 1234
 }
1235 1235
 
1236 1236
 func (s *DockerNetworkSuite) TestDockerNetworkConnectDisconnectToStoppedContainer(c *testing.T) {
... ...
@@ -1239,11 +1239,11 @@ func (s *DockerNetworkSuite) TestDockerNetworkConnectDisconnectToStoppedContaine
1239 1239
 	dockerCmd(c, "create", "--name=foo", "busybox", "top")
1240 1240
 	dockerCmd(c, "network", "connect", "test", "foo")
1241 1241
 	networks := inspectField(c, "foo", "NetworkSettings.Networks")
1242
-	assert.Assert(c, strings.Contains(networks, "test"), check.Commentf("Should contain 'test' network"))
1242
+	assert.Assert(c, strings.Contains(networks, "test"), "Should contain 'test' network")
1243 1243
 	// Restart docker daemon to test the config has persisted to disk
1244 1244
 	s.d.Restart(c)
1245 1245
 	networks = inspectField(c, "foo", "NetworkSettings.Networks")
1246
-	assert.Assert(c, strings.Contains(networks, "test"), check.Commentf("Should contain 'test' network"))
1246
+	assert.Assert(c, strings.Contains(networks, "test"), "Should contain 'test' network")
1247 1247
 	// start the container and test if we can ping it from another container in the same network
1248 1248
 	dockerCmd(c, "start", "foo")
1249 1249
 	assert.Assert(c, waitRun("foo") == nil)
... ...
@@ -1256,18 +1256,18 @@ func (s *DockerNetworkSuite) TestDockerNetworkConnectDisconnectToStoppedContaine
1256 1256
 	// Test disconnect
1257 1257
 	dockerCmd(c, "network", "disconnect", "test", "foo")
1258 1258
 	networks = inspectField(c, "foo", "NetworkSettings.Networks")
1259
-	assert.Assert(c, !strings.Contains(networks, "test"), check.Commentf("Should not contain 'test' network"))
1259
+	assert.Assert(c, !strings.Contains(networks, "test"), "Should not contain 'test' network")
1260 1260
 	// Restart docker daemon to test the config has persisted to disk
1261 1261
 	s.d.Restart(c)
1262 1262
 	networks = inspectField(c, "foo", "NetworkSettings.Networks")
1263
-	assert.Assert(c, !strings.Contains(networks, "test"), check.Commentf("Should not contain 'test' network"))
1263
+	assert.Assert(c, !strings.Contains(networks, "test"), "Should not contain 'test' network")
1264 1264
 }
1265 1265
 
1266 1266
 func (s *DockerNetworkSuite) TestDockerNetworkDisconnectContainerNonexistingNetwork(c *testing.T) {
1267 1267
 	dockerCmd(c, "network", "create", "test")
1268 1268
 	dockerCmd(c, "run", "--net=test", "-d", "--name=foo", "busybox", "top")
1269 1269
 	networks := inspectField(c, "foo", "NetworkSettings.Networks")
1270
-	assert.Assert(c, strings.Contains(networks, "test"), check.Commentf("Should contain 'test' network"))
1270
+	assert.Assert(c, strings.Contains(networks, "test"), "Should contain 'test' network")
1271 1271
 	// Stop container and remove network
1272 1272
 	dockerCmd(c, "stop", "foo")
1273 1273
 	dockerCmd(c, "network", "rm", "test")
... ...
@@ -1275,7 +1275,7 @@ func (s *DockerNetworkSuite) TestDockerNetworkDisconnectContainerNonexistingNetw
1275 1275
 	// Test disconnecting stopped container from nonexisting network
1276 1276
 	dockerCmd(c, "network", "disconnect", "-f", "test", "foo")
1277 1277
 	networks = inspectField(c, "foo", "NetworkSettings.Networks")
1278
-	assert.Assert(c, !strings.Contains(networks, "test"), check.Commentf("Should not contain 'test' network"))
1278
+	assert.Assert(c, !strings.Contains(networks, "test"), "Should not contain 'test' network")
1279 1279
 }
1280 1280
 
1281 1281
 func (s *DockerNetworkSuite) TestDockerNetworkConnectPreferredIP(c *testing.T) {
... ...
@@ -1487,7 +1487,7 @@ func (s *DockerNetworkSuite) TestDockerNetworkDisconnectDefault(c *testing.T) {
1487 1487
 	networks := inspectField(c, containerName, "NetworkSettings.Networks")
1488 1488
 	assert.Assert(c, strings.Contains(networks, netWorkName1), fmt.Sprintf(fmt.Sprintf("Should contain '%s' network", netWorkName1)))
1489 1489
 	assert.Assert(c, strings.Contains(networks, netWorkName2), fmt.Sprintf(fmt.Sprintf("Should contain '%s' network", netWorkName2)))
1490
-	assert.Assert(c, !strings.Contains(networks, "bridge"), check.Commentf("Should not contain 'bridge' network"))
1490
+	assert.Assert(c, !strings.Contains(networks, "bridge"), "Should not contain 'bridge' network")
1491 1491
 }
1492 1492
 
1493 1493
 func (s *DockerNetworkSuite) TestDockerNetworkConnectWithAliasOnDefaultNetworks(c *testing.T) {
... ...
@@ -168,7 +168,7 @@ func (ps *DockerPluginSuite) TestPluginSet(c *testing.T) {
168 168
 			{Name: "pdev2", Settable: []string{"path"}}, // Device without Path is invalid.
169 169
 		}
170 170
 	})
171
-	assert.Assert(c, err == nil, check.Commentf("failed to create test plugin"))
171
+	assert.Assert(c, err == nil, "failed to create test plugin")
172 172
 
173 173
 	env, _ := dockerCmd(c, "plugin", "inspect", "-f", "{{.Settings.Env}}", name)
174 174
 	assert.Equal(c, strings.TrimSpace(env), "[DEBUG=0]")
... ...
@@ -338,7 +338,7 @@ func (ps *DockerPluginSuite) TestPluginIDPrefix(c *testing.T) {
338 338
 	})
339 339
 	cancel()
340 340
 
341
-	assert.Assert(c, err == nil, check.Commentf("failed to create test plugin"))
341
+	assert.Assert(c, err == nil, "failed to create test plugin")
342 342
 
343 343
 	// Find ID first
344 344
 	id, _, err := dockerCmdWithError("plugin", "inspect", "-f", "{{.Id}}", name)
... ...
@@ -397,7 +397,7 @@ func (ps *DockerPluginSuite) TestPluginListDefaultFormat(c *testing.T) {
397 397
 	err = plugin.Create(ctx, client, name, func(cfg *plugin.Config) {
398 398
 		cfg.Description = "test plugin"
399 399
 	})
400
-	assert.Assert(c, err == nil, check.Commentf("failed to create test plugin"))
400
+	assert.Assert(c, err == nil, "failed to create test plugin")
401 401
 
402 402
 	out, _ := dockerCmd(c, "plugin", "inspect", "--format", "{{.ID}}", name)
403 403
 	id := strings.TrimSpace(out)
... ...
@@ -336,11 +336,11 @@ func (s *DockerSuite) TestPortBindingOnSandbox(c *testing.T) {
336 336
 	assert.Assert(c, waitRun("c1") == nil)
337 337
 
338 338
 	_, _, err := dockerCmdWithError("run", "--net=host", "busybox", "nc", "localhost", "8080")
339
-	assert.Assert(c, err != nil, check.Commentf("Port mapping on internal network is expected to fail"))
339
+	assert.Assert(c, err != nil, "Port mapping on internal network is expected to fail")
340 340
 	// Connect container to another normal bridge network
341 341
 	dockerCmd(c, "network", "create", "-d", "bridge", "foo-net")
342 342
 	dockerCmd(c, "network", "connect", "foo-net", "c1")
343 343
 
344 344
 	_, _, err = dockerCmdWithError("run", "--net=host", "busybox", "nc", "localhost", "8080")
345
-	assert.Assert(c, err == nil, check.Commentf("Port mapping on the new network is expected to succeed"))
345
+	assert.Assert(c, err == nil, "Port mapping on the new network is expected to succeed")
346 346
 }
... ...
@@ -741,7 +741,7 @@ func (s *DockerSuite) TestPsListContainersFilterNetwork(c *testing.T) {
741 741
 	assert.Equal(c, len(RemoveLinesForExistingElements(lines, existing)), 1)
742 742
 
743 743
 	// Making sure onbridgenetwork is on the output
744
-	assert.Assert(c, strings.Contains(containerOut, "onbridgenetwork"), check.Commentf("Missing the container on network\n"))
744
+	assert.Assert(c, strings.Contains(containerOut, "onbridgenetwork"), "Missing the container on network\n")
745 745
 	// Filter docker ps on networks bridge and none
746 746
 	out, _ = dockerCmd(c, "ps", "--filter", "network=bridge", "--filter", "network=none")
747 747
 	containerOut = strings.TrimSpace(string(out))
... ...
@@ -755,8 +755,8 @@ func (s *DockerSuite) TestPsListContainersFilterNetwork(c *testing.T) {
755 755
 	assert.Equal(c, len(RemoveLinesForExistingElements(lines, existing)), 2)
756 756
 
757 757
 	// Making sure onbridgenetwork and onnonenetwork is on the output
758
-	assert.Assert(c, strings.Contains(containerOut, "onnonenetwork"), check.Commentf("Missing the container on none network\n"))
759
-	assert.Assert(c, strings.Contains(containerOut, "onbridgenetwork"), check.Commentf("Missing the container on bridge network\n"))
758
+	assert.Assert(c, strings.Contains(containerOut, "onnonenetwork"), "Missing the container on none network\n")
759
+	assert.Assert(c, strings.Contains(containerOut, "onbridgenetwork"), "Missing the container on bridge network\n")
760 760
 	nwID, _ := dockerCmd(c, "network", "inspect", "--format", "{{.ID}}", "bridge")
761 761
 
762 762
 	// Filter by network ID
... ...
@@ -780,7 +780,7 @@ func (s *DockerSuite) TestPsListContainersFilterNetwork(c *testing.T) {
780 780
 	assert.Equal(c, len(RemoveLinesForExistingElements(lines, existing)), 1)
781 781
 
782 782
 	// Making sure onbridgenetwork is on the output
783
-	assert.Assert(c, strings.Contains(containerOut, "onbridgenetwork"), check.Commentf("Missing the container on network\n"))
783
+	assert.Assert(c, strings.Contains(containerOut, "onbridgenetwork"), "Missing the container on network\n")
784 784
 }
785 785
 
786 786
 func (s *DockerSuite) TestPsByOrder(c *testing.T) {
... ...
@@ -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 == nil, check.Commentf("error creating revision dir"))
343
+	assert.Assert(c, err == nil, "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 == nil, check.Commentf("error writing revision link"))
346
+	assert.Assert(c, err == nil, "error writing revision link")
347 347
 
348 348
 	// Update tag
349 349
 	tagPath := filepath.Join(registryV2Path, "repositories", remoteRepoName, "_manifests", "tags", "latest", "current", "link")
... ...
@@ -2291,7 +2291,7 @@ func (s *DockerSuite) TestRunAllowPortRangeThroughExpose(c *testing.T) {
2291 2291
 
2292 2292
 func (s *DockerSuite) TestRunExposePort(c *testing.T) {
2293 2293
 	out, _, err := dockerCmdWithError("run", "--expose", "80000", "busybox")
2294
-	assert.Assert(c, err != nil, check.Commentf("--expose with an invalid port should error out"))
2294
+	assert.Assert(c, err != nil, "--expose with an invalid port should error out")
2295 2295
 	assert.Assert(c, strings.Contains(out, "invalid range format for --expose"))
2296 2296
 }
2297 2297
 
... ...
@@ -3207,7 +3207,7 @@ func (s *DockerSuite) TestRunCreateContainerFailedCleanUp(c *testing.T) {
3207 3207
 	testRequires(c, DaemonIsLinux)
3208 3208
 	name := "unique_name"
3209 3209
 	_, _, err := dockerCmdWithError("run", "--name", name, "--link", "nothing:nothing", "busybox")
3210
-	assert.Assert(c, err != nil, check.Commentf("Expected docker run to fail!"))
3210
+	assert.Assert(c, err != nil, "Expected docker run to fail!")
3211 3211
 
3212 3212
 	containerID, err := inspectFieldWithError(name, "Id")
3213 3213
 	assert.Assert(c, err != nil, fmt.Sprintf("Expected not to have this container: %s!", containerID))
... ...
@@ -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 == nil, check.Commentf("Could not open pty"))
38
+		assert.Assert(c, err == nil, "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 == nil, check.Commentf("wait err"))
54
+			assert.Assert(c, err == nil, "wait err")
55 55
 		}
56 56
 	}
57 57
 
... ...
@@ -78,7 +78,7 @@ func (s *DockerSuite) TestRunWithVolumesIsRecursive(c *testing.T) {
78 78
 	defer f.Close()
79 79
 
80 80
 	out, _ := dockerCmd(c, "run", "--name", "test-data", "--volume", fmt.Sprintf("%s:/tmp:ro", tmpDir), "busybox:latest", "ls", "/tmp/tmpfs")
81
-	assert.Assert(c, strings.Contains(out, filepath.Base(f.Name())), check.Commentf("Recursive bind mount test failed. Expected file not found"))
81
+	assert.Assert(c, strings.Contains(out, filepath.Base(f.Name())), "Recursive bind mount test failed. Expected file not found")
82 82
 }
83 83
 
84 84
 func (s *DockerSuite) TestRunDeviceDirectory(c *testing.T) {
... ...
@@ -88,9 +88,9 @@ func (s *DockerSuite) TestRunDeviceDirectory(c *testing.T) {
88 88
 	}
89 89
 
90 90
 	out, _ := dockerCmd(c, "run", "--device", "/dev/snd:/dev/snd", "busybox", "sh", "-c", "ls /dev/snd/")
91
-	assert.Assert(c, strings.Contains(strings.Trim(out, "\r\n"), "timer"), check.Commentf("expected output /dev/snd/timer"))
91
+	assert.Assert(c, strings.Contains(strings.Trim(out, "\r\n"), "timer"), "expected output /dev/snd/timer")
92 92
 	out, _ = dockerCmd(c, "run", "--device", "/dev/snd:/dev/othersnd", "busybox", "sh", "-c", "ls /dev/othersnd/")
93
-	assert.Assert(c, strings.Contains(strings.Trim(out, "\r\n"), "seq"), check.Commentf("expected output /dev/othersnd/seq"))
93
+	assert.Assert(c, strings.Contains(strings.Trim(out, "\r\n"), "seq"), "expected output /dev/othersnd/seq")
94 94
 }
95 95
 
96 96
 // TestRunAttachDetach checks attaching and detaching with the default escape sequence.
... ...
@@ -136,7 +136,7 @@ func (s *DockerSuite) TestRunAttachDetach(c *testing.T) {
136 136
 	}
137 137
 
138 138
 	running := inspectField(c, name, "State.Running")
139
-	assert.Equal(c, running, "true", check.Commentf("expected container to still be running"))
139
+	assert.Equal(c, running, "true", "expected container to still be running")
140 140
 
141 141
 	out, _ = dockerCmd(c, "events", "--since=0", "--until", daemonUnixTime(c), "-f", "container="+name)
142 142
 	// attach and detach event should be monitored
... ...
@@ -202,7 +202,7 @@ func (s *DockerSuite) TestRunAttachDetachFromFlag(c *testing.T) {
202 202
 	}
203 203
 
204 204
 	running := inspectField(c, name, "State.Running")
205
-	assert.Equal(c, running, "true", check.Commentf("expected container to still be running"))
205
+	assert.Equal(c, running, "true", "expected container to still be running")
206 206
 }
207 207
 
208 208
 // TestRunAttachDetachFromInvalidFlag checks attaching and detaching with the escape sequence specified via flags.
... ...
@@ -318,7 +318,7 @@ func (s *DockerSuite) TestRunAttachDetachFromConfig(c *testing.T) {
318 318
 	}
319 319
 
320 320
 	running := inspectField(c, name, "State.Running")
321
-	assert.Equal(c, running, "true", check.Commentf("expected container to still be running"))
321
+	assert.Equal(c, running, "true", "expected container to still be running")
322 322
 }
323 323
 
324 324
 // TestRunAttachDetachKeysOverrideConfig checks attaching and detaching with the detach flags, making sure it overrides config file
... ...
@@ -401,7 +401,7 @@ func (s *DockerSuite) TestRunAttachDetachKeysOverrideConfig(c *testing.T) {
401 401
 	}
402 402
 
403 403
 	running := inspectField(c, name, "State.Running")
404
-	assert.Equal(c, running, "true", check.Commentf("expected container to still be running"))
404
+	assert.Equal(c, running, "true", "expected container to still be running")
405 405
 }
406 406
 
407 407
 func (s *DockerSuite) TestRunAttachInvalidDetachKeySequencePreserved(c *testing.T) {
... ...
@@ -695,11 +695,11 @@ func (s *DockerSuite) TestRunWithMemoryReservationInvalid(c *testing.T) {
695 695
 	out, _, err := dockerCmdWithError("run", "-m", "500M", "--memory-reservation", "800M", "busybox", "true")
696 696
 	assert.ErrorContains(c, err, "")
697 697
 	expected := "Minimum memory limit can not be less than memory reservation limit"
698
-	assert.Assert(c, strings.Contains(strings.TrimSpace(out), expected), check.Commentf("run container should fail with invalid memory reservation"))
698
+	assert.Assert(c, strings.Contains(strings.TrimSpace(out), expected), "run container should fail with invalid memory reservation")
699 699
 	out, _, err = dockerCmdWithError("run", "--memory-reservation", "1k", "busybox", "true")
700 700
 	assert.ErrorContains(c, err, "")
701 701
 	expected = "Minimum memory reservation allowed is 4MB"
702
-	assert.Assert(c, strings.Contains(strings.TrimSpace(out), expected), check.Commentf("run container should fail with invalid memory reservation"))
702
+	assert.Assert(c, strings.Contains(strings.TrimSpace(out), expected), "run container should fail with invalid memory reservation")
703 703
 }
704 704
 
705 705
 func (s *DockerSuite) TestStopContainerSignal(c *testing.T) {
... ...
@@ -711,7 +711,7 @@ func (s *DockerSuite) TestStopContainerSignal(c *testing.T) {
711 711
 	dockerCmd(c, "stop", containerID)
712 712
 	out, _ = dockerCmd(c, "logs", containerID)
713 713
 
714
-	assert.Assert(c, strings.Contains(out, "exit trapped"), check.Commentf("Expected `exit trapped` in the log"))
714
+	assert.Assert(c, strings.Contains(out, "exit trapped"), "Expected `exit trapped` in the log")
715 715
 }
716 716
 
717 717
 func (s *DockerSuite) TestRunSwapLessThanMemoryLimit(c *testing.T) {
... ...
@@ -1386,14 +1386,14 @@ func (s *DockerSuite) TestRunDeviceSymlink(c *testing.T) {
1386 1386
 
1387 1387
 	// md5sum of 'dd if=/dev/zero bs=4K count=8' is bb7df04e1b0a2570657527a7e108ae23
1388 1388
 	out, _ := dockerCmd(c, "run", "--device", symZero+":/dev/symzero", "busybox", "sh", "-c", "dd if=/dev/symzero bs=4K count=8 | md5sum")
1389
-	assert.Assert(c, strings.Contains(strings.Trim(out, "\r\n"), "bb7df04e1b0a2570657527a7e108ae23"), check.Commentf("expected output bb7df04e1b0a2570657527a7e108ae23"))
1389
+	assert.Assert(c, strings.Contains(strings.Trim(out, "\r\n"), "bb7df04e1b0a2570657527a7e108ae23"), "expected output bb7df04e1b0a2570657527a7e108ae23")
1390 1390
 	// symlink "tmpDir/file" to a file "tmpDir/temp" will result in an error as it is not a device.
1391 1391
 	out, _, err = dockerCmdWithError("run", "--device", symFile+":/dev/symzero", "busybox", "sh", "-c", "dd if=/dev/symzero bs=4K count=8 | md5sum")
1392 1392
 	assert.ErrorContains(c, err, "")
1393
-	assert.Assert(c, strings.Contains(strings.Trim(out, "\r\n"), "not a device node"), check.Commentf("expected output 'not a device node'"))
1393
+	assert.Assert(c, strings.Contains(strings.Trim(out, "\r\n"), "not a device node"), "expected output 'not a device node'")
1394 1394
 	// md5sum of 'dd if=/dev/zero bs=4K count=8' is bb7df04e1b0a2570657527a7e108ae23 (this time check with relative path backed, see #22271)
1395 1395
 	out, _ = dockerCmd(c, "run", "--device", "/dev/symzero:/dev/symzero", "busybox", "sh", "-c", "dd if=/dev/symzero bs=4K count=8 | md5sum")
1396
-	assert.Assert(c, strings.Contains(strings.Trim(out, "\r\n"), "bb7df04e1b0a2570657527a7e108ae23"), check.Commentf("expected output bb7df04e1b0a2570657527a7e108ae23"))
1396
+	assert.Assert(c, strings.Contains(strings.Trim(out, "\r\n"), "bb7df04e1b0a2570657527a7e108ae23"), "expected output bb7df04e1b0a2570657527a7e108ae23")
1397 1397
 }
1398 1398
 
1399 1399
 // TestRunPIDsLimit makes sure the pids cgroup is set with --pids-limit
... ...
@@ -129,8 +129,8 @@ func (s *DockerSuite) TestSaveImageId(c *testing.T) {
129 129
 	cleanedShortImageID := strings.TrimSpace(out)
130 130
 
131 131
 	// Make sure IDs are not empty
132
-	assert.Assert(c, cleanedLongImageID != "", check.Commentf("Id should not be empty."))
133
-	assert.Assert(c, cleanedShortImageID != "", check.Commentf("Id should not be empty."))
132
+	assert.Assert(c, cleanedLongImageID != "", "Id should not be empty.")
133
+	assert.Assert(c, cleanedShortImageID != "", "Id should not be empty.")
134 134
 
135 135
 	saveCmd := exec.Command(dockerBinary, "save", cleanedShortImageID)
136 136
 	tarCmd := exec.Command("tar", "t")
... ...
@@ -63,7 +63,7 @@ func countLogLines(d *daemon.Daemon, name string) func(*testing.T) (interface{},
63 63
 		// an array containing emptystring. a valid log line will NEVER be
64 64
 		// emptystring because we ask for the timestamp.
65 65
 		if result.Stdout() == "" {
66
-			return 0, check.Commentf("Empty stdout")
66
+			return 0, "Empty stdout"
67 67
 		}
68 68
 		lines := strings.Split(strings.TrimSpace(result.Stdout()), "\n")
69 69
 		return len(lines), fmt.Sprintf("output, %q", string(result.Stdout()))
... ...
@@ -182,7 +182,7 @@ func (s *DockerSwarmSuite) TestSwarmServiceTemplatingHostname(c *testing.T) {
182 182
 	containers := d.ActiveContainers(c)
183 183
 	out, err = d.Cmd("inspect", "--type", "container", "--format", "{{.Config.Hostname}}", containers[0])
184 184
 	assert.NilError(c, err, out)
185
-	assert.Equal(c, strings.Split(out, "\n")[0], "test-1-"+strings.Split(hostname, "\n")[0], check.Commentf("hostname with templating invalid"))
185
+	assert.Equal(c, strings.Split(out, "\n")[0], "test-1-"+strings.Split(hostname, "\n")[0], "hostname with templating invalid")
186 186
 }
187 187
 
188 188
 // Test case for #24270
... ...
@@ -1223,7 +1223,7 @@ func (s *DockerSwarmSuite) TestSwarmJoinPromoteLocked(c *testing.T) {
1223 1223
 		if err == nil && len(certs) > 0 && len(certs[0].Subject.OrganizationalUnit) > 0 {
1224 1224
 			return certs[0].Subject.OrganizationalUnit[0], nil
1225 1225
 		}
1226
-		return "", check.Commentf("could not get organizational unit from certificate")
1226
+		return "", "could not get organizational unit from certificate"
1227 1227
 	}, checker.Equals, "swarm-worker")
1228 1228
 
1229 1229
 	// by now, it should *never* be locked on restart
... ...
@@ -56,8 +56,8 @@ func (s *DockerDaemonSuite) TestDaemonUserNamespaceRootSetting(c *testing.T) {
56 56
 	// check that the created directory is owned by remapped uid:gid
57 57
 	statNotExists, err := system.Stat(tmpDirNotExists)
58 58
 	assert.NilError(c, err)
59
-	assert.Equal(c, statNotExists.UID(), uint32(uid), check.Commentf("Created directory not owned by remapped root UID"))
60
-	assert.Equal(c, statNotExists.GID(), uint32(gid), check.Commentf("Created directory not owned by remapped root GID"))
59
+	assert.Equal(c, statNotExists.UID(), uint32(uid), "Created directory not owned by remapped root UID")
60
+	assert.Equal(c, statNotExists.GID(), uint32(gid), "Created directory not owned by remapped root GID")
61 61
 
62 62
 	pid, err := s.d.Cmd("inspect", "--format={{.State.Pid}}", "userns")
63 63
 	assert.Assert(c, err == nil, fmt.Sprintf("Could not inspect running container: out: %q", pid))
... ...
@@ -76,8 +76,8 @@ func (s *DockerDaemonSuite) TestDaemonUserNamespaceRootSetting(c *testing.T) {
76 76
 	// check that the touched file is owned by remapped uid:gid
77 77
 	stat, err := system.Stat(filepath.Join(tmpDir, "testfile"))
78 78
 	assert.NilError(c, err)
79
-	assert.Equal(c, stat.UID(), uint32(uid), check.Commentf("Touched file not owned by remapped root UID"))
80
-	assert.Equal(c, stat.GID(), uint32(gid), check.Commentf("Touched file not owned by remapped root GID"))
79
+	assert.Equal(c, stat.UID(), uint32(uid), "Touched file not owned by remapped root UID")
80
+	assert.Equal(c, stat.GID(), uint32(gid), "Touched file not owned by remapped root GID")
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")
... ...
@@ -37,7 +37,7 @@ func (s *DockerSuite) TestVolumeCLICreate(c *testing.T) {
37 37
 }
38 38
 
39 39
 func (s *DockerSuite) TestVolumeCLIInspect(c *testing.T) {
40
-	assert.Assert(c, exec.Command(dockerBinary, "volume", "inspect", "doesnotexist").Run() != nil, check.Commentf("volume inspect should error on non-existent volume"))
40
+	assert.Assert(c, exec.Command(dockerBinary, "volume", "inspect", "doesnotexist").Run() != nil, "volume inspect should error on non-existent volume")
41 41
 	out, _ := dockerCmd(c, "volume", "create")
42 42
 	name := strings.TrimSpace(out)
43 43
 	out, _ = dockerCmd(c, "volume", "inspect", "--format={{ .Name }}", name)
... ...
@@ -134,35 +134,35 @@ func (s *DockerSuite) TestVolumeCLILsFilterDangling(c *testing.T) {
134 134
 	out, _ := dockerCmd(c, "volume", "ls")
135 135
 
136 136
 	// No filter, all volumes should show
137
-	assert.Assert(c, strings.Contains(out, "testnotinuse1\n"), check.Commentf("expected volume 'testnotinuse1' in output"))
138
-	assert.Assert(c, strings.Contains(out, "testisinuse1\n"), check.Commentf("expected volume 'testisinuse1' in output"))
139
-	assert.Assert(c, strings.Contains(out, "testisinuse2\n"), check.Commentf("expected volume 'testisinuse2' in output"))
137
+	assert.Assert(c, strings.Contains(out, "testnotinuse1\n"), "expected volume 'testnotinuse1' in output")
138
+	assert.Assert(c, strings.Contains(out, "testisinuse1\n"), "expected volume 'testisinuse1' in output")
139
+	assert.Assert(c, strings.Contains(out, "testisinuse2\n"), "expected volume 'testisinuse2' in output")
140 140
 	out, _ = dockerCmd(c, "volume", "ls", "--filter", "dangling=false")
141 141
 
142 142
 	// Explicitly disabling dangling
143
-	assert.Assert(c, !strings.Contains(out, "testnotinuse1\n"), check.Commentf("expected volume 'testnotinuse1' in output"))
144
-	assert.Assert(c, strings.Contains(out, "testisinuse1\n"), check.Commentf("expected volume 'testisinuse1' in output"))
145
-	assert.Assert(c, strings.Contains(out, "testisinuse2\n"), check.Commentf("expected volume 'testisinuse2' in output"))
143
+	assert.Assert(c, !strings.Contains(out, "testnotinuse1\n"), "expected volume 'testnotinuse1' in output")
144
+	assert.Assert(c, strings.Contains(out, "testisinuse1\n"), "expected volume 'testisinuse1' in output")
145
+	assert.Assert(c, strings.Contains(out, "testisinuse2\n"), "expected volume 'testisinuse2' in output")
146 146
 	out, _ = dockerCmd(c, "volume", "ls", "--filter", "dangling=true")
147 147
 
148 148
 	// Filter "dangling" volumes; only "dangling" (unused) volumes should be in the output
149
-	assert.Assert(c, strings.Contains(out, "testnotinuse1\n"), check.Commentf("expected volume 'testnotinuse1' in output"))
149
+	assert.Assert(c, strings.Contains(out, "testnotinuse1\n"), "expected volume 'testnotinuse1' in output")
150 150
 	assert.Assert(c, !strings.Contains(out, "testisinuse1\n"), fmt.Sprintf("volume 'testisinuse1' in output, but not expected"))
151 151
 	assert.Assert(c, !strings.Contains(out, "testisinuse2\n"), fmt.Sprintf("volume 'testisinuse2' in output, but not expected"))
152 152
 	out, _ = dockerCmd(c, "volume", "ls", "--filter", "dangling=1")
153 153
 	// Filter "dangling" volumes; only "dangling" (unused) volumes should be in the output, dangling also accept 1
154
-	assert.Assert(c, strings.Contains(out, "testnotinuse1\n"), check.Commentf("expected volume 'testnotinuse1' in output"))
154
+	assert.Assert(c, strings.Contains(out, "testnotinuse1\n"), "expected volume 'testnotinuse1' in output")
155 155
 	assert.Assert(c, !strings.Contains(out, "testisinuse1\n"), fmt.Sprintf("volume 'testisinuse1' in output, but not expected"))
156 156
 	assert.Assert(c, !strings.Contains(out, "testisinuse2\n"), fmt.Sprintf("volume 'testisinuse2' in output, but not expected"))
157 157
 	out, _ = dockerCmd(c, "volume", "ls", "--filter", "dangling=0")
158 158
 	// dangling=0 is same as dangling=false case
159
-	assert.Assert(c, !strings.Contains(out, "testnotinuse1\n"), check.Commentf("expected volume 'testnotinuse1' in output"))
160
-	assert.Assert(c, strings.Contains(out, "testisinuse1\n"), check.Commentf("expected volume 'testisinuse1' in output"))
161
-	assert.Assert(c, strings.Contains(out, "testisinuse2\n"), check.Commentf("expected volume 'testisinuse2' in output"))
159
+	assert.Assert(c, !strings.Contains(out, "testnotinuse1\n"), "expected volume 'testnotinuse1' in output")
160
+	assert.Assert(c, strings.Contains(out, "testisinuse1\n"), "expected volume 'testisinuse1' in output")
161
+	assert.Assert(c, strings.Contains(out, "testisinuse2\n"), "expected volume 'testisinuse2' in output")
162 162
 	out, _ = dockerCmd(c, "volume", "ls", "--filter", "name=testisin")
163
-	assert.Assert(c, !strings.Contains(out, "testnotinuse1\n"), check.Commentf("expected volume 'testnotinuse1' in output"))
164
-	assert.Assert(c, strings.Contains(out, "testisinuse1\n"), check.Commentf("expected volume 'testisinuse1' in output"))
165
-	assert.Assert(c, strings.Contains(out, "testisinuse2\n"), check.Commentf("expected volume 'testisinuse2' in output"))
163
+	assert.Assert(c, !strings.Contains(out, "testnotinuse1\n"), "expected volume 'testnotinuse1' in output")
164
+	assert.Assert(c, strings.Contains(out, "testisinuse1\n"), "expected volume 'testisinuse1' in output")
165
+	assert.Assert(c, strings.Contains(out, "testisinuse2\n"), "expected volume 'testisinuse2' in output")
166 166
 }
167 167
 
168 168
 func (s *DockerSuite) TestVolumeCLILsErrorWithInvalidFilterName(c *testing.T) {
... ...
@@ -201,11 +201,11 @@ func (s *DockerSuite) TestVolumeCLIRm(c *testing.T) {
201 201
 	dockerCmd(c, "rm", "-f", "test")
202 202
 
203 203
 	out, _ = dockerCmd(c, "run", "--name=test2", "-v", volumeID+":"+prefix+"/foo", "busybox", "sh", "-c", "cat /foo/bar")
204
-	assert.Equal(c, strings.TrimSpace(out), "hello", check.Commentf("volume data was removed"))
204
+	assert.Equal(c, strings.TrimSpace(out), "hello", "volume data was removed")
205 205
 	dockerCmd(c, "rm", "test2")
206 206
 
207 207
 	dockerCmd(c, "volume", "rm", volumeID)
208
-	assert.Assert(c, exec.Command("volume", "rm", "doesnotexist").Run() != nil, check.Commentf("volume rm should fail with non-existent volume"))
208
+	assert.Assert(c, exec.Command("volume", "rm", "doesnotexist").Run() != nil, "volume rm should fail with non-existent volume")
209 209
 }
210 210
 
211 211
 // FIXME(vdemeester) should be a unit test in cli/command/volume package
... ...
@@ -316,13 +316,13 @@ func (s *DockerSuite) TestVolumeCLILsFilterLabels(c *testing.T) {
316 316
 	out, _ := dockerCmd(c, "volume", "ls", "--filter", "label=foo")
317 317
 
318 318
 	// filter with label=key
319
-	assert.Assert(c, strings.Contains(out, "testvolcreatelabel-1\n"), check.Commentf("expected volume 'testvolcreatelabel-1' in output"))
320
-	assert.Assert(c, strings.Contains(out, "testvolcreatelabel-2\n"), check.Commentf("expected volume 'testvolcreatelabel-2' in output"))
319
+	assert.Assert(c, strings.Contains(out, "testvolcreatelabel-1\n"), "expected volume 'testvolcreatelabel-1' in output")
320
+	assert.Assert(c, strings.Contains(out, "testvolcreatelabel-2\n"), "expected volume 'testvolcreatelabel-2' in output")
321 321
 	out, _ = dockerCmd(c, "volume", "ls", "--filter", "label=foo=bar1")
322 322
 
323 323
 	// filter with label=key=value
324
-	assert.Assert(c, strings.Contains(out, "testvolcreatelabel-1\n"), check.Commentf("expected volume 'testvolcreatelabel-1' in output"))
325
-	assert.Assert(c, !strings.Contains(out, "testvolcreatelabel-2\n"), check.Commentf("expected volume 'testvolcreatelabel-2 in output"))
324
+	assert.Assert(c, strings.Contains(out, "testvolcreatelabel-1\n"), "expected volume 'testvolcreatelabel-1' in output")
325
+	assert.Assert(c, !strings.Contains(out, "testvolcreatelabel-2\n"), "expected volume 'testvolcreatelabel-2 in output")
326 326
 	out, _ = dockerCmd(c, "volume", "ls", "--filter", "label=non-exist")
327 327
 	outArr := strings.Split(strings.TrimSpace(out), "\n")
328 328
 	assert.Equal(c, len(outArr), 1, fmt.Sprintf("\n%s", out))
... ...
@@ -344,8 +344,8 @@ func (s *DockerSuite) TestVolumeCLILsFilterDrivers(c *testing.T) {
344 344
 
345 345
 	// filter with driver=local
346 346
 	out, _ := dockerCmd(c, "volume", "ls", "--filter", "driver=local")
347
-	assert.Assert(c, strings.Contains(out, "testvol-1\n"), check.Commentf("expected volume 'testvol-1' in output"))
348
-	assert.Assert(c, strings.Contains(out, "testvol-2\n"), check.Commentf("expected volume 'testvol-2' in output"))
347
+	assert.Assert(c, strings.Contains(out, "testvol-1\n"), "expected volume 'testvol-1' in output")
348
+	assert.Assert(c, strings.Contains(out, "testvol-2\n"), "expected volume 'testvol-2' in output")
349 349
 	// filter with driver=invaliddriver
350 350
 	out, _ = dockerCmd(c, "volume", "ls", "--filter", "driver=invaliddriver")
351 351
 	outArr := strings.Split(strings.TrimSpace(out), "\n")
... ...
@@ -264,7 +264,7 @@ func daemonTime(c *testing.T) time.Time {
264 264
 	assert.NilError(c, err)
265 265
 
266 266
 	dt, err := time.Parse(time.RFC3339Nano, info.SystemTime)
267
-	assert.Assert(c, err == nil, check.Commentf("invalid time format in GET /info response"))
267
+	assert.Assert(c, err == nil, "invalid time format in GET /info response")
268 268
 	return dt
269 269
 }
270 270