1
0
mirror of https://github.com/moby/moby.git synced 2025-07-30 18:23:29 +03:00

rm-gocheck: normalize to use checker

sed -E -i 's#\bcheck\.(Equals|DeepEquals|HasLen|IsNil|Matches|Not|NotNil)\b#checker.\1#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_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_images_test.go" "integration-cli/docker_cli_inspect_test.go" "integration-cli/docker_cli_netmode_test.go" "integration-cli/docker_cli_network_unix_test.go" "integration-cli/docker_cli_port_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_health_test.go" "integration-cli/docker_cli_swarm_test.go" "integration-cli/docker_cli_volume_test.go" "integration-cli/docker_utils_test.go" "pkg/discovery/discovery_test.go" "pkg/discovery/file/file_test.go" "pkg/discovery/generator_test.go" "pkg/discovery/kv/kv_test.go" "pkg/discovery/memory/memory_test.go" "pkg/discovery/nodes/nodes_test.go"

Signed-off-by: Tibor Vass <tibor@docker.com>
This commit is contained in:
Tibor Vass
2019-09-09 21:05:56 +00:00
parent a7d144fb34
commit 230f7bcc02
28 changed files with 347 additions and 347 deletions

View File

@ -37,7 +37,7 @@ func (s *DockerSuite) TestCreateArgs(c *testing.T) {
}
err := json.Unmarshal([]byte(out), &containers)
assert.Assert(c, err, check.IsNil, check.Commentf("Error inspecting the container: %s", err))
assert.Assert(c, err, checker.IsNil, check.Commentf("Error inspecting the container: %s", err))
assert.Equal(c, len(containers), 1)
cont := containers[0]
@ -96,11 +96,11 @@ func (s *DockerSuite) TestCreateHostConfig(c *testing.T) {
}
err := json.Unmarshal([]byte(out), &containers)
assert.Assert(c, err, check.IsNil, check.Commentf("Error inspecting the container: %s", err))
assert.Assert(c, err, checker.IsNil, check.Commentf("Error inspecting the container: %s", err))
assert.Equal(c, len(containers), 1)
cont := containers[0]
assert.Assert(c, cont.HostConfig, check.NotNil, check.Commentf("Expected HostConfig, got none"))
assert.Assert(c, cont.HostConfig, checker.NotNil, check.Commentf("Expected HostConfig, got none"))
assert.Assert(c, cont.HostConfig.PublishAllPorts, checker.True, check.Commentf("Expected PublishAllPorts, got false"))
}
@ -117,12 +117,12 @@ func (s *DockerSuite) TestCreateWithPortRange(c *testing.T) {
}
}
err := json.Unmarshal([]byte(out), &containers)
assert.Assert(c, err, check.IsNil, check.Commentf("Error inspecting the container: %s", err))
assert.Assert(c, err, checker.IsNil, check.Commentf("Error inspecting the container: %s", err))
assert.Equal(c, len(containers), 1)
cont := containers[0]
assert.Assert(c, cont.HostConfig, check.NotNil, check.Commentf("Expected HostConfig, got none"))
assert.Assert(c, cont.HostConfig, checker.NotNil, check.Commentf("Expected HostConfig, got none"))
assert.Assert(c, cont.HostConfig.PortBindings, checker.HasLen, 4, check.Commentf("Expected 4 ports bindings, got %d", len(cont.HostConfig.PortBindings)))
for k, v := range cont.HostConfig.PortBindings {
@ -147,11 +147,11 @@ func (s *DockerSuite) TestCreateWithLargePortRange(c *testing.T) {
}
err := json.Unmarshal([]byte(out), &containers)
assert.Assert(c, err, check.IsNil, check.Commentf("Error inspecting the container: %s", err))
assert.Assert(c, err, checker.IsNil, check.Commentf("Error inspecting the container: %s", err))
assert.Equal(c, len(containers), 1)
cont := containers[0]
assert.Assert(c, cont.HostConfig, check.NotNil, check.Commentf("Expected HostConfig, got none"))
assert.Assert(c, cont.HostConfig, checker.NotNil, check.Commentf("Expected HostConfig, got none"))
assert.Assert(c, cont.HostConfig.PortBindings, checker.HasLen, 65535)
for k, v := range cont.HostConfig.PortBindings {
@ -179,7 +179,7 @@ func (s *DockerSuite) TestCreateVolumesCreated(c *testing.T) {
dockerCmd(c, "create", "--name", name, "-v", prefix+slash+"foo", "busybox")
dir, err := inspectMountSourceField(name, prefix+slash+"foo")
assert.Assert(c, err, check.IsNil, check.Commentf("Error getting volume host path: %q", err))
assert.Assert(c, err, checker.IsNil, check.Commentf("Error getting volume host path: %q", err))
if _, err := os.Stat(dir); err != nil && os.IsNotExist(err) {
c.Fatalf("Volume was not created")
@ -354,9 +354,9 @@ exec "$@"`,
out := cli.DockerCmd(c, "create", "--entrypoint=", name, "echo", "foo").Combined()
id := strings.TrimSpace(out)
assert.Assert(c, id, check.Not(check.Equals), "")
assert.Assert(c, id, checker.Not(checker.Equals), "")
out = cli.DockerCmd(c, "start", "-a", id).Combined()
assert.Assert(c, strings.TrimSpace(out), check.Equals, "foo")
assert.Assert(c, strings.TrimSpace(out), checker.Equals, "foo")
}
// #22471