rm-gocheck: convert check.Commentf to string - other

sed -E -i 's#\bcheck.Commentf\(([^\)]+)\)#\1#g' \
-- "integration-cli/docker_cli_build_unix_test.go" "integration-cli/docker_cli_network_unix_test.go" "integration-cli/docker_cli_plugins_test.go" "integration-cli/docker_cli_run_test.go"

Signed-off-by: Tibor Vass <tibor@docker.com>
This commit is contained in:
Tibor Vass 2019-09-09 21:08:22 +00:00
parent 6135eec30a
commit 6e5cf532af
4 changed files with 5 additions and 5 deletions

View File

@ -56,7 +56,7 @@ func (s *DockerSuite) TestBuildResourceConstraintsAreUsed(c *testing.T) {
var c1 hostConfig
err := json.Unmarshal([]byte(cfg), &c1)
assert.Assert(c, err == nil, check.Commentf(cfg))
assert.Assert(c, err == nil, cfg)
assert.Equal(c, c1.Memory, int64(64*1024*1024), "resource constraints not set properly for Memory")
assert.Equal(c, c1.MemorySwap, int64(-1), "resource constraints not set properly for MemorySwap")
@ -74,7 +74,7 @@ func (s *DockerSuite) TestBuildResourceConstraintsAreUsed(c *testing.T) {
var c2 hostConfig
err = json.Unmarshal([]byte(cfg), &c2)
assert.Assert(c, err == nil, check.Commentf(cfg))
assert.Assert(c, err == nil, cfg)
assert.Assert(c, c2.Memory != int64(64*1024*1024), "resource leaked from build for Memory")
assert.Assert(c, c2.MemorySwap != int64(-1), "resource leaked from build for MemorySwap")

View File

@ -1104,7 +1104,7 @@ func (s *DockerNetworkSuite) TestDockerNetworkMultipleNetworksUngracefulDaemonRe
func (s *DockerNetworkSuite) TestDockerNetworkRunNetByID(c *testing.T) {
out, _ := dockerCmd(c, "network", "create", "one")
containerOut, _, err := dockerCmdWithError("run", "-d", "--net", strings.TrimSpace(out), "busybox", "top")
assert.Assert(c, err == nil, check.Commentf(containerOut))
assert.Assert(c, err == nil, containerOut)
}
func (s *DockerNetworkSuite) TestDockerNetworkHostModeUngracefulDaemonRestart(c *testing.T) {

View File

@ -451,7 +451,7 @@ func (s *DockerSuite) TestPluginMetricsCollector(c *testing.T) {
name := "cpuguy83/docker-metrics-plugin-test:latest"
r := cli.Docker(cli.Args("plugin", "install", "--grant-all-permissions", name), cli.Daemon(d))
assert.Assert(c, r.Error == nil, check.Commentf(r.Combined()))
assert.Assert(c, r.Error == nil, r.Combined())
// plugin lisens on localhost:19393 and proxies the metrics
resp, err := http.Get("http://localhost:19393/metrics")

View File

@ -3635,7 +3635,7 @@ func (s *DockerSuite) TestRunStdinBlockedAfterContainerExit(c *testing.T) {
select {
case err := <-waitChan:
assert.Assert(c, err == nil, check.Commentf(stdout.String()))
assert.Assert(c, err == nil, stdout.String())
case <-time.After(30 * time.Second):
c.Fatal("timeout waiting for command to exit")
}