diff options
385 files changed, 1054 insertions, 868 deletions
diff --git a/api/server/middleware/debug_test.go b/api/server/middleware/debug_test.go index fb1740d54a..49b24eec93 100644 --- a/api/server/middleware/debug_test.go +++ b/api/server/middleware/debug_test.go @@ -3,8 +3,8 @@ package middleware // import "github.com/docker/docker/api/server/middleware" import ( "testing" - "gotest.tools/assert" - is "gotest.tools/assert/cmp" + "gotest.tools/v3/assert" + is "gotest.tools/v3/assert/cmp" ) func TestMaskSecretKeys(t *testing.T) { diff --git a/api/server/middleware/version_test.go b/api/server/middleware/version_test.go index e00441d8c4..a102f8e6c4 100644 --- a/api/server/middleware/version_test.go +++ b/api/server/middleware/version_test.go @@ -8,8 +8,8 @@ import ( "testing" "github.com/docker/docker/api/server/httputils" - "gotest.tools/assert" - is "gotest.tools/assert/cmp" + "gotest.tools/v3/assert" + is "gotest.tools/v3/assert/cmp" ) func TestVersionMiddlewareVersion(t *testing.T) { diff --git a/api/types/filters/parse_test.go b/api/types/filters/parse_test.go index aadea040d8..4b68c9685d 100644 --- a/api/types/filters/parse_test.go +++ b/api/types/filters/parse_test.go @@ -4,8 +4,8 @@ import ( "errors" "testing" - "gotest.tools/assert" - is "gotest.tools/assert/cmp" + "gotest.tools/v3/assert" + is "gotest.tools/v3/assert/cmp" ) func TestToJSON(t *testing.T) { diff --git a/builder/dockerfile/buildargs_test.go b/builder/dockerfile/buildargs_test.go index c3b82c83f4..80db8b340e 100644 --- a/builder/dockerfile/buildargs_test.go +++ b/builder/dockerfile/buildargs_test.go @@ -5,8 +5,8 @@ import ( "strings" "testing" - "gotest.tools/assert" - is "gotest.tools/assert/cmp" + "gotest.tools/v3/assert" + is "gotest.tools/v3/assert/cmp" ) func strPtr(source string) *string { diff --git a/builder/dockerfile/copy_test.go b/builder/dockerfile/copy_test.go index f559ff4fd8..84b2a735f7 100644 --- a/builder/dockerfile/copy_test.go +++ b/builder/dockerfile/copy_test.go @@ -5,9 +5,9 @@ import ( "testing" "github.com/docker/docker/pkg/containerfs" - "gotest.tools/assert" - is "gotest.tools/assert/cmp" - "gotest.tools/fs" + "gotest.tools/v3/assert" + is "gotest.tools/v3/assert/cmp" + "gotest.tools/v3/fs" ) func TestIsExistingDirectory(t *testing.T) { diff --git a/builder/dockerfile/dispatchers_test.go b/builder/dockerfile/dispatchers_test.go index fb823ff41c..03e0245c8c 100644 --- a/builder/dockerfile/dispatchers_test.go +++ b/builder/dockerfile/dispatchers_test.go @@ -18,8 +18,8 @@ import ( "github.com/moby/buildkit/frontend/dockerfile/instructions" "github.com/moby/buildkit/frontend/dockerfile/parser" "github.com/moby/buildkit/frontend/dockerfile/shell" - "gotest.tools/assert" - is "gotest.tools/assert/cmp" + "gotest.tools/v3/assert" + is "gotest.tools/v3/assert/cmp" ) func newBuilderWithMockBackend() *Builder { diff --git a/builder/dockerfile/evaluator_test.go b/builder/dockerfile/evaluator_test.go index ebd9d8d7f1..187f867453 100644 --- a/builder/dockerfile/evaluator_test.go +++ b/builder/dockerfile/evaluator_test.go @@ -9,9 +9,9 @@ import ( "github.com/docker/docker/pkg/archive" "github.com/docker/docker/pkg/reexec" "github.com/moby/buildkit/frontend/dockerfile/instructions" - "gotest.tools/assert" - is "gotest.tools/assert/cmp" - "gotest.tools/skip" + "gotest.tools/v3/assert" + is "gotest.tools/v3/assert/cmp" + "gotest.tools/v3/skip" ) type dispatchTestCase struct { diff --git a/builder/dockerfile/imagecontext_test.go b/builder/dockerfile/imagecontext_test.go index d31c9c18c1..ad4de31f2b 100644 --- a/builder/dockerfile/imagecontext_test.go +++ b/builder/dockerfile/imagecontext_test.go @@ -9,7 +9,7 @@ import ( "github.com/docker/docker/builder" "github.com/docker/docker/image" ocispec "github.com/opencontainers/image-spec/specs-go/v1" - "gotest.tools/assert" + "gotest.tools/v3/assert" ) func getMockImageSource(getImageImage builder.Image, getImageLayer builder.ROLayer, getImageError error) *imageSources { diff --git a/builder/dockerfile/internals_linux_test.go b/builder/dockerfile/internals_linux_test.go index 28c9cc81a8..6a2a8f6a89 100644 --- a/builder/dockerfile/internals_linux_test.go +++ b/builder/dockerfile/internals_linux_test.go @@ -7,8 +7,8 @@ import ( "github.com/docker/docker/api/types" "github.com/docker/docker/pkg/idtools" - "gotest.tools/assert" - is "gotest.tools/assert/cmp" + "gotest.tools/v3/assert" + is "gotest.tools/v3/assert/cmp" ) func TestChownFlagParsing(t *testing.T) { diff --git a/builder/dockerfile/internals_test.go b/builder/dockerfile/internals_test.go index 6c8fe94f2e..e480c0e965 100644 --- a/builder/dockerfile/internals_test.go +++ b/builder/dockerfile/internals_test.go @@ -17,9 +17,9 @@ import ( "github.com/docker/docker/pkg/containerfs" "github.com/docker/go-connections/nat" "github.com/opencontainers/go-digest" - "gotest.tools/assert" - is "gotest.tools/assert/cmp" - "gotest.tools/skip" + "gotest.tools/v3/assert" + is "gotest.tools/v3/assert/cmp" + "gotest.tools/v3/skip" ) func TestEmptyDockerfile(t *testing.T) { diff --git a/builder/dockerfile/internals_windows_test.go b/builder/dockerfile/internals_windows_test.go index 4f00623404..1694ee8ac0 100644 --- a/builder/dockerfile/internals_windows_test.go +++ b/builder/dockerfile/internals_windows_test.go @@ -6,8 +6,8 @@ import ( "fmt" "testing" - "gotest.tools/assert" - is "gotest.tools/assert/cmp" + "gotest.tools/v3/assert" + is "gotest.tools/v3/assert/cmp" ) func TestNormalizeDest(t *testing.T) { diff --git a/builder/remotecontext/git/gitutils_test.go b/builder/remotecontext/git/gitutils_test.go index fbbe030764..e5dc053237 100644 --- a/builder/remotecontext/git/gitutils_test.go +++ b/builder/remotecontext/git/gitutils_test.go @@ -14,8 +14,8 @@ import ( "testing" "github.com/google/go-cmp/cmp" - "gotest.tools/assert" - is "gotest.tools/assert/cmp" + "gotest.tools/v3/assert" + is "gotest.tools/v3/assert/cmp" ) func TestParseRemoteURL(t *testing.T) { diff --git a/builder/remotecontext/mimetype_test.go b/builder/remotecontext/mimetype_test.go index df9c378770..cbcf31807a 100644 --- a/builder/remotecontext/mimetype_test.go +++ b/builder/remotecontext/mimetype_test.go @@ -3,8 +3,8 @@ package remotecontext // import "github.com/docker/docker/builder/remotecontext" import ( "testing" - "gotest.tools/assert" - is "gotest.tools/assert/cmp" + "gotest.tools/v3/assert" + is "gotest.tools/v3/assert/cmp" ) func TestDetectContentType(t *testing.T) { diff --git a/builder/remotecontext/remote_test.go b/builder/remotecontext/remote_test.go index b5c2407d48..8e1768c894 100644 --- a/builder/remotecontext/remote_test.go +++ b/builder/remotecontext/remote_test.go @@ -10,9 +10,9 @@ import ( "testing" "github.com/docker/docker/builder" - "gotest.tools/assert" - is "gotest.tools/assert/cmp" - "gotest.tools/fs" + "gotest.tools/v3/assert" + is "gotest.tools/v3/assert/cmp" + "gotest.tools/v3/fs" ) var binaryContext = []byte{0xFD, 0x37, 0x7A, 0x58, 0x5A, 0x00} // xz magic diff --git a/builder/remotecontext/tarsum_test.go b/builder/remotecontext/tarsum_test.go index 46f128d9f0..a98569f800 100644 --- a/builder/remotecontext/tarsum_test.go +++ b/builder/remotecontext/tarsum_test.go @@ -10,7 +10,7 @@ import ( "github.com/docker/docker/pkg/archive" "github.com/docker/docker/pkg/reexec" "github.com/pkg/errors" - "gotest.tools/skip" + "gotest.tools/v3/skip" ) const ( diff --git a/client/client_test.go b/client/client_test.go index 8470143522..5fd819fd1c 100644 --- a/client/client_test.go +++ b/client/client_test.go @@ -13,10 +13,10 @@ import ( "github.com/docker/docker/api" "github.com/docker/docker/api/types" - "gotest.tools/assert" - is "gotest.tools/assert/cmp" - "gotest.tools/env" - "gotest.tools/skip" + "gotest.tools/v3/assert" + is "gotest.tools/v3/assert/cmp" + "gotest.tools/v3/env" + "gotest.tools/v3/skip" ) func TestNewClientWithOpsFromEnv(t *testing.T) { diff --git a/client/config_create_test.go b/client/config_create_test.go index 1960b1736f..24ad5bbf3c 100644 --- a/client/config_create_test.go +++ b/client/config_create_test.go @@ -13,8 +13,8 @@ import ( "github.com/docker/docker/api/types" "github.com/docker/docker/api/types/swarm" "github.com/docker/docker/errdefs" - "gotest.tools/assert" - is "gotest.tools/assert/cmp" + "gotest.tools/v3/assert" + is "gotest.tools/v3/assert/cmp" ) func TestConfigCreateUnsupported(t *testing.T) { diff --git a/client/config_inspect_test.go b/client/config_inspect_test.go index 4dfee3e6a7..d0b9c1dc7c 100644 --- a/client/config_inspect_test.go +++ b/client/config_inspect_test.go @@ -13,8 +13,8 @@ import ( "github.com/docker/docker/api/types/swarm" "github.com/docker/docker/errdefs" "github.com/pkg/errors" - "gotest.tools/assert" - is "gotest.tools/assert/cmp" + "gotest.tools/v3/assert" + is "gotest.tools/v3/assert/cmp" ) func TestConfigInspectNotFound(t *testing.T) { diff --git a/client/config_list_test.go b/client/config_list_test.go index ebaef1c0e2..4799cebb61 100644 --- a/client/config_list_test.go +++ b/client/config_list_test.go @@ -14,8 +14,8 @@ import ( "github.com/docker/docker/api/types/filters" "github.com/docker/docker/api/types/swarm" "github.com/docker/docker/errdefs" - "gotest.tools/assert" - is "gotest.tools/assert/cmp" + "gotest.tools/v3/assert" + is "gotest.tools/v3/assert/cmp" ) func TestConfigListUnsupported(t *testing.T) { diff --git a/client/config_remove_test.go b/client/config_remove_test.go index 15262269ce..8b97db46cb 100644 --- a/client/config_remove_test.go +++ b/client/config_remove_test.go @@ -10,8 +10,8 @@ import ( "testing" "github.com/docker/docker/errdefs" - "gotest.tools/assert" - is "gotest.tools/assert/cmp" + "gotest.tools/v3/assert" + is "gotest.tools/v3/assert/cmp" ) func TestConfigRemoveUnsupported(t *testing.T) { diff --git a/client/config_update_test.go b/client/config_update_test.go index d5111e6bbc..5f1a532541 100644 --- a/client/config_update_test.go +++ b/client/config_update_test.go @@ -11,8 +11,8 @@ import ( "github.com/docker/docker/api/types/swarm" "github.com/docker/docker/errdefs" - "gotest.tools/assert" - is "gotest.tools/assert/cmp" + "gotest.tools/v3/assert" + is "gotest.tools/v3/assert/cmp" ) func TestConfigUpdateUnsupported(t *testing.T) { diff --git a/client/container_logs_test.go b/client/container_logs_test.go index a12bbb97dc..970e69c1a8 100644 --- a/client/container_logs_test.go +++ b/client/container_logs_test.go @@ -15,8 +15,8 @@ import ( "github.com/docker/docker/api/types" "github.com/docker/docker/errdefs" - "gotest.tools/assert" - is "gotest.tools/assert/cmp" + "gotest.tools/v3/assert" + is "gotest.tools/v3/assert/cmp" ) func TestContainerLogsNotFoundError(t *testing.T) { diff --git a/client/container_prune_test.go b/client/container_prune_test.go index 147e904764..6d1060cf52 100644 --- a/client/container_prune_test.go +++ b/client/container_prune_test.go @@ -13,8 +13,8 @@ import ( "github.com/docker/docker/api/types" "github.com/docker/docker/api/types/filters" "github.com/docker/docker/errdefs" - "gotest.tools/assert" - is "gotest.tools/assert/cmp" + "gotest.tools/v3/assert" + is "gotest.tools/v3/assert/cmp" ) func TestContainersPruneError(t *testing.T) { diff --git a/client/container_remove_test.go b/client/container_remove_test.go index d144a8e084..c0504bb8b0 100644 --- a/client/container_remove_test.go +++ b/client/container_remove_test.go @@ -11,8 +11,8 @@ import ( "github.com/docker/docker/api/types" "github.com/docker/docker/errdefs" - "gotest.tools/assert" - is "gotest.tools/assert/cmp" + "gotest.tools/v3/assert" + is "gotest.tools/v3/assert/cmp" ) func TestContainerRemoveError(t *testing.T) { diff --git a/client/distribution_inspect_test.go b/client/distribution_inspect_test.go index a23d5f55d5..bb5eda4ae0 100644 --- a/client/distribution_inspect_test.go +++ b/client/distribution_inspect_test.go @@ -6,8 +6,8 @@ import ( "testing" "github.com/pkg/errors" - "gotest.tools/assert" - is "gotest.tools/assert/cmp" + "gotest.tools/v3/assert" + is "gotest.tools/v3/assert/cmp" ) func TestDistributionInspectUnsupported(t *testing.T) { diff --git a/client/hijack_test.go b/client/hijack_test.go index 69e5b41e2b..c031155d02 100644 --- a/client/hijack_test.go +++ b/client/hijack_test.go @@ -13,7 +13,7 @@ import ( "github.com/docker/docker/api/server/httputils" "github.com/docker/docker/api/types" "github.com/pkg/errors" - "gotest.tools/assert" + "gotest.tools/v3/assert" ) func TestTLSCloseWriter(t *testing.T) { diff --git a/client/image_prune_test.go b/client/image_prune_test.go index 7123898a86..f5f61a8d3c 100644 --- a/client/image_prune_test.go +++ b/client/image_prune_test.go @@ -14,8 +14,8 @@ import ( "github.com/docker/docker/api/types" "github.com/docker/docker/api/types/filters" - "gotest.tools/assert" - is "gotest.tools/assert/cmp" + "gotest.tools/v3/assert" + is "gotest.tools/v3/assert/cmp" ) func TestImagesPruneError(t *testing.T) { diff --git a/client/image_remove_test.go b/client/image_remove_test.go index 3e64e61ec0..e4e3febe27 100644 --- a/client/image_remove_test.go +++ b/client/image_remove_test.go @@ -12,8 +12,8 @@ import ( "github.com/docker/docker/api/types" "github.com/docker/docker/errdefs" - "gotest.tools/assert" - is "gotest.tools/assert/cmp" + "gotest.tools/v3/assert" + is "gotest.tools/v3/assert/cmp" ) func TestImageRemoveError(t *testing.T) { diff --git a/client/network_inspect_test.go b/client/network_inspect_test.go index 24e732de86..f0352e95ff 100644 --- a/client/network_inspect_test.go +++ b/client/network_inspect_test.go @@ -14,8 +14,8 @@ import ( "github.com/docker/docker/api/types/network" "github.com/docker/docker/errdefs" "github.com/pkg/errors" - "gotest.tools/assert" - is "gotest.tools/assert/cmp" + "gotest.tools/v3/assert" + is "gotest.tools/v3/assert/cmp" ) func TestNetworkInspectError(t *testing.T) { diff --git a/client/network_prune_test.go b/client/network_prune_test.go index 3feba2580f..dd09b95fce 100644 --- a/client/network_prune_test.go +++ b/client/network_prune_test.go @@ -13,8 +13,8 @@ import ( "github.com/docker/docker/api/types" "github.com/docker/docker/api/types/filters" "github.com/docker/docker/errdefs" - "gotest.tools/assert" - is "gotest.tools/assert/cmp" + "gotest.tools/v3/assert" + is "gotest.tools/v3/assert/cmp" ) func TestNetworksPruneError(t *testing.T) { diff --git a/client/options_test.go b/client/options_test.go index a0e0b07913..e853357123 100644 --- a/client/options_test.go +++ b/client/options_test.go @@ -4,7 +4,7 @@ import ( "testing" "time" - "gotest.tools/assert" + "gotest.tools/v3/assert" ) func TestOptionWithTimeout(t *testing.T) { diff --git a/client/ping_test.go b/client/ping_test.go index e14933a401..2cb4b06ef9 100644 --- a/client/ping_test.go +++ b/client/ping_test.go @@ -8,8 +8,8 @@ import ( "strings" "testing" - "gotest.tools/assert" - is "gotest.tools/assert/cmp" + "gotest.tools/v3/assert" + is "gotest.tools/v3/assert/cmp" ) // TestPingFail tests that when a server sends a non-successful response that we diff --git a/client/request_test.go b/client/request_test.go index 8a14d1232e..e07c0ebcab 100644 --- a/client/request_test.go +++ b/client/request_test.go @@ -12,8 +12,8 @@ import ( "github.com/docker/docker/api/types" "github.com/docker/docker/errdefs" - "gotest.tools/assert" - is "gotest.tools/assert/cmp" + "gotest.tools/v3/assert" + is "gotest.tools/v3/assert/cmp" ) // TestSetHostHeader should set fake host for local communications, set real host diff --git a/client/secret_create_test.go b/client/secret_create_test.go index e608ba8561..a793eaf321 100644 --- a/client/secret_create_test.go +++ b/client/secret_create_test.go @@ -13,8 +13,8 @@ import ( "github.com/docker/docker/api/types" "github.com/docker/docker/api/types/swarm" "github.com/docker/docker/errdefs" - "gotest.tools/assert" - is "gotest.tools/assert/cmp" + "gotest.tools/v3/assert" + is "gotest.tools/v3/assert/cmp" ) func TestSecretCreateUnsupported(t *testing.T) { diff --git a/client/secret_inspect_test.go b/client/secret_inspect_test.go index 127379091e..ca309d95e3 100644 --- a/client/secret_inspect_test.go +++ b/client/secret_inspect_test.go @@ -13,8 +13,8 @@ import ( "github.com/docker/docker/api/types/swarm" "github.com/docker/docker/errdefs" "github.com/pkg/errors" - "gotest.tools/assert" - is "gotest.tools/assert/cmp" + "gotest.tools/v3/assert" + is "gotest.tools/v3/assert/cmp" ) func TestSecretInspectUnsupported(t *testing.T) { diff --git a/client/secret_list_test.go b/client/secret_list_test.go index 6154405fc5..a5637c6172 100644 --- a/client/secret_list_test.go +++ b/client/secret_list_test.go @@ -14,8 +14,8 @@ import ( "github.com/docker/docker/api/types/filters" "github.com/docker/docker/api/types/swarm" "github.com/docker/docker/errdefs" - "gotest.tools/assert" - is "gotest.tools/assert/cmp" + "gotest.tools/v3/assert" + is "gotest.tools/v3/assert/cmp" ) func TestSecretListUnsupported(t *testing.T) { diff --git a/client/secret_remove_test.go b/client/secret_remove_test.go index b72a30bc40..31e4416331 100644 --- a/client/secret_remove_test.go +++ b/client/secret_remove_test.go @@ -10,8 +10,8 @@ import ( "testing" "github.com/docker/docker/errdefs" - "gotest.tools/assert" - is "gotest.tools/assert/cmp" + "gotest.tools/v3/assert" + is "gotest.tools/v3/assert/cmp" ) func TestSecretRemoveUnsupported(t *testing.T) { diff --git a/client/secret_update_test.go b/client/secret_update_test.go index 7bebbb9996..eca93bcd1f 100644 --- a/client/secret_update_test.go +++ b/client/secret_update_test.go @@ -11,8 +11,8 @@ import ( "github.com/docker/docker/api/types/swarm" "github.com/docker/docker/errdefs" - "gotest.tools/assert" - is "gotest.tools/assert/cmp" + "gotest.tools/v3/assert" + is "gotest.tools/v3/assert/cmp" ) func TestSecretUpdateUnsupported(t *testing.T) { diff --git a/client/service_create_test.go b/client/service_create_test.go index 536b6b63ee..9c7fec41b6 100644 --- a/client/service_create_test.go +++ b/client/service_create_test.go @@ -16,8 +16,8 @@ import ( "github.com/docker/docker/errdefs" digest "github.com/opencontainers/go-digest" v1 "github.com/opencontainers/image-spec/specs-go/v1" - "gotest.tools/assert" - is "gotest.tools/assert/cmp" + "gotest.tools/v3/assert" + is "gotest.tools/v3/assert/cmp" ) func TestServiceCreateError(t *testing.T) { diff --git a/client/service_logs_test.go b/client/service_logs_test.go index 8af5f31963..d7ec806159 100644 --- a/client/service_logs_test.go +++ b/client/service_logs_test.go @@ -15,8 +15,8 @@ import ( "github.com/docker/docker/api/types" "github.com/docker/docker/errdefs" - "gotest.tools/assert" - is "gotest.tools/assert/cmp" + "gotest.tools/v3/assert" + is "gotest.tools/v3/assert/cmp" ) func TestServiceLogsError(t *testing.T) { diff --git a/client/service_remove_test.go b/client/service_remove_test.go index a57f7bb274..ad99b57c28 100644 --- a/client/service_remove_test.go +++ b/client/service_remove_test.go @@ -10,8 +10,8 @@ import ( "testing" "github.com/docker/docker/errdefs" - "gotest.tools/assert" - is "gotest.tools/assert/cmp" + "gotest.tools/v3/assert" + is "gotest.tools/v3/assert/cmp" ) func TestServiceRemoveError(t *testing.T) { diff --git a/client/swarm_get_unlock_key_test.go b/client/swarm_get_unlock_key_test.go index 9a5785036a..2206aad648 100644 --- a/client/swarm_get_unlock_key_test.go +++ b/client/swarm_get_unlock_key_test.go @@ -12,8 +12,8 @@ import ( "github.com/docker/docker/api/types" "github.com/docker/docker/errdefs" - "gotest.tools/assert" - is "gotest.tools/assert/cmp" + "gotest.tools/v3/assert" + is "gotest.tools/v3/assert/cmp" ) func TestSwarmGetUnlockKeyError(t *testing.T) { diff --git a/client/volume_inspect_test.go b/client/volume_inspect_test.go index b78a9e05df..9594caf032 100644 --- a/client/volume_inspect_test.go +++ b/client/volume_inspect_test.go @@ -13,8 +13,8 @@ import ( "github.com/docker/docker/api/types" "github.com/docker/docker/errdefs" "github.com/pkg/errors" - "gotest.tools/assert" - is "gotest.tools/assert/cmp" + "gotest.tools/v3/assert" + is "gotest.tools/v3/assert/cmp" ) func TestVolumeInspectError(t *testing.T) { diff --git a/cmd/dockerd/config_unix_test.go b/cmd/dockerd/config_unix_test.go index 4b5e894beb..b927d11384 100644 --- a/cmd/dockerd/config_unix_test.go +++ b/cmd/dockerd/config_unix_test.go @@ -7,8 +7,8 @@ import ( "github.com/docker/docker/daemon/config" "github.com/spf13/pflag" - "gotest.tools/assert" - is "gotest.tools/assert/cmp" + "gotest.tools/v3/assert" + is "gotest.tools/v3/assert/cmp" ) func TestDaemonParseShmSize(t *testing.T) { diff --git a/cmd/dockerd/daemon_test.go b/cmd/dockerd/daemon_test.go index fd167654af..c4dcda87be 100644 --- a/cmd/dockerd/daemon_test.go +++ b/cmd/dockerd/daemon_test.go @@ -6,9 +6,9 @@ import ( "github.com/docker/docker/daemon/config" "github.com/sirupsen/logrus" "github.com/spf13/pflag" - "gotest.tools/assert" - is "gotest.tools/assert/cmp" - "gotest.tools/fs" + "gotest.tools/v3/assert" + is "gotest.tools/v3/assert/cmp" + "gotest.tools/v3/fs" ) func defaultOptions(t *testing.T, configFile string) *daemonOptions { diff --git a/cmd/dockerd/daemon_unix_test.go b/cmd/dockerd/daemon_unix_test.go index be8474f040..ce9354540c 100644 --- a/cmd/dockerd/daemon_unix_test.go +++ b/cmd/dockerd/daemon_unix_test.go @@ -6,9 +6,9 @@ import ( "testing" "github.com/docker/docker/daemon/config" - "gotest.tools/assert" - is "gotest.tools/assert/cmp" - "gotest.tools/fs" + "gotest.tools/v3/assert" + is "gotest.tools/v3/assert/cmp" + "gotest.tools/v3/fs" ) func TestLoadDaemonCliConfigWithDaemonFlags(t *testing.T) { diff --git a/cmd/dockerd/options_test.go b/cmd/dockerd/options_test.go index 691118f08f..604a902bb5 100644 --- a/cmd/dockerd/options_test.go +++ b/cmd/dockerd/options_test.go @@ -7,8 +7,8 @@ import ( cliconfig "github.com/docker/docker/cli/config" "github.com/docker/docker/daemon/config" "github.com/spf13/pflag" - "gotest.tools/assert" - is "gotest.tools/assert/cmp" + "gotest.tools/v3/assert" + is "gotest.tools/v3/assert/cmp" ) func TestCommonOptionsInstallFlags(t *testing.T) { diff --git a/container/container_unit_test.go b/container/container_unit_test.go index 82b5864760..1314f37f43 100644 --- a/container/container_unit_test.go +++ b/container/container_unit_test.go @@ -11,7 +11,7 @@ import ( swarmtypes "github.com/docker/docker/api/types/swarm" "github.com/docker/docker/daemon/logger/jsonfilelog" "github.com/docker/docker/pkg/signal" - "gotest.tools/assert" + "gotest.tools/v3/assert" ) func TestContainerStopSignal(t *testing.T) { diff --git a/container/view_test.go b/container/view_test.go index 54be5b90e3..4bd639bae9 100644 --- a/container/view_test.go +++ b/container/view_test.go @@ -9,8 +9,8 @@ import ( "github.com/docker/docker/api/types" containertypes "github.com/docker/docker/api/types/container" "github.com/google/uuid" - "gotest.tools/assert" - is "gotest.tools/assert/cmp" + "gotest.tools/v3/assert" + is "gotest.tools/v3/assert/cmp" ) var root string diff --git a/daemon/cluster/convert/service_test.go b/daemon/cluster/convert/service_test.go index 9c4284bd71..2b4ef94eee 100644 --- a/daemon/cluster/convert/service_test.go +++ b/daemon/cluster/convert/service_test.go @@ -8,7 +8,7 @@ import ( "github.com/docker/docker/api/types/swarm/runtime" swarmapi "github.com/docker/swarmkit/api" google_protobuf3 "github.com/gogo/protobuf/types" - "gotest.tools/assert" + "gotest.tools/v3/assert" ) func TestServiceConvertFromGRPCRuntimeContainer(t *testing.T) { diff --git a/daemon/cluster/executor/container/container_test.go b/daemon/cluster/executor/container/container_test.go index 6a9a72d39b..88ba8beb1c 100644 --- a/daemon/cluster/executor/container/container_test.go +++ b/daemon/cluster/executor/container/container_test.go @@ -5,7 +5,7 @@ import ( "github.com/docker/docker/api/types/container" swarmapi "github.com/docker/swarmkit/api" - "gotest.tools/assert" + "gotest.tools/v3/assert" ) func TestIsolationConversion(t *testing.T) { diff --git a/daemon/config/builder_test.go b/daemon/config/builder_test.go index db3225fdd0..6b4576446b 100644 --- a/daemon/config/builder_test.go +++ b/daemon/config/builder_test.go @@ -5,8 +5,8 @@ import ( "github.com/docker/docker/api/types/filters" "github.com/google/go-cmp/cmp" - "gotest.tools/assert" - "gotest.tools/fs" + "gotest.tools/v3/assert" + "gotest.tools/v3/fs" ) func TestBuilderGC(t *testing.T) { diff --git a/daemon/config/config_test.go b/daemon/config/config_test.go index b27548b200..76a0119909 100644 --- a/daemon/config/config_test.go +++ b/daemon/config/config_test.go @@ -9,10 +9,10 @@ import ( "github.com/docker/docker/daemon/discovery" "github.com/docker/docker/opts" "github.com/spf13/pflag" - "gotest.tools/assert" - is "gotest.tools/assert/cmp" - "gotest.tools/fs" - "gotest.tools/skip" + "gotest.tools/v3/assert" + is "gotest.tools/v3/assert/cmp" + "gotest.tools/v3/fs" + "gotest.tools/v3/skip" ) func TestDaemonConfigurationNotFound(t *testing.T) { diff --git a/daemon/config/config_unix_test.go b/daemon/config/config_unix_test.go index 3824918f5e..3e5c366c6e 100644 --- a/daemon/config/config_unix_test.go +++ b/daemon/config/config_unix_test.go @@ -8,9 +8,9 @@ import ( "github.com/docker/docker/opts" units "github.com/docker/go-units" "github.com/spf13/pflag" - "gotest.tools/assert" - is "gotest.tools/assert/cmp" - "gotest.tools/fs" + "gotest.tools/v3/assert" + is "gotest.tools/v3/assert/cmp" + "gotest.tools/v3/fs" ) func TestGetConflictFreeConfiguration(t *testing.T) { diff --git a/daemon/config/config_windows_test.go b/daemon/config/config_windows_test.go index 09417ee388..ad75104cf0 100644 --- a/daemon/config/config_windows_test.go +++ b/daemon/config/config_windows_test.go @@ -8,8 +8,8 @@ import ( "github.com/docker/docker/opts" "github.com/spf13/pflag" - "gotest.tools/assert" - is "gotest.tools/assert/cmp" + "gotest.tools/v3/assert" + is "gotest.tools/v3/assert/cmp" ) func TestDaemonConfigurationMerge(t *testing.T) { diff --git a/daemon/container_unix_test.go b/daemon/container_unix_test.go index b2354d7f13..4b35f63db0 100644 --- a/daemon/container_unix_test.go +++ b/daemon/container_unix_test.go @@ -9,7 +9,7 @@ import ( containertypes "github.com/docker/docker/api/types/container" "github.com/docker/docker/daemon/config" "github.com/docker/go-connections/nat" - "gotest.tools/assert" + "gotest.tools/v3/assert" ) // TestContainerWarningHostAndPublishPorts that a warning is returned when setting network mode to host and specifying published ports. diff --git a/daemon/create_test.go b/daemon/create_test.go index 3dba847d46..5abe24d2cf 100644 --- a/daemon/create_test.go +++ b/daemon/create_test.go @@ -5,7 +5,7 @@ import ( "github.com/docker/docker/api/types/network" "github.com/docker/docker/errdefs" - "gotest.tools/assert" + "gotest.tools/v3/assert" ) // Test case for 35752 diff --git a/daemon/daemon_linux_test.go b/daemon/daemon_linux_test.go index e26c08f24e..da8ebf1b78 100644 --- a/daemon/daemon_linux_test.go +++ b/daemon/daemon_linux_test.go @@ -12,8 +12,8 @@ import ( containertypes "github.com/docker/docker/api/types/container" "github.com/docker/docker/daemon/config" "github.com/docker/docker/pkg/mount" - "gotest.tools/assert" - is "gotest.tools/assert/cmp" + "gotest.tools/v3/assert" + is "gotest.tools/v3/assert/cmp" ) const mountsFixture = `142 78 0:38 / / rw,relatime - aufs none rw,si=573b861da0b3a05b,dio diff --git a/daemon/daemon_test.go b/daemon/daemon_test.go index d89b0077fd..d8d19a4ad1 100644 --- a/daemon/daemon_test.go +++ b/daemon/daemon_test.go @@ -17,8 +17,8 @@ import ( "github.com/docker/go-connections/nat" "github.com/docker/libnetwork" "github.com/pkg/errors" - "gotest.tools/assert" - is "gotest.tools/assert/cmp" + "gotest.tools/v3/assert" + is "gotest.tools/v3/assert/cmp" ) // diff --git a/daemon/daemon_unix_test.go b/daemon/daemon_unix_test.go index 7f4b5755d7..3f41a3e7c7 100644 --- a/daemon/daemon_unix_test.go +++ b/daemon/daemon_unix_test.go @@ -15,8 +15,8 @@ import ( "github.com/docker/docker/daemon/config" "github.com/docker/docker/pkg/sysinfo" "golang.org/x/sys/unix" - "gotest.tools/assert" - is "gotest.tools/assert/cmp" + "gotest.tools/v3/assert" + is "gotest.tools/v3/assert/cmp" ) type fakeContainerGetter struct { diff --git a/daemon/delete_test.go b/daemon/delete_test.go index d600917b0c..6c10987a3c 100644 --- a/daemon/delete_test.go +++ b/daemon/delete_test.go @@ -9,8 +9,8 @@ import ( "github.com/docker/docker/api/types" containertypes "github.com/docker/docker/api/types/container" "github.com/docker/docker/container" - "gotest.tools/assert" - is "gotest.tools/assert/cmp" + "gotest.tools/v3/assert" + is "gotest.tools/v3/assert/cmp" ) func newDaemonWithTmpRoot(t *testing.T) (*Daemon, func()) { diff --git a/daemon/discovery/discovery_test.go b/daemon/discovery/discovery_test.go index c354a2918d..cc5f34a718 100644 --- a/daemon/discovery/discovery_test.go +++ b/daemon/discovery/discovery_test.go @@ -5,8 +5,8 @@ import ( "testing" "time" - "gotest.tools/assert" - is "gotest.tools/assert/cmp" + "gotest.tools/v3/assert" + is "gotest.tools/v3/assert/cmp" ) func TestDiscoveryOptsErrors(t *testing.T) { diff --git a/daemon/exec_linux_test.go b/daemon/exec_linux_test.go index 89f2dfb5e5..fe37ead115 100644 --- a/daemon/exec_linux_test.go +++ b/daemon/exec_linux_test.go @@ -10,7 +10,7 @@ import ( "github.com/docker/docker/daemon/exec" "github.com/opencontainers/runc/libcontainer/apparmor" specs "github.com/opencontainers/runtime-spec/specs-go" - "gotest.tools/assert" + "gotest.tools/v3/assert" ) func TestExecSetPlatformOpt(t *testing.T) { diff --git a/daemon/graphdriver/aufs/aufs_test.go b/daemon/graphdriver/aufs/aufs_test.go index b5d952475f..e39caa1b49 100644 --- a/daemon/graphdriver/aufs/aufs_test.go +++ b/daemon/graphdriver/aufs/aufs_test.go @@ -17,8 +17,8 @@ import ( "github.com/docker/docker/pkg/archive" "github.com/docker/docker/pkg/reexec" "github.com/docker/docker/pkg/stringid" - "gotest.tools/assert" - is "gotest.tools/assert/cmp" + "gotest.tools/v3/assert" + is "gotest.tools/v3/assert/cmp" ) var ( diff --git a/daemon/graphdriver/copy/copy_test.go b/daemon/graphdriver/copy/copy_test.go index cc5184b503..491bf78c9a 100644 --- a/daemon/graphdriver/copy/copy_test.go +++ b/daemon/graphdriver/copy/copy_test.go @@ -14,8 +14,8 @@ import ( "github.com/docker/docker/pkg/system" "golang.org/x/sys/unix" - "gotest.tools/assert" - is "gotest.tools/assert/cmp" + "gotest.tools/v3/assert" + is "gotest.tools/v3/assert/cmp" ) func TestCopy(t *testing.T) { diff --git a/daemon/graphdriver/driver_test.go b/daemon/graphdriver/driver_test.go index e6f973c397..e89165f540 100644 --- a/daemon/graphdriver/driver_test.go +++ b/daemon/graphdriver/driver_test.go @@ -6,7 +6,7 @@ import ( "path/filepath" "testing" - "gotest.tools/assert" + "gotest.tools/v3/assert" ) func TestIsEmptyDir(t *testing.T) { diff --git a/daemon/graphdriver/graphtest/graphbench_unix.go b/daemon/graphdriver/graphtest/graphbench_unix.go index 44e36b1b12..60db16de67 100644 --- a/daemon/graphdriver/graphtest/graphbench_unix.go +++ b/daemon/graphdriver/graphtest/graphbench_unix.go @@ -9,7 +9,7 @@ import ( contdriver "github.com/containerd/continuity/driver" "github.com/docker/docker/pkg/stringid" - "gotest.tools/assert" + "gotest.tools/v3/assert" ) // DriverBenchExists benchmarks calls to exist diff --git a/daemon/graphdriver/graphtest/graphtest_unix.go b/daemon/graphdriver/graphtest/graphtest_unix.go index 348fc8692d..aae88615a0 100644 --- a/daemon/graphdriver/graphtest/graphtest_unix.go +++ b/daemon/graphdriver/graphtest/graphtest_unix.go @@ -17,8 +17,8 @@ import ( "github.com/docker/docker/pkg/stringid" units "github.com/docker/go-units" "golang.org/x/sys/unix" - "gotest.tools/assert" - is "gotest.tools/assert/cmp" + "gotest.tools/v3/assert" + is "gotest.tools/v3/assert/cmp" ) var ( diff --git a/daemon/graphdriver/graphtest/testutil_unix.go b/daemon/graphdriver/graphtest/testutil_unix.go index 6871dca09a..d5788f5525 100644 --- a/daemon/graphdriver/graphtest/testutil_unix.go +++ b/daemon/graphdriver/graphtest/testutil_unix.go @@ -10,8 +10,8 @@ import ( contdriver "github.com/containerd/continuity/driver" "github.com/docker/docker/daemon/graphdriver" "golang.org/x/sys/unix" - "gotest.tools/assert" - is "gotest.tools/assert/cmp" + "gotest.tools/v3/assert" + is "gotest.tools/v3/assert/cmp" ) func verifyFile(t testing.TB, path string, mode os.FileMode, uid, gid uint32) { diff --git a/daemon/graphdriver/quota/projectquota_test.go b/daemon/graphdriver/quota/projectquota_test.go index aa164cc419..632ea6d14e 100644 --- a/daemon/graphdriver/quota/projectquota_test.go +++ b/daemon/graphdriver/quota/projectquota_test.go @@ -11,9 +11,9 @@ import ( "testing" "golang.org/x/sys/unix" - "gotest.tools/assert" - is "gotest.tools/assert/cmp" - "gotest.tools/fs" + "gotest.tools/v3/assert" + is "gotest.tools/v3/assert/cmp" + "gotest.tools/v3/fs" ) // 10MB diff --git a/daemon/info_test.go b/daemon/info_test.go index 076373cba2..e9441151a9 100644 --- a/daemon/info_test.go +++ b/daemon/info_test.go @@ -3,7 +3,7 @@ package daemon import ( "testing" - "gotest.tools/assert" + "gotest.tools/v3/assert" ) func TestMaskURLCredentials(t *testing.T) { diff --git a/daemon/info_unix_test.go b/daemon/info_unix_test.go index c1636187ad..642b38fa7e 100644 --- a/daemon/info_unix_test.go +++ b/daemon/info_unix_test.go @@ -5,8 +5,8 @@ package daemon // import "github.com/docker/docker/daemon" import ( "testing" - "gotest.tools/assert" - is "gotest.tools/assert/cmp" + "gotest.tools/v3/assert" + is "gotest.tools/v3/assert/cmp" ) func TestParseInitVersion(t *testing.T) { diff --git a/daemon/inspect_test.go b/daemon/inspect_test.go index f402a7af99..07c026b723 100644 --- a/daemon/inspect_test.go +++ b/daemon/inspect_test.go @@ -7,8 +7,8 @@ import ( "github.com/docker/docker/container" "github.com/docker/docker/daemon/config" "github.com/docker/docker/daemon/exec" - "gotest.tools/assert" - is "gotest.tools/assert/cmp" + "gotest.tools/v3/assert" + is "gotest.tools/v3/assert/cmp" ) func TestGetInspectData(t *testing.T) { diff --git a/daemon/licensing_test.go b/daemon/licensing_test.go index 5e0a5affb1..902b3c166e 100644 --- a/daemon/licensing_test.go +++ b/daemon/licensing_test.go @@ -5,7 +5,7 @@ import ( "github.com/docker/docker/api/types" "github.com/docker/docker/dockerversion" - "gotest.tools/assert" + "gotest.tools/v3/assert" ) func TestFillLicense(t *testing.T) { diff --git a/daemon/list_test.go b/daemon/list_test.go index 4a8d4cc0b2..7c03588d49 100644 --- a/daemon/list_test.go +++ b/daemon/list_test.go @@ -13,8 +13,8 @@ import ( "github.com/docker/docker/image" "github.com/google/uuid" digest "github.com/opencontainers/go-digest" - "gotest.tools/assert" - is "gotest.tools/assert/cmp" + "gotest.tools/v3/assert" + is "gotest.tools/v3/assert/cmp" ) var root string diff --git a/daemon/logger/adapter_test.go b/daemon/logger/adapter_test.go index d14a48e477..1ca28de6d9 100644 --- a/daemon/logger/adapter_test.go +++ b/daemon/logger/adapter_test.go @@ -9,8 +9,8 @@ import ( "github.com/docker/docker/api/types/plugins/logdriver" protoio "github.com/gogo/protobuf/io" - "gotest.tools/assert" - is "gotest.tools/assert/cmp" + "gotest.tools/v3/assert" + is "gotest.tools/v3/assert/cmp" ) // mockLoggingPlugin implements the loggingPlugin interface for testing purposes diff --git a/daemon/logger/awslogs/cloudwatchlogs_test.go b/daemon/logger/awslogs/cloudwatchlogs_test.go index b9c567e085..80a2da1395 100644 --- a/daemon/logger/awslogs/cloudwatchlogs_test.go +++ b/daemon/logger/awslogs/cloudwatchlogs_test.go @@ -22,8 +22,8 @@ import ( "github.com/docker/docker/daemon/logger" "github.com/docker/docker/daemon/logger/loggerutils" "github.com/docker/docker/dockerversion" - "gotest.tools/assert" - is "gotest.tools/assert/cmp" + "gotest.tools/v3/assert" + is "gotest.tools/v3/assert/cmp" ) const ( diff --git a/daemon/logger/jsonfilelog/jsonfilelog_test.go b/daemon/logger/jsonfilelog/jsonfilelog_test.go index 155086dec6..de875832f2 100644 --- a/daemon/logger/jsonfilelog/jsonfilelog_test.go +++ b/daemon/logger/jsonfilelog/jsonfilelog_test.go @@ -15,9 +15,9 @@ import ( "github.com/docker/docker/daemon/logger" "github.com/docker/docker/daemon/logger/jsonfilelog/jsonlog" - "gotest.tools/assert" - is "gotest.tools/assert/cmp" - "gotest.tools/fs" + "gotest.tools/v3/assert" + is "gotest.tools/v3/assert/cmp" + "gotest.tools/v3/fs" ) func TestJSONFileLogger(t *testing.T) { diff --git a/daemon/logger/jsonfilelog/jsonlog/jsonlogbytes_test.go b/daemon/logger/jsonfilelog/jsonlog/jsonlogbytes_test.go index d268db4df0..125c2b0576 100644 --- a/daemon/logger/jsonfilelog/jsonlog/jsonlogbytes_test.go +++ b/daemon/logger/jsonfilelog/jsonlog/jsonlogbytes_test.go @@ -8,7 +8,7 @@ import ( "testing" "time" - "gotest.tools/assert" + "gotest.tools/v3/assert" ) func TestJSONLogsMarshalJSONBuf(t *testing.T) { diff --git a/daemon/logger/jsonfilelog/jsonlog/time_marshalling_test.go b/daemon/logger/jsonfilelog/jsonlog/time_marshalling_test.go index b3959b0467..ee2a2709fd 100644 --- a/daemon/logger/jsonfilelog/jsonlog/time_marshalling_test.go +++ b/daemon/logger/jsonfilelog/jsonlog/time_marshalling_test.go @@ -4,8 +4,8 @@ import ( "testing" "time" - "gotest.tools/assert" - is "gotest.tools/assert/cmp" + "gotest.tools/v3/assert" + is "gotest.tools/v3/assert/cmp" ) func TestFastTimeMarshalJSONWithInvalidYear(t *testing.T) { diff --git a/daemon/logger/jsonfilelog/read_test.go b/daemon/logger/jsonfilelog/read_test.go index 0206ecb835..c15cfd453c 100644 --- a/daemon/logger/jsonfilelog/read_test.go +++ b/daemon/logger/jsonfilelog/read_test.go @@ -7,8 +7,8 @@ import ( "time" "github.com/docker/docker/daemon/logger" - "gotest.tools/assert" - "gotest.tools/fs" + "gotest.tools/v3/assert" + "gotest.tools/v3/fs" ) func BenchmarkJSONFileLoggerReadLogs(b *testing.B) { diff --git a/daemon/logger/local/local_test.go b/daemon/logger/local/local_test.go index 6e0520d75e..48df6256a7 100644 --- a/daemon/logger/local/local_test.go +++ b/daemon/logger/local/local_test.go @@ -20,8 +20,8 @@ import ( "github.com/docker/docker/api/types/plugins/logdriver" "github.com/docker/docker/daemon/logger" protoio "github.com/gogo/protobuf/io" - "gotest.tools/assert" - is "gotest.tools/assert/cmp" + "gotest.tools/v3/assert" + is "gotest.tools/v3/assert/cmp" ) func TestWriteLog(t *testing.T) { diff --git a/daemon/logger/loggerutils/file_windows_test.go b/daemon/logger/loggerutils/file_windows_test.go index a7e69097b5..5b83753909 100644 --- a/daemon/logger/loggerutils/file_windows_test.go +++ b/daemon/logger/loggerutils/file_windows_test.go @@ -6,7 +6,7 @@ import ( "path/filepath" "testing" - "gotest.tools/assert" + "gotest.tools/v3/assert" ) func TestOpenFileDelete(t *testing.T) { diff --git a/daemon/logger/loggerutils/logfile_test.go b/daemon/logger/loggerutils/logfile_test.go index ae3a74ced7..2d6c704c84 100644 --- a/daemon/logger/loggerutils/logfile_test.go +++ b/daemon/logger/loggerutils/logfile_test.go @@ -12,7 +12,7 @@ import ( "github.com/docker/docker/daemon/logger" "github.com/docker/docker/pkg/tailfile" - "gotest.tools/assert" + "gotest.tools/v3/assert" ) func TestTailFiles(t *testing.T) { diff --git a/daemon/logger/splunk/splunk_test.go b/daemon/logger/splunk/splunk_test.go index fa9b6cb6bf..50355b156b 100644 --- a/daemon/logger/splunk/splunk_test.go +++ b/daemon/logger/splunk/splunk_test.go @@ -11,8 +11,8 @@ import ( "time" "github.com/docker/docker/daemon/logger" - "gotest.tools/assert" - "gotest.tools/env" + "gotest.tools/v3/assert" + "gotest.tools/v3/env" ) // Validate options @@ -30,10 +30,10 @@ func TestValidateLogOpt(t *testing.T) { splunkVerifyConnectionKey: "true", splunkGzipCompressionKey: "true", splunkGzipCompressionLevelKey: "1", - envKey: "a", - envRegexKey: "^foo", - labelsKey: "b", - tagKey: "c", + envKey: "a", + envRegexKey: "^foo", + labelsKey: "b", + tagKey: "c", }) if err != nil { t.Fatal(err) @@ -251,9 +251,9 @@ func TestInlineFormatWithNonDefaultOptions(t *testing.T) { splunkIndexKey: "myindex", splunkFormatKey: splunkFormatInline, splunkGzipCompressionKey: "true", - tagKey: "{{.ImageName}}/{{.Name}}", - labelsKey: "a", - envRegexKey: "^foo", + tagKey: "{{.ImageName}}/{{.Name}}", + labelsKey: "a", + envRegexKey: "^foo", }, ContainerID: "containeriid", ContainerName: "/container_name", diff --git a/daemon/logger/templates/templates_test.go b/daemon/logger/templates/templates_test.go index 25e7c88750..2f8fad10d0 100644 --- a/daemon/logger/templates/templates_test.go +++ b/daemon/logger/templates/templates_test.go @@ -4,8 +4,8 @@ import ( "bytes" "testing" - "gotest.tools/assert" - is "gotest.tools/assert/cmp" + "gotest.tools/v3/assert" + is "gotest.tools/v3/assert/cmp" ) func TestNewParse(t *testing.T) { diff --git a/daemon/oci_linux_test.go b/daemon/oci_linux_test.go index 33fab7028d..bb457e783b 100644 --- a/daemon/oci_linux_test.go +++ b/daemon/oci_linux_test.go @@ -13,8 +13,8 @@ import ( "github.com/docker/docker/pkg/containerfs" "github.com/docker/docker/pkg/idtools" "github.com/docker/libnetwork" - "gotest.tools/assert" - is "gotest.tools/assert/cmp" + "gotest.tools/v3/assert" + is "gotest.tools/v3/assert/cmp" ) func setupFakeDaemon(t *testing.T, c *container.Container) *Daemon { diff --git a/daemon/oci_windows_test.go b/daemon/oci_windows_test.go index c757536b40..14351a3b87 100644 --- a/daemon/oci_windows_test.go +++ b/daemon/oci_windows_test.go @@ -8,7 +8,7 @@ import ( "strings" "testing" - "gotest.tools/fs" + "gotest.tools/v3/fs" containertypes "github.com/docker/docker/api/types/container" "github.com/docker/docker/container" @@ -16,7 +16,7 @@ import ( swarmapi "github.com/docker/swarmkit/api" specs "github.com/opencontainers/runtime-spec/specs-go" "golang.org/x/sys/windows/registry" - "gotest.tools/assert" + "gotest.tools/v3/assert" ) func TestSetWindowsCredentialSpecInSpec(t *testing.T) { diff --git a/daemon/reload_test.go b/daemon/reload_test.go index 71d86f2b97..4a8466616d 100644 --- a/daemon/reload_test.go +++ b/daemon/reload_test.go @@ -14,8 +14,8 @@ import ( "github.com/docker/docker/registry" "github.com/docker/libnetwork" "github.com/sirupsen/logrus" - "gotest.tools/assert" - is "gotest.tools/assert/cmp" + "gotest.tools/v3/assert" + is "gotest.tools/v3/assert/cmp" ) // muteLogs suppresses logs that are generated during the test diff --git a/daemon/resize_test.go b/daemon/resize_test.go index edfe9d3ed1..595feb15cc 100644 --- a/daemon/resize_test.go +++ b/daemon/resize_test.go @@ -8,7 +8,7 @@ import ( "github.com/docker/docker/container" "github.com/docker/docker/daemon/exec" - "gotest.tools/assert" + "gotest.tools/v3/assert" ) // This test simply verify that when a wrong ID used, a specific error should be returned for exec resize. diff --git a/daemon/top_unix_test.go b/daemon/top_unix_test.go index 08bb1f7a14..6e60924daf 100644 --- a/daemon/top_unix_test.go +++ b/daemon/top_unix_test.go @@ -5,7 +5,7 @@ package daemon // import "github.com/docker/docker/daemon" import ( "testing" - "gotest.tools/assert" + "gotest.tools/v3/assert" ) func TestContainerTopValidatePSArgs(t *testing.T) { diff --git a/daemon/trustkey_test.go b/daemon/trustkey_test.go index e49e76aa3e..95e15780f9 100644 --- a/daemon/trustkey_test.go +++ b/daemon/trustkey_test.go @@ -6,9 +6,9 @@ import ( "path/filepath" "testing" - "gotest.tools/assert" - is "gotest.tools/assert/cmp" - "gotest.tools/fs" + "gotest.tools/v3/assert" + is "gotest.tools/v3/assert/cmp" + "gotest.tools/v3/fs" ) // LoadOrCreateTrustKey diff --git a/distribution/metadata/v1_id_service_test.go b/distribution/metadata/v1_id_service_test.go index 5003897cbb..1fb0459fb4 100644 --- a/distribution/metadata/v1_id_service_test.go +++ b/distribution/metadata/v1_id_service_test.go @@ -6,7 +6,7 @@ import ( "testing" "github.com/docker/docker/layer" - "gotest.tools/assert" + "gotest.tools/v3/assert" ) func TestV1IDService(t *testing.T) { diff --git a/distribution/pull_v2_test.go b/distribution/pull_v2_test.go index 7e06abb42b..2144458a67 100644 --- a/distribution/pull_v2_test.go +++ b/distribution/pull_v2_test.go @@ -14,8 +14,8 @@ import ( "github.com/docker/distribution/reference" digest "github.com/opencontainers/go-digest" specs "github.com/opencontainers/image-spec/specs-go/v1" - "gotest.tools/assert" - is "gotest.tools/assert/cmp" + "gotest.tools/v3/assert" + is "gotest.tools/v3/assert/cmp" ) // TestFixManifestLayers checks that fixManifestLayers removes a duplicate diff --git a/distribution/xfer/download_test.go b/distribution/xfer/download_test.go index dc9065d68b..7ad8d89c5f 100644 --- a/distribution/xfer/download_test.go +++ b/distribution/xfer/download_test.go @@ -17,7 +17,7 @@ import ( "github.com/docker/docker/layer" "github.com/docker/docker/pkg/progress" digest "github.com/opencontainers/go-digest" - "gotest.tools/assert" + "gotest.tools/v3/assert" ) const maxDownloadConcurrency = 3 diff --git a/errdefs/http_helpers_test.go b/errdefs/http_helpers_test.go index 4ae17e4ef1..7806d28390 100644 --- a/errdefs/http_helpers_test.go +++ b/errdefs/http_helpers_test.go @@ -5,7 +5,7 @@ import ( "net/http" "testing" - "gotest.tools/assert" + "gotest.tools/v3/assert" ) func TestFromStatusCode(t *testing.T) { diff --git a/image/fs_test.go b/image/fs_test.go index a377e134e3..6bf6c2f4ad 100644 --- a/image/fs_test.go +++ b/image/fs_test.go @@ -11,8 +11,8 @@ import ( "testing" digest "github.com/opencontainers/go-digest" - "gotest.tools/assert" - is "gotest.tools/assert/cmp" + "gotest.tools/v3/assert" + is "gotest.tools/v3/assert/cmp" ) func defaultFSStoreBackend(t *testing.T) (StoreBackend, func()) { diff --git a/image/image_test.go b/image/image_test.go index 981be0b68c..b174b80908 100644 --- a/image/image_test.go +++ b/image/image_test.go @@ -10,8 +10,8 @@ import ( "github.com/docker/docker/api/types/container" "github.com/docker/docker/layer" "github.com/google/go-cmp/cmp" - "gotest.tools/assert" - is "gotest.tools/assert/cmp" + "gotest.tools/v3/assert" + is "gotest.tools/v3/assert/cmp" ) const sampleImageJSON = `{ diff --git a/image/store_test.go b/image/store_test.go index f601285b6d..f159cb3830 100644 --- a/image/store_test.go +++ b/image/store_test.go @@ -6,8 +6,8 @@ import ( "testing" "github.com/docker/docker/layer" - "gotest.tools/assert" - "gotest.tools/assert/cmp" + "gotest.tools/v3/assert" + "gotest.tools/v3/assert/cmp" ) func TestRestore(t *testing.T) { diff --git a/integration-cli/benchmark_test.go b/integration-cli/benchmark_test.go index 8fb9a7bd6f..e86e9fc6e6 100644 --- a/integration-cli/benchmark_test.go +++ b/integration-cli/benchmark_test.go @@ -9,7 +9,7 @@ import ( "sync" "testing" - "gotest.tools/assert" + "gotest.tools/v3/assert" ) func (s *DockerSuite) BenchmarkConcurrentContainerActions(c *testing.B) { diff --git a/integration-cli/check_test.go b/integration-cli/check_test.go index 6741a7b13d..84ced20e76 100644 --- a/integration-cli/check_test.go +++ b/integration-cli/check_test.go @@ -25,7 +25,7 @@ import ( "github.com/docker/docker/testutil/fakestorage" "github.com/docker/docker/testutil/fixtures/plugin" "github.com/docker/docker/testutil/registry" - "gotest.tools/assert" + "gotest.tools/v3/assert" ) const ( diff --git a/integration-cli/checker/checker.go b/integration-cli/checker/checker.go index 089ef1223c..a0b5343aa1 100644 --- a/integration-cli/checker/checker.go +++ b/integration-cli/checker/checker.go @@ -5,8 +5,8 @@ package checker // import "github.com/docker/docker/integration-cli/checker" import ( "fmt" - "gotest.tools/assert" - "gotest.tools/assert/cmp" + "gotest.tools/v3/assert" + "gotest.tools/v3/assert/cmp" ) // Compare defines the interface to compare values diff --git a/integration-cli/cli/build/build.go b/integration-cli/cli/build/build.go index ad41372a80..7afede8a97 100644 --- a/integration-cli/cli/build/build.go +++ b/integration-cli/cli/build/build.go @@ -6,7 +6,7 @@ import ( "testing" "github.com/docker/docker/testutil/fakecontext" - "gotest.tools/icmd" + "gotest.tools/v3/icmd" ) // WithStdinContext sets the build context from the standard input with the specified reader diff --git a/integration-cli/cli/cli.go b/integration-cli/cli/cli.go index 8a508003af..b4b1e6b0c5 100644 --- a/integration-cli/cli/cli.go +++ b/integration-cli/cli/cli.go @@ -10,7 +10,7 @@ import ( "github.com/docker/docker/integration-cli/daemon" "github.com/docker/docker/integration-cli/environment" "github.com/pkg/errors" - "gotest.tools/icmd" + "gotest.tools/v3/icmd" ) var testEnv *environment.Execution diff --git a/integration-cli/daemon/daemon.go b/integration-cli/daemon/daemon.go index a7329b45ac..8a49e85742 100644 --- a/integration-cli/daemon/daemon.go +++ b/integration-cli/daemon/daemon.go @@ -8,8 +8,8 @@ import ( "github.com/docker/docker/testutil/daemon" "github.com/pkg/errors" - "gotest.tools/assert" - "gotest.tools/icmd" + "gotest.tools/v3/assert" + "gotest.tools/v3/icmd" ) // Daemon represents a Docker daemon for the testing framework. diff --git a/integration-cli/daemon/daemon_swarm.go b/integration-cli/daemon/daemon_swarm.go index 8acc30d210..74b5877c8d 100644 --- a/integration-cli/daemon/daemon_swarm.go +++ b/integration-cli/daemon/daemon_swarm.go @@ -10,7 +10,7 @@ import ( "github.com/docker/docker/api/types/filters" "github.com/docker/docker/api/types/swarm" "github.com/docker/docker/client" - "gotest.tools/assert" + "gotest.tools/v3/assert" ) // CheckServiceTasksInState returns the number of tasks with a matching state, diff --git a/integration-cli/docker_api_attach_test.go b/integration-cli/docker_api_attach_test.go index 634a06722b..2627821cc1 100644 --- a/integration-cli/docker_api_attach_test.go +++ b/integration-cli/docker_api_attach_test.go @@ -18,8 +18,8 @@ import ( "github.com/docker/go-connections/sockets" "github.com/pkg/errors" "golang.org/x/net/websocket" - "gotest.tools/assert" - is "gotest.tools/assert/cmp" + "gotest.tools/v3/assert" + is "gotest.tools/v3/assert/cmp" ) func (s *DockerSuite) TestGetContainersAttachWebsocket(c *testing.T) { diff --git a/integration-cli/docker_api_build_test.go b/integration-cli/docker_api_build_test.go index 4226fae495..e23de015ad 100644 --- a/integration-cli/docker_api_build_test.go +++ b/integration-cli/docker_api_build_test.go @@ -18,8 +18,8 @@ import ( "github.com/docker/docker/testutil/fakegit" "github.com/docker/docker/testutil/fakestorage" "github.com/docker/docker/testutil/request" - "gotest.tools/assert" - is "gotest.tools/assert/cmp" + "gotest.tools/v3/assert" + is "gotest.tools/v3/assert/cmp" ) func (s *DockerSuite) TestBuildAPIDockerFileRemote(c *testing.T) { diff --git a/integration-cli/docker_api_build_windows_test.go b/integration-cli/docker_api_build_windows_test.go index 682de714ac..2eb62ddb1b 100644 --- a/integration-cli/docker_api_build_windows_test.go +++ b/integration-cli/docker_api_build_windows_test.go @@ -8,8 +8,8 @@ import ( "github.com/docker/docker/testutil/fakecontext" "github.com/docker/docker/testutil/request" - "gotest.tools/assert" - is "gotest.tools/assert/cmp" + "gotest.tools/v3/assert" + is "gotest.tools/v3/assert/cmp" ) func (s *DockerSuite) TestBuildWithRecycleBin(c *testing.T) { diff --git a/integration-cli/docker_api_containers_test.go b/integration-cli/docker_api_containers_test.go index 14ce5127c0..af46897930 100644 --- a/integration-cli/docker_api_containers_test.go +++ b/integration-cli/docker_api_containers_test.go @@ -31,9 +31,9 @@ import ( "github.com/docker/docker/testutil/request" "github.com/docker/docker/volume" "github.com/docker/go-connections/nat" - "gotest.tools/assert" - is "gotest.tools/assert/cmp" - "gotest.tools/poll" + "gotest.tools/v3/assert" + is "gotest.tools/v3/assert/cmp" + "gotest.tools/v3/poll" ) func (s *DockerSuite) TestContainerAPIGetAll(c *testing.T) { diff --git a/integration-cli/docker_api_containers_windows_test.go b/integration-cli/docker_api_containers_windows_test.go index 5d61419cf7..0fcbcd8128 100644 --- a/integration-cli/docker_api_containers_windows_test.go +++ b/integration-cli/docker_api_containers_windows_test.go @@ -15,8 +15,8 @@ import ( "github.com/docker/docker/api/types" "github.com/docker/docker/api/types/container" "github.com/docker/docker/api/types/mount" - "gotest.tools/assert" - is "gotest.tools/assert/cmp" + "gotest.tools/v3/assert" + is "gotest.tools/v3/assert/cmp" ) func (s *DockerSuite) TestContainersAPICreateMountsBindNamedPipe(c *testing.T) { diff --git a/integration-cli/docker_api_exec_resize_test.go b/integration-cli/docker_api_exec_resize_test.go index 467dff9e23..beff0adff9 100644 --- a/integration-cli/docker_api_exec_resize_test.go +++ b/integration-cli/docker_api_exec_resize_test.go @@ -13,7 +13,7 @@ import ( "github.com/docker/docker/api/types/versions" "github.com/docker/docker/testutil/request" "github.com/pkg/errors" - "gotest.tools/assert" + "gotest.tools/v3/assert" ) func (s *DockerSuite) TestExecResizeAPIHeightWidthNoInt(c *testing.T) { diff --git a/integration-cli/docker_api_exec_test.go b/integration-cli/docker_api_exec_test.go index 6684243fd4..e0e0973ea0 100644 --- a/integration-cli/docker_api_exec_test.go +++ b/integration-cli/docker_api_exec_test.go @@ -17,8 +17,8 @@ import ( "github.com/docker/docker/client" "github.com/docker/docker/integration-cli/checker" "github.com/docker/docker/testutil/request" - "gotest.tools/assert" - "gotest.tools/poll" + "gotest.tools/v3/assert" + "gotest.tools/v3/poll" ) // Regression test for #9414 diff --git a/integration-cli/docker_api_images_test.go b/integration-cli/docker_api_images_test.go index 495893277f..fd1732f756 100644 --- a/integration-cli/docker_api_images_test.go +++ b/integration-cli/docker_api_images_test.go @@ -17,7 +17,7 @@ import ( "github.com/docker/docker/integration-cli/cli/build" "github.com/docker/docker/pkg/parsers/kernel" "github.com/docker/docker/testutil/request" - "gotest.tools/assert" + "gotest.tools/v3/assert" ) func (s *DockerSuite) TestAPIImagesFilter(c *testing.T) { diff --git a/integration-cli/docker_api_inspect_test.go b/integration-cli/docker_api_inspect_test.go index 3808e8e94d..2334bcf60e 100644 --- a/integration-cli/docker_api_inspect_test.go +++ b/integration-cli/docker_api_inspect_test.go @@ -9,8 +9,8 @@ import ( "github.com/docker/docker/api/types" "github.com/docker/docker/api/types/versions/v1p20" "github.com/docker/docker/client" - "gotest.tools/assert" - is "gotest.tools/assert/cmp" + "gotest.tools/v3/assert" + is "gotest.tools/v3/assert/cmp" ) func (s *DockerSuite) TestInspectAPIContainerResponse(c *testing.T) { diff --git a/integration-cli/docker_api_logs_test.go b/integration-cli/docker_api_logs_test.go index 848df4b7f4..19e194d479 100644 --- a/integration-cli/docker_api_logs_test.go +++ b/integration-cli/docker_api_logs_test.go @@ -17,7 +17,7 @@ import ( "github.com/docker/docker/client" "github.com/docker/docker/pkg/stdcopy" "github.com/docker/docker/testutil/request" - "gotest.tools/assert" + "gotest.tools/v3/assert" ) func (s *DockerSuite) TestLogsAPIWithStdout(c *testing.T) { diff --git a/integration-cli/docker_api_network_test.go b/integration-cli/docker_api_network_test.go index 4c4be109f9..716901b8ad 100644 --- a/integration-cli/docker_api_network_test.go +++ b/integration-cli/docker_api_network_test.go @@ -14,7 +14,7 @@ import ( "github.com/docker/docker/api/types/network" "github.com/docker/docker/api/types/versions" "github.com/docker/docker/testutil/request" - "gotest.tools/assert" + "gotest.tools/v3/assert" ) func (s *DockerSuite) TestAPINetworkGetDefaults(c *testing.T) { diff --git a/integration-cli/docker_api_stats_test.go b/integration-cli/docker_api_stats_test.go index e1e34d39c6..6802cfbe2b 100644 --- a/integration-cli/docker_api_stats_test.go +++ b/integration-cli/docker_api_stats_test.go @@ -17,7 +17,7 @@ import ( "github.com/docker/docker/api/types/versions" "github.com/docker/docker/client" "github.com/docker/docker/testutil/request" - "gotest.tools/assert" + "gotest.tools/v3/assert" ) var expectedNetworkInterfaceStats = strings.Split("rx_bytes rx_dropped rx_errors rx_packets tx_bytes tx_dropped tx_errors tx_packets", " ") diff --git a/integration-cli/docker_api_swarm_node_test.go b/integration-cli/docker_api_swarm_node_test.go index 7e867bc75d..ab5882dbf4 100644 --- a/integration-cli/docker_api_swarm_node_test.go +++ b/integration-cli/docker_api_swarm_node_test.go @@ -10,8 +10,8 @@ import ( "github.com/docker/docker/api/types/swarm" "github.com/docker/docker/integration-cli/checker" "github.com/docker/docker/integration-cli/daemon" - "gotest.tools/assert" - "gotest.tools/poll" + "gotest.tools/v3/assert" + "gotest.tools/v3/poll" ) func (s *DockerSwarmSuite) TestAPISwarmListNodes(c *testing.T) { diff --git a/integration-cli/docker_api_swarm_service_test.go b/integration-cli/docker_api_swarm_service_test.go index 81aa1fe9b4..5e522b58cd 100644 --- a/integration-cli/docker_api_swarm_service_test.go +++ b/integration-cli/docker_api_swarm_service_test.go @@ -18,9 +18,9 @@ import ( "github.com/docker/docker/integration-cli/daemon" testdaemon "github.com/docker/docker/testutil/daemon" "golang.org/x/sys/unix" - "gotest.tools/assert" - "gotest.tools/icmd" - "gotest.tools/poll" + "gotest.tools/v3/assert" + "gotest.tools/v3/icmd" + "gotest.tools/v3/poll" ) func setPortConfig(portConfig []swarm.PortConfig) testdaemon.ServiceConstructor { diff --git a/integration-cli/docker_api_swarm_test.go b/integration-cli/docker_api_swarm_test.go index 68b11525e1..f6b1aa9e71 100644 --- a/integration-cli/docker_api_swarm_test.go +++ b/integration-cli/docker_api_swarm_test.go @@ -28,9 +28,9 @@ import ( "github.com/docker/docker/testutil/request" "github.com/docker/swarmkit/ca" "github.com/pkg/errors" - "gotest.tools/assert" - is "gotest.tools/assert/cmp" - "gotest.tools/poll" + "gotest.tools/v3/assert" + is "gotest.tools/v3/assert/cmp" + "gotest.tools/v3/poll" ) var defaultReconciliationTimeout = 30 * time.Second diff --git a/integration-cli/docker_api_test.go b/integration-cli/docker_api_test.go index a0ed64d5bc..e86b4298ea 100644 --- a/integration-cli/docker_api_test.go +++ b/integration-cli/docker_api_test.go @@ -12,7 +12,7 @@ import ( "github.com/docker/docker/api" "github.com/docker/docker/api/types/versions" "github.com/docker/docker/testutil/request" - "gotest.tools/assert" + "gotest.tools/v3/assert" ) func (s *DockerSuite) TestAPIOptionsRoute(c *testing.T) { diff --git a/integration-cli/docker_cli_attach_test.go b/integration-cli/docker_cli_attach_test.go index 44fc48b84c..4c352658f0 100644 --- a/integration-cli/docker_cli_attach_test.go +++ b/integration-cli/docker_cli_attach_test.go @@ -12,8 +12,8 @@ import ( "time" "github.com/docker/docker/integration-cli/cli" - "gotest.tools/assert" - "gotest.tools/icmd" + "gotest.tools/v3/assert" + "gotest.tools/v3/icmd" ) const attachWait = 5 * time.Second diff --git a/integration-cli/docker_cli_attach_unix_test.go b/integration-cli/docker_cli_attach_unix_test.go index ebe185d92a..82c14e46ec 100644 --- a/integration-cli/docker_cli_attach_unix_test.go +++ b/integration-cli/docker_cli_attach_unix_test.go @@ -11,7 +11,7 @@ import ( "time" "github.com/creack/pty" - "gotest.tools/assert" + "gotest.tools/v3/assert" ) // #9860 Make sure attach ends when container ends (with no errors) diff --git a/integration-cli/docker_cli_build_test.go b/integration-cli/docker_cli_build_test.go index 971081da4e..c7d6ef0816 100644 --- a/integration-cli/docker_cli_build_test.go +++ b/integration-cli/docker_cli_build_test.go @@ -27,9 +27,9 @@ import ( "github.com/docker/docker/testutil/fakestorage" "github.com/moby/buildkit/frontend/dockerfile/command" digest "github.com/opencontainers/go-digest" - "gotest.tools/assert" - "gotest.tools/assert/cmp" - "gotest.tools/icmd" + "gotest.tools/v3/assert" + "gotest.tools/v3/assert/cmp" + "gotest.tools/v3/icmd" ) func (s *DockerSuite) TestBuildJSONEmptyRun(c *testing.T) { @@ -657,7 +657,7 @@ func (s *DockerSuite) TestBuildCopyWildcard(c *testing.T) { "file2.txt": "test2", "dir/nested_file": "nested file", "dir/nested_dir/nest_nest_file": "2 times nested", - "dirt": "dirty", + "dirt": "dirty", })) defer ctx.Close() diff --git a/integration-cli/docker_cli_build_unix_test.go b/integration-cli/docker_cli_build_unix_test.go index e0a9cc4138..ed89099750 100644 --- a/integration-cli/docker_cli_build_unix_test.go +++ b/integration-cli/docker_cli_build_unix_test.go @@ -20,8 +20,8 @@ import ( "github.com/docker/docker/integration-cli/cli/build" "github.com/docker/docker/testutil/fakecontext" units "github.com/docker/go-units" - "gotest.tools/assert" - "gotest.tools/icmd" + "gotest.tools/v3/assert" + "gotest.tools/v3/icmd" ) func (s *DockerSuite) TestBuildResourceConstraintsAreUsed(c *testing.T) { diff --git a/integration-cli/docker_cli_by_digest_test.go b/integration-cli/docker_cli_by_digest_test.go index a6a89a79c8..34552253c9 100644 --- a/integration-cli/docker_cli_by_digest_test.go +++ b/integration-cli/docker_cli_by_digest_test.go @@ -15,8 +15,8 @@ import ( "github.com/docker/docker/integration-cli/cli" "github.com/docker/docker/integration-cli/cli/build" digest "github.com/opencontainers/go-digest" - "gotest.tools/assert" - is "gotest.tools/assert/cmp" + "gotest.tools/v3/assert" + is "gotest.tools/v3/assert/cmp" ) var ( diff --git a/integration-cli/docker_cli_commit_test.go b/integration-cli/docker_cli_commit_test.go index c5b8f43868..b03708aa01 100644 --- a/integration-cli/docker_cli_commit_test.go +++ b/integration-cli/docker_cli_commit_test.go @@ -6,7 +6,7 @@ import ( "github.com/docker/docker/api/types/versions" "github.com/docker/docker/integration-cli/cli" - "gotest.tools/assert" + "gotest.tools/v3/assert" ) func (s *DockerSuite) TestCommitAfterContainerIsDone(c *testing.T) { diff --git a/integration-cli/docker_cli_cp_from_container_test.go b/integration-cli/docker_cli_cp_from_container_test.go index 981888f974..a357489280 100644 --- a/integration-cli/docker_cli_cp_from_container_test.go +++ b/integration-cli/docker_cli_cp_from_container_test.go @@ -5,7 +5,7 @@ import ( "path/filepath" "testing" - "gotest.tools/assert" + "gotest.tools/v3/assert" ) // Try all of the test cases from the archive package which implements the diff --git a/integration-cli/docker_cli_cp_test.go b/integration-cli/docker_cli_cp_test.go index 3a84bad200..346c484bd5 100644 --- a/integration-cli/docker_cli_cp_test.go +++ b/integration-cli/docker_cli_cp_test.go @@ -11,9 +11,9 @@ import ( "strings" "testing" - "gotest.tools/assert" - is "gotest.tools/assert/cmp" - "gotest.tools/icmd" + "gotest.tools/v3/assert" + is "gotest.tools/v3/assert/cmp" + "gotest.tools/v3/icmd" ) const ( diff --git a/integration-cli/docker_cli_cp_to_container_test.go b/integration-cli/docker_cli_cp_to_container_test.go index ddb1a19d22..6f28077f92 100644 --- a/integration-cli/docker_cli_cp_to_container_test.go +++ b/integration-cli/docker_cli_cp_to_container_test.go @@ -4,7 +4,7 @@ import ( "os" "testing" - "gotest.tools/assert" + "gotest.tools/v3/assert" ) // Try all of the test cases from the archive package which implements the diff --git a/integration-cli/docker_cli_cp_to_container_unix_test.go b/integration-cli/docker_cli_cp_to_container_unix_test.go index 89a7c49981..d4ca4bf984 100644 --- a/integration-cli/docker_cli_cp_to_container_unix_test.go +++ b/integration-cli/docker_cli_cp_to_container_unix_test.go @@ -12,7 +12,7 @@ import ( "testing" "github.com/docker/docker/pkg/system" - "gotest.tools/assert" + "gotest.tools/v3/assert" ) func (s *DockerSuite) TestCpToContainerWithPermissions(c *testing.T) { diff --git a/integration-cli/docker_cli_cp_utils_test.go b/integration-cli/docker_cli_cp_utils_test.go index d27c1f8a00..45af5fcafb 100644 --- a/integration-cli/docker_cli_cp_utils_test.go +++ b/integration-cli/docker_cli_cp_utils_test.go @@ -12,7 +12,7 @@ import ( "testing" "github.com/docker/docker/pkg/archive" - "gotest.tools/assert" + "gotest.tools/v3/assert" ) type fileType uint32 diff --git a/integration-cli/docker_cli_create_test.go b/integration-cli/docker_cli_create_test.go index 27d727d126..3b2828ada3 100644 --- a/integration-cli/docker_cli_create_test.go +++ b/integration-cli/docker_cli_create_test.go @@ -13,8 +13,8 @@ import ( "github.com/docker/docker/pkg/stringid" "github.com/docker/docker/testutil/fakecontext" "github.com/docker/go-connections/nat" - "gotest.tools/assert" - is "gotest.tools/assert/cmp" + "gotest.tools/v3/assert" + is "gotest.tools/v3/assert/cmp" ) // Make sure we can create a simple container with some args diff --git a/integration-cli/docker_cli_daemon_plugins_test.go b/integration-cli/docker_cli_daemon_plugins_test.go index ee7fd9908b..3c16498917 100644 --- a/integration-cli/docker_cli_daemon_plugins_test.go +++ b/integration-cli/docker_cli_daemon_plugins_test.go @@ -7,8 +7,8 @@ import ( "testing" "golang.org/x/sys/unix" - "gotest.tools/assert" - "gotest.tools/icmd" + "gotest.tools/v3/assert" + "gotest.tools/v3/icmd" ) // TestDaemonRestartWithPluginEnabled tests state restore for an enabled plugin diff --git a/integration-cli/docker_cli_daemon_test.go b/integration-cli/docker_cli_daemon_test.go index 08aa71ee2e..fd55f93b7b 100644 --- a/integration-cli/docker_cli_daemon_test.go +++ b/integration-cli/docker_cli_daemon_test.go @@ -38,9 +38,9 @@ import ( "github.com/docker/libnetwork/iptables" "github.com/docker/libtrust" "golang.org/x/sys/unix" - "gotest.tools/assert" - "gotest.tools/icmd" - "gotest.tools/poll" + "gotest.tools/v3/assert" + "gotest.tools/v3/icmd" + "gotest.tools/v3/poll" ) const containerdSocket = "/var/run/docker/containerd/containerd.sock" diff --git a/integration-cli/docker_cli_events_test.go b/integration-cli/docker_cli_events_test.go index 02e8c0697b..629ca49a85 100644 --- a/integration-cli/docker_cli_events_test.go +++ b/integration-cli/docker_cli_events_test.go @@ -20,9 +20,9 @@ import ( eventstestutils "github.com/docker/docker/daemon/events/testutils" "github.com/docker/docker/integration-cli/cli" "github.com/docker/docker/integration-cli/cli/build" - "gotest.tools/assert" - is "gotest.tools/assert/cmp" - "gotest.tools/icmd" + "gotest.tools/v3/assert" + is "gotest.tools/v3/assert/cmp" + "gotest.tools/v3/icmd" ) func (s *DockerSuite) TestEventsTimestampFormats(c *testing.T) { diff --git a/integration-cli/docker_cli_events_unix_test.go b/integration-cli/docker_cli_events_unix_test.go index 051bdeea7c..c81e83f956 100644 --- a/integration-cli/docker_cli_events_unix_test.go +++ b/integration-cli/docker_cli_events_unix_test.go @@ -17,8 +17,8 @@ import ( "github.com/creack/pty" "github.com/docker/docker/integration-cli/cli/build" "golang.org/x/sys/unix" - "gotest.tools/assert" - is "gotest.tools/assert/cmp" + "gotest.tools/v3/assert" + is "gotest.tools/v3/assert/cmp" ) // #5979 diff --git a/integration-cli/docker_cli_exec_test.go b/integration-cli/docker_cli_exec_test.go index 673395159d..6fdacea1ce 100644 --- a/integration-cli/docker_cli_exec_test.go +++ b/integration-cli/docker_cli_exec_test.go @@ -17,9 +17,9 @@ import ( "github.com/docker/docker/client" "github.com/docker/docker/integration-cli/cli" "github.com/docker/docker/integration-cli/cli/build" - "gotest.tools/assert" - is "gotest.tools/assert/cmp" - "gotest.tools/icmd" + "gotest.tools/v3/assert" + is "gotest.tools/v3/assert/cmp" + "gotest.tools/v3/icmd" ) func (s *DockerSuite) TestExec(c *testing.T) { diff --git a/integration-cli/docker_cli_exec_unix_test.go b/integration-cli/docker_cli_exec_unix_test.go index 8def4eab0b..596fc68e82 100644 --- a/integration-cli/docker_cli_exec_unix_test.go +++ b/integration-cli/docker_cli_exec_unix_test.go @@ -11,7 +11,7 @@ import ( "time" "github.com/creack/pty" - "gotest.tools/assert" + "gotest.tools/v3/assert" ) // regression test for #12546 diff --git a/integration-cli/docker_cli_external_volume_driver_test.go b/integration-cli/docker_cli_external_volume_driver_test.go index 94144f85c9..9f3de59678 100644 --- a/integration-cli/docker_cli_external_volume_driver_test.go +++ b/integration-cli/docker_cli_external_volume_driver_test.go @@ -19,7 +19,7 @@ import ( "github.com/docker/docker/pkg/stringid" testdaemon "github.com/docker/docker/testutil/daemon" "github.com/docker/docker/volume" - "gotest.tools/assert" + "gotest.tools/v3/assert" ) const volumePluginName = "test-external-volume-driver" diff --git a/integration-cli/docker_cli_health_test.go b/integration-cli/docker_cli_health_test.go index 0300db7308..5278e18d05 100644 --- a/integration-cli/docker_cli_health_test.go +++ b/integration-cli/docker_cli_health_test.go @@ -9,7 +9,7 @@ import ( "github.com/docker/docker/api/types" "github.com/docker/docker/integration-cli/cli/build" - "gotest.tools/assert" + "gotest.tools/v3/assert" ) func waitForHealthStatus(c *testing.T, name string, prev string, expected string) { diff --git a/integration-cli/docker_cli_history_test.go b/integration-cli/docker_cli_history_test.go index a32be33e19..8ae1d275ab 100644 --- a/integration-cli/docker_cli_history_test.go +++ b/integration-cli/docker_cli_history_test.go @@ -8,8 +8,8 @@ import ( "testing" "github.com/docker/docker/integration-cli/cli/build" - "gotest.tools/assert" - "gotest.tools/assert/cmp" + "gotest.tools/v3/assert" + "gotest.tools/v3/assert/cmp" ) // This is a heisen-test. Because the created timestamp of images and the behavior of diff --git a/integration-cli/docker_cli_images_test.go b/integration-cli/docker_cli_images_test.go index 0173c853e5..48b9601a0b 100644 --- a/integration-cli/docker_cli_images_test.go +++ b/integration-cli/docker_cli_images_test.go @@ -13,9 +13,9 @@ import ( "github.com/docker/docker/integration-cli/cli/build" "github.com/docker/docker/pkg/stringid" - "gotest.tools/assert" - is "gotest.tools/assert/cmp" - "gotest.tools/icmd" + "gotest.tools/v3/assert" + is "gotest.tools/v3/assert/cmp" + "gotest.tools/v3/icmd" ) func (s *DockerSuite) TestImagesEnsureImageIsListed(c *testing.T) { diff --git a/integration-cli/docker_cli_import_test.go b/integration-cli/docker_cli_import_test.go index 1581e40273..9114a689cc 100644 --- a/integration-cli/docker_cli_import_test.go +++ b/integration-cli/docker_cli_import_test.go @@ -11,8 +11,8 @@ import ( "testing" "github.com/docker/docker/integration-cli/cli" - "gotest.tools/assert" - "gotest.tools/icmd" + "gotest.tools/v3/assert" + "gotest.tools/v3/icmd" ) func (s *DockerSuite) TestImportDisplay(c *testing.T) { diff --git a/integration-cli/docker_cli_info_test.go b/integration-cli/docker_cli_info_test.go index 36718741e3..f56c517a1c 100644 --- a/integration-cli/docker_cli_info_test.go +++ b/integration-cli/docker_cli_info_test.go @@ -6,7 +6,7 @@ import ( "strings" "testing" - "gotest.tools/assert" + "gotest.tools/v3/assert" ) // ensure docker info succeeds diff --git a/integration-cli/docker_cli_info_unix_test.go b/integration-cli/docker_cli_info_unix_test.go index ab9c9468d9..21c5a5eb5d 100644 --- a/integration-cli/docker_cli_info_unix_test.go +++ b/integration-cli/docker_cli_info_unix_test.go @@ -7,8 +7,8 @@ import ( "testing" "github.com/docker/docker/client" - "gotest.tools/assert" - is "gotest.tools/assert/cmp" + "gotest.tools/v3/assert" + is "gotest.tools/v3/assert/cmp" ) func (s *DockerSuite) TestInfoSecurityOptions(c *testing.T) { diff --git a/integration-cli/docker_cli_inspect_test.go b/integration-cli/docker_cli_inspect_test.go index 6f91318aa4..e380e0c8c8 100644 --- a/integration-cli/docker_cli_inspect_test.go +++ b/integration-cli/docker_cli_inspect_test.go @@ -11,8 +11,8 @@ import ( "github.com/docker/docker/api/types" "github.com/docker/docker/api/types/container" - "gotest.tools/assert" - "gotest.tools/icmd" + "gotest.tools/v3/assert" + "gotest.tools/v3/icmd" ) func checkValidGraphDriver(c *testing.T, name string) { diff --git a/integration-cli/docker_cli_links_test.go b/integration-cli/docker_cli_links_test.go index 9aed629b4b..0131233e6a 100644 --- a/integration-cli/docker_cli_links_test.go +++ b/integration-cli/docker_cli_links_test.go @@ -9,8 +9,8 @@ import ( "testing" "github.com/docker/docker/runconfig" - "gotest.tools/assert" - "gotest.tools/assert/cmp" + "gotest.tools/v3/assert" + "gotest.tools/v3/assert/cmp" ) func (s *DockerSuite) TestLinksPingUnlinkedContainers(c *testing.T) { diff --git a/integration-cli/docker_cli_login_test.go b/integration-cli/docker_cli_login_test.go index c189d1150e..04fb9eaa30 100644 --- a/integration-cli/docker_cli_login_test.go +++ b/integration-cli/docker_cli_login_test.go @@ -6,7 +6,7 @@ import ( "strings" "testing" - "gotest.tools/assert" + "gotest.tools/v3/assert" ) func (s *DockerSuite) TestLoginWithoutTTY(c *testing.T) { diff --git a/integration-cli/docker_cli_logout_test.go b/integration-cli/docker_cli_logout_test.go index f6b65682b3..c146ccf8a9 100644 --- a/integration-cli/docker_cli_logout_test.go +++ b/integration-cli/docker_cli_logout_test.go @@ -10,7 +10,7 @@ import ( "strings" "testing" - "gotest.tools/assert" + "gotest.tools/v3/assert" ) func (s *DockerRegistryAuthHtpasswdSuite) TestLogoutWithExternalAuth(c *testing.T) { diff --git a/integration-cli/docker_cli_logs_test.go b/integration-cli/docker_cli_logs_test.go index fcb7ac99e6..d9ca9cd845 100644 --- a/integration-cli/docker_cli_logs_test.go +++ b/integration-cli/docker_cli_logs_test.go @@ -11,8 +11,8 @@ import ( "github.com/docker/docker/integration-cli/cli" "github.com/docker/docker/pkg/jsonmessage" - "gotest.tools/assert" - "gotest.tools/icmd" + "gotest.tools/v3/assert" + "gotest.tools/v3/icmd" ) // This used to work, it test a log of PageSize-1 (gh#4851) diff --git a/integration-cli/docker_cli_netmode_test.go b/integration-cli/docker_cli_netmode_test.go index 48f8f93c8f..fe6d9487ac 100644 --- a/integration-cli/docker_cli_netmode_test.go +++ b/integration-cli/docker_cli_netmode_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/docker/docker/runconfig" - "gotest.tools/assert" + "gotest.tools/v3/assert" ) // GH14530. Validates combinations of --net= with other options diff --git a/integration-cli/docker_cli_network_unix_test.go b/integration-cli/docker_cli_network_unix_test.go index 28cc9e9622..4aea4c291a 100644 --- a/integration-cli/docker_cli_network_unix_test.go +++ b/integration-cli/docker_cli_network_unix_test.go @@ -28,8 +28,8 @@ import ( "github.com/docker/libnetwork/netlabel" "github.com/vishvananda/netlink" "golang.org/x/sys/unix" - "gotest.tools/assert" - "gotest.tools/icmd" + "gotest.tools/v3/assert" + "gotest.tools/v3/icmd" ) const dummyNetworkDriver = "dummy-network-driver" diff --git a/integration-cli/docker_cli_plugins_logdriver_test.go b/integration-cli/docker_cli_plugins_logdriver_test.go index 5c4520258b..0c521ade7c 100644 --- a/integration-cli/docker_cli_plugins_logdriver_test.go +++ b/integration-cli/docker_cli_plugins_logdriver_test.go @@ -6,7 +6,7 @@ import ( "testing" "github.com/docker/docker/client" - "gotest.tools/assert" + "gotest.tools/v3/assert" ) func (s *DockerSuite) TestPluginLogDriver(c *testing.T) { diff --git a/integration-cli/docker_cli_plugins_test.go b/integration-cli/docker_cli_plugins_test.go index 6f4664565a..71e7eabe07 100644 --- a/integration-cli/docker_cli_plugins_test.go +++ b/integration-cli/docker_cli_plugins_test.go @@ -16,7 +16,7 @@ import ( "github.com/docker/docker/integration-cli/cli" "github.com/docker/docker/integration-cli/daemon" "github.com/docker/docker/testutil/fixtures/plugin" - "gotest.tools/assert" + "gotest.tools/v3/assert" ) var ( diff --git a/integration-cli/docker_cli_port_test.go b/integration-cli/docker_cli_port_test.go index 163281ddb3..f1bd7904cc 100644 --- a/integration-cli/docker_cli_port_test.go +++ b/integration-cli/docker_cli_port_test.go @@ -9,7 +9,7 @@ import ( "strings" "testing" - "gotest.tools/assert" + "gotest.tools/v3/assert" ) func (s *DockerSuite) TestPortList(c *testing.T) { diff --git a/integration-cli/docker_cli_proxy_test.go b/integration-cli/docker_cli_proxy_test.go index f45acbe9b1..a803328665 100644 --- a/integration-cli/docker_cli_proxy_test.go +++ b/integration-cli/docker_cli_proxy_test.go @@ -5,8 +5,8 @@ import ( "strings" "testing" - "gotest.tools/assert" - "gotest.tools/icmd" + "gotest.tools/v3/assert" + "gotest.tools/v3/icmd" ) func (s *DockerSuite) TestCLIProxyDisableProxyUnixSock(c *testing.T) { diff --git a/integration-cli/docker_cli_prune_unix_test.go b/integration-cli/docker_cli_prune_unix_test.go index 818af6a23e..8198d24c9e 100644 --- a/integration-cli/docker_cli_prune_unix_test.go +++ b/integration-cli/docker_cli_prune_unix_test.go @@ -15,9 +15,9 @@ import ( "github.com/docker/docker/integration-cli/cli" "github.com/docker/docker/integration-cli/cli/build" "github.com/docker/docker/integration-cli/daemon" - "gotest.tools/assert" - "gotest.tools/icmd" - "gotest.tools/poll" + "gotest.tools/v3/assert" + "gotest.tools/v3/icmd" + "gotest.tools/v3/poll" ) func pruneNetworkAndVerify(c *testing.T, d *daemon.Daemon, kept, pruned []string) { diff --git a/integration-cli/docker_cli_ps_test.go b/integration-cli/docker_cli_ps_test.go index 80d465c180..a7a3e0e47c 100644 --- a/integration-cli/docker_cli_ps_test.go +++ b/integration-cli/docker_cli_ps_test.go @@ -12,10 +12,10 @@ import ( "github.com/docker/docker/integration-cli/cli" "github.com/docker/docker/integration-cli/cli/build" "github.com/docker/docker/pkg/stringid" - "gotest.tools/assert" - is "gotest.tools/assert/cmp" - "gotest.tools/icmd" - "gotest.tools/skip" + "gotest.tools/v3/assert" + is "gotest.tools/v3/assert/cmp" + "gotest.tools/v3/icmd" + "gotest.tools/v3/skip" ) func (s *DockerSuite) TestPsListContainersBase(c *testing.T) { diff --git a/integration-cli/docker_cli_pull_local_test.go b/integration-cli/docker_cli_pull_local_test.go index 94e973a1c4..40ab34279f 100644 --- a/integration-cli/docker_cli_pull_local_test.go +++ b/integration-cli/docker_cli_pull_local_test.go @@ -16,8 +16,8 @@ import ( "github.com/docker/distribution/manifest/schema2" "github.com/docker/docker/integration-cli/cli/build" digest "github.com/opencontainers/go-digest" - "gotest.tools/assert" - "gotest.tools/icmd" + "gotest.tools/v3/assert" + "gotest.tools/v3/icmd" ) // testPullImageWithAliases pulls a specific image tag and verifies that any aliases (i.e., other diff --git a/integration-cli/docker_cli_pull_test.go b/integration-cli/docker_cli_pull_test.go index 871be9563d..9606d7a903 100644 --- a/integration-cli/docker_cli_pull_test.go +++ b/integration-cli/docker_cli_pull_test.go @@ -9,8 +9,8 @@ import ( "time" digest "github.com/opencontainers/go-digest" - "gotest.tools/assert" - is "gotest.tools/assert/cmp" + "gotest.tools/v3/assert" + is "gotest.tools/v3/assert/cmp" ) // TestPullFromCentralRegistry pulls an image from the central registry and verifies that the client diff --git a/integration-cli/docker_cli_push_test.go b/integration-cli/docker_cli_push_test.go index ce4ec7aaeb..e911f6e303 100644 --- a/integration-cli/docker_cli_push_test.go +++ b/integration-cli/docker_cli_push_test.go @@ -13,8 +13,8 @@ import ( "github.com/docker/distribution/reference" "github.com/docker/docker/integration-cli/cli/build" - "gotest.tools/assert" - "gotest.tools/icmd" + "gotest.tools/v3/assert" + "gotest.tools/v3/icmd" ) // Pushing an image to a private registry. diff --git a/integration-cli/docker_cli_registry_user_agent_test.go b/integration-cli/docker_cli_registry_user_agent_test.go index b73d95a9dc..baf94a2e48 100644 --- a/integration-cli/docker_cli_registry_user_agent_test.go +++ b/integration-cli/docker_cli_registry_user_agent_test.go @@ -9,7 +9,7 @@ import ( "testing" "github.com/docker/docker/testutil/registry" - "gotest.tools/assert" + "gotest.tools/v3/assert" ) // unescapeBackslashSemicolonParens unescapes \;() diff --git a/integration-cli/docker_cli_restart_test.go b/integration-cli/docker_cli_restart_test.go index e6534539eb..fc6f4918f1 100644 --- a/integration-cli/docker_cli_restart_test.go +++ b/integration-cli/docker_cli_restart_test.go @@ -8,9 +8,9 @@ import ( "time" "github.com/docker/docker/integration-cli/checker" - "gotest.tools/assert" - is "gotest.tools/assert/cmp" - "gotest.tools/poll" + "gotest.tools/v3/assert" + is "gotest.tools/v3/assert/cmp" + "gotest.tools/v3/poll" ) func (s *DockerSuite) TestRestartStoppedContainer(c *testing.T) { diff --git a/integration-cli/docker_cli_rmi_test.go b/integration-cli/docker_cli_rmi_test.go index f118289e78..f0bb557f95 100644 --- a/integration-cli/docker_cli_rmi_test.go +++ b/integration-cli/docker_cli_rmi_test.go @@ -9,8 +9,8 @@ import ( "github.com/docker/docker/integration-cli/cli" "github.com/docker/docker/integration-cli/cli/build" "github.com/docker/docker/pkg/stringid" - "gotest.tools/assert" - "gotest.tools/icmd" + "gotest.tools/v3/assert" + "gotest.tools/v3/icmd" ) func (s *DockerSuite) TestRmiWithContainerFails(c *testing.T) { diff --git a/integration-cli/docker_cli_run_test.go b/integration-cli/docker_cli_run_test.go index 33fe9f2488..9bc8d1ffc3 100644 --- a/integration-cli/docker_cli_run_test.go +++ b/integration-cli/docker_cli_run_test.go @@ -35,8 +35,8 @@ import ( "github.com/docker/go-connections/nat" "github.com/docker/libnetwork/resolvconf" "github.com/docker/libnetwork/types" - "gotest.tools/assert" - "gotest.tools/icmd" + "gotest.tools/v3/assert" + "gotest.tools/v3/icmd" ) // "test123" should be printed by docker run diff --git a/integration-cli/docker_cli_run_unix_test.go b/integration-cli/docker_cli_run_unix_test.go index dc250a194d..11cca40ae2 100644 --- a/integration-cli/docker_cli_run_unix_test.go +++ b/integration-cli/docker_cli_run_unix_test.go @@ -26,8 +26,8 @@ import ( "github.com/docker/docker/pkg/mount" "github.com/docker/docker/pkg/parsers" "github.com/docker/docker/pkg/sysinfo" - "gotest.tools/assert" - "gotest.tools/icmd" + "gotest.tools/v3/assert" + "gotest.tools/v3/icmd" ) // #6509 diff --git a/integration-cli/docker_cli_save_load_test.go b/integration-cli/docker_cli_save_load_test.go index 59da3fec00..5f32d1c1d2 100644 --- a/integration-cli/docker_cli_save_load_test.go +++ b/integration-cli/docker_cli_save_load_test.go @@ -18,9 +18,9 @@ import ( "github.com/docker/docker/integration-cli/cli/build" digest "github.com/opencontainers/go-digest" - "gotest.tools/assert" - is "gotest.tools/assert/cmp" - "gotest.tools/icmd" + "gotest.tools/v3/assert" + is "gotest.tools/v3/assert/cmp" + "gotest.tools/v3/icmd" ) // save a repo using gz compression and try to load it using stdout diff --git a/integration-cli/docker_cli_save_load_unix_test.go b/integration-cli/docker_cli_save_load_unix_test.go index 0d36b01125..615334db5b 100644 --- a/integration-cli/docker_cli_save_load_unix_test.go +++ b/integration-cli/docker_cli_save_load_unix_test.go @@ -14,8 +14,8 @@ import ( "github.com/creack/pty" "github.com/docker/docker/integration-cli/cli/build" - "gotest.tools/assert" - "gotest.tools/icmd" + "gotest.tools/v3/assert" + "gotest.tools/v3/icmd" ) // save a repo and try to load it using stdout diff --git a/integration-cli/docker_cli_search_test.go b/integration-cli/docker_cli_search_test.go index 0631f91b45..baace44fb3 100644 --- a/integration-cli/docker_cli_search_test.go +++ b/integration-cli/docker_cli_search_test.go @@ -5,7 +5,7 @@ import ( "strings" "testing" - "gotest.tools/assert" + "gotest.tools/v3/assert" ) // search for repos named "registry" on the central registry diff --git a/integration-cli/docker_cli_service_create_test.go b/integration-cli/docker_cli_service_create_test.go index a5c92c9411..d36b2da8d6 100644 --- a/integration-cli/docker_cli_service_create_test.go +++ b/integration-cli/docker_cli_service_create_test.go @@ -13,8 +13,8 @@ import ( "github.com/docker/docker/api/types/mount" "github.com/docker/docker/api/types/swarm" "github.com/docker/docker/integration-cli/checker" - "gotest.tools/assert" - "gotest.tools/poll" + "gotest.tools/v3/assert" + "gotest.tools/v3/poll" ) func (s *DockerSwarmSuite) TestServiceCreateMountVolume(c *testing.T) { diff --git a/integration-cli/docker_cli_service_health_test.go b/integration-cli/docker_cli_service_health_test.go index 69874592f2..dd2d94eb24 100644 --- a/integration-cli/docker_cli_service_health_test.go +++ b/integration-cli/docker_cli_service_health_test.go @@ -12,9 +12,9 @@ import ( "github.com/docker/docker/integration-cli/checker" "github.com/docker/docker/integration-cli/cli" "github.com/docker/docker/integration-cli/cli/build" - "gotest.tools/assert" - "gotest.tools/icmd" - "gotest.tools/poll" + "gotest.tools/v3/assert" + "gotest.tools/v3/icmd" + "gotest.tools/v3/poll" ) // start a service, and then make its task unhealthy during running diff --git a/integration-cli/docker_cli_service_logs_test.go b/integration-cli/docker_cli_service_logs_test.go index 5ee8806522..c9f152f3c4 100644 --- a/integration-cli/docker_cli_service_logs_test.go +++ b/integration-cli/docker_cli_service_logs_test.go @@ -13,9 +13,9 @@ import ( "github.com/docker/docker/integration-cli/checker" "github.com/docker/docker/integration-cli/daemon" - "gotest.tools/assert" - "gotest.tools/icmd" - "gotest.tools/poll" + "gotest.tools/v3/assert" + "gotest.tools/v3/icmd" + "gotest.tools/v3/poll" ) type logMessage struct { diff --git a/integration-cli/docker_cli_service_scale_test.go b/integration-cli/docker_cli_service_scale_test.go index 931127589a..1d01cc4a85 100644 --- a/integration-cli/docker_cli_service_scale_test.go +++ b/integration-cli/docker_cli_service_scale_test.go @@ -7,7 +7,7 @@ import ( "strings" "testing" - "gotest.tools/assert" + "gotest.tools/v3/assert" ) func (s *DockerSwarmSuite) TestServiceScale(c *testing.T) { diff --git a/integration-cli/docker_cli_sni_test.go b/integration-cli/docker_cli_sni_test.go index 173547149b..9e086b546a 100644 --- a/integration-cli/docker_cli_sni_test.go +++ b/integration-cli/docker_cli_sni_test.go @@ -11,7 +11,7 @@ import ( "strings" "testing" - "gotest.tools/assert" + "gotest.tools/v3/assert" ) func (s *DockerSuite) TestClientSetsTLSServerName(c *testing.T) { diff --git a/integration-cli/docker_cli_start_test.go b/integration-cli/docker_cli_start_test.go index 866ce5cef7..056cc523b3 100644 --- a/integration-cli/docker_cli_start_test.go +++ b/integration-cli/docker_cli_start_test.go @@ -11,8 +11,8 @@ import ( "github.com/Microsoft/hcsshim/osversion" "github.com/docker/docker/integration-cli/cli" "github.com/docker/docker/pkg/parsers/kernel" - "gotest.tools/assert" - "gotest.tools/icmd" + "gotest.tools/v3/assert" + "gotest.tools/v3/icmd" ) // Regression test for https://github.com/docker/docker/issues/7843 diff --git a/integration-cli/docker_cli_stats_test.go b/integration-cli/docker_cli_stats_test.go index 71966e5718..f32f1399eb 100644 --- a/integration-cli/docker_cli_stats_test.go +++ b/integration-cli/docker_cli_stats_test.go @@ -9,8 +9,8 @@ import ( "time" "github.com/docker/docker/integration-cli/cli" - "gotest.tools/assert" - is "gotest.tools/assert/cmp" + "gotest.tools/v3/assert" + is "gotest.tools/v3/assert/cmp" ) func (s *DockerSuite) TestStatsNoStream(c *testing.T) { diff --git a/integration-cli/docker_cli_swarm_test.go b/integration-cli/docker_cli_swarm_test.go index 666d53dd36..e06058bdce 100644 --- a/integration-cli/docker_cli_swarm_test.go +++ b/integration-cli/docker_cli_swarm_test.go @@ -29,10 +29,10 @@ import ( remoteipam "github.com/docker/libnetwork/ipams/remote/api" "github.com/docker/swarmkit/ca/keyutils" "github.com/vishvananda/netlink" - "gotest.tools/assert" - "gotest.tools/fs" - "gotest.tools/icmd" - "gotest.tools/poll" + "gotest.tools/v3/assert" + "gotest.tools/v3/fs" + "gotest.tools/v3/icmd" + "gotest.tools/v3/poll" ) func (s *DockerSwarmSuite) TestSwarmUpdate(c *testing.T) { diff --git a/integration-cli/docker_cli_swarm_unix_test.go b/integration-cli/docker_cli_swarm_unix_test.go index 35d0a5a301..47ff925cd5 100644 --- a/integration-cli/docker_cli_swarm_unix_test.go +++ b/integration-cli/docker_cli_swarm_unix_test.go @@ -10,8 +10,8 @@ import ( "github.com/docker/docker/api/types/swarm" "github.com/docker/docker/integration-cli/checker" - "gotest.tools/assert" - "gotest.tools/poll" + "gotest.tools/v3/assert" + "gotest.tools/v3/poll" ) func (s *DockerSwarmSuite) TestSwarmVolumePlugin(c *testing.T) { diff --git a/integration-cli/docker_cli_top_test.go b/integration-cli/docker_cli_top_test.go index 219f9b0e26..9bc29f39c6 100644 --- a/integration-cli/docker_cli_top_test.go +++ b/integration-cli/docker_cli_top_test.go @@ -4,8 +4,8 @@ import ( "strings" "testing" - "gotest.tools/assert" - "gotest.tools/icmd" + "gotest.tools/v3/assert" + "gotest.tools/v3/icmd" ) func (s *DockerSuite) TestTopMultipleArgs(c *testing.T) { diff --git a/integration-cli/docker_cli_update_unix_test.go b/integration-cli/docker_cli_update_unix_test.go index 95d02b7f53..8b173ad046 100644 --- a/integration-cli/docker_cli_update_unix_test.go +++ b/integration-cli/docker_cli_update_unix_test.go @@ -16,7 +16,7 @@ import ( "github.com/docker/docker/client" "github.com/docker/docker/pkg/parsers/kernel" "github.com/docker/docker/testutil/request" - "gotest.tools/assert" + "gotest.tools/v3/assert" ) func (s *DockerSuite) TestUpdateRunningContainer(c *testing.T) { diff --git a/integration-cli/docker_cli_userns_test.go b/integration-cli/docker_cli_userns_test.go index f61ed27448..3fac4d7ced 100644 --- a/integration-cli/docker_cli_userns_test.go +++ b/integration-cli/docker_cli_userns_test.go @@ -15,7 +15,7 @@ import ( "github.com/docker/docker/pkg/stringid" "github.com/docker/docker/pkg/system" - "gotest.tools/assert" + "gotest.tools/v3/assert" ) // user namespaces test: run daemon with remapped root setting diff --git a/integration-cli/docker_cli_v2_only_test.go b/integration-cli/docker_cli_v2_only_test.go index d10ccd4ed3..1b8e468dc4 100644 --- a/integration-cli/docker_cli_v2_only_test.go +++ b/integration-cli/docker_cli_v2_only_test.go @@ -8,7 +8,7 @@ import ( "testing" "github.com/docker/docker/testutil/registry" - "gotest.tools/assert" + "gotest.tools/v3/assert" ) func makefile(path string, contents string) (string, error) { diff --git a/integration-cli/docker_cli_volume_test.go b/integration-cli/docker_cli_volume_test.go index 3a74302c72..c43dd088e8 100644 --- a/integration-cli/docker_cli_volume_test.go +++ b/integration-cli/docker_cli_volume_test.go @@ -15,8 +15,8 @@ import ( "github.com/docker/docker/api/types/network" "github.com/docker/docker/client" "github.com/docker/docker/integration-cli/cli/build" - "gotest.tools/assert" - "gotest.tools/icmd" + "gotest.tools/v3/assert" + "gotest.tools/v3/icmd" ) func (s *DockerSuite) TestVolumeCLICreate(c *testing.T) { diff --git a/integration-cli/docker_deprecated_api_v124_test.go b/integration-cli/docker_deprecated_api_v124_test.go index f448b8a02a..943d81b3fd 100644 --- a/integration-cli/docker_deprecated_api_v124_test.go +++ b/integration-cli/docker_deprecated_api_v124_test.go @@ -10,8 +10,8 @@ import ( "github.com/docker/docker/api/types/versions" "github.com/docker/docker/testutil/request" - "gotest.tools/assert" - is "gotest.tools/assert/cmp" + "gotest.tools/v3/assert" + is "gotest.tools/v3/assert/cmp" ) func formatV123StartAPIURL(url string) string { diff --git a/integration-cli/docker_deprecated_api_v124_unix_test.go b/integration-cli/docker_deprecated_api_v124_unix_test.go index 7e0c0e50ec..7bf7de44ea 100644 --- a/integration-cli/docker_deprecated_api_v124_unix_test.go +++ b/integration-cli/docker_deprecated_api_v124_unix_test.go @@ -7,7 +7,7 @@ import ( "testing" "github.com/docker/docker/testutil/request" - "gotest.tools/assert" + "gotest.tools/v3/assert" ) // #19100 This is a deprecated feature test, it should be removed in Docker 1.12 diff --git a/integration-cli/docker_hub_pull_suite_test.go b/integration-cli/docker_hub_pull_suite_test.go index 971d20808d..dbc6e94785 100644 --- a/integration-cli/docker_hub_pull_suite_test.go +++ b/integration-cli/docker_hub_pull_suite_test.go @@ -7,7 +7,7 @@ import ( "github.com/docker/docker/integration-cli/daemon" testdaemon "github.com/docker/docker/testutil/daemon" - "gotest.tools/assert" + "gotest.tools/v3/assert" ) // DockerHubPullSuite provides an isolated daemon that doesn't have all the diff --git a/integration-cli/docker_utils_test.go b/integration-cli/docker_utils_test.go index f817681fcd..389149e73c 100644 --- a/integration-cli/docker_utils_test.go +++ b/integration-cli/docker_utils_test.go @@ -19,10 +19,10 @@ import ( "github.com/docker/docker/client" "github.com/docker/docker/integration-cli/cli" "github.com/docker/docker/integration-cli/daemon" - "gotest.tools/assert" - "gotest.tools/assert/cmp" - "gotest.tools/icmd" - "gotest.tools/poll" + "gotest.tools/v3/assert" + "gotest.tools/v3/assert/cmp" + "gotest.tools/v3/icmd" + "gotest.tools/v3/poll" ) func deleteImages(images ...string) error { diff --git a/integration-cli/events_utils_test.go b/integration-cli/events_utils_test.go index a9116102a7..6a094ba160 100644 --- a/integration-cli/events_utils_test.go +++ b/integration-cli/events_utils_test.go @@ -12,7 +12,7 @@ import ( eventstestutils "github.com/docker/docker/daemon/events/testutils" "github.com/sirupsen/logrus" - "gotest.tools/assert" + "gotest.tools/v3/assert" ) // eventMatcher is a function that tries to match an event input. diff --git a/integration-cli/fixtures_linux_daemon_test.go b/integration-cli/fixtures_linux_daemon_test.go index 92a0ceadd2..9922517e09 100644 --- a/integration-cli/fixtures_linux_daemon_test.go +++ b/integration-cli/fixtures_linux_daemon_test.go @@ -11,7 +11,7 @@ import ( "testing" "github.com/docker/docker/testutil/fixtures/load" - "gotest.tools/assert" + "gotest.tools/v3/assert" ) func ensureSyscallTest(c *testing.T) { diff --git a/integration-cli/utils_test.go b/integration-cli/utils_test.go index 145857fcf6..5d1ad302b2 100644 --- a/integration-cli/utils_test.go +++ b/integration-cli/utils_test.go @@ -10,7 +10,7 @@ import ( "github.com/docker/docker/testutil" "github.com/pkg/errors" - "gotest.tools/icmd" + "gotest.tools/v3/icmd" ) func getPrefixAndSlashFromDaemonPlatform() (prefix, slash string) { diff --git a/integration/build/build_cgroupns_linux_test.go b/integration/build/build_cgroupns_linux_test.go index e88cdc5bb8..20e982d85f 100644 --- a/integration/build/build_cgroupns_linux_test.go +++ b/integration/build/build_cgroupns_linux_test.go @@ -12,8 +12,8 @@ import ( "github.com/docker/docker/pkg/jsonmessage" "github.com/docker/docker/testutil/daemon" "github.com/docker/docker/testutil/fakecontext" - "gotest.tools/assert" - "gotest.tools/skip" + "gotest.tools/v3/assert" + "gotest.tools/v3/skip" ) // Finds the output of `readlink /proc/<pid>/ns/cgroup` in build output diff --git a/integration/build/build_session_test.go b/integration/build/build_session_test.go index 5622a29a9a..d1219c79f5 100644 --- a/integration/build/build_session_test.go +++ b/integration/build/build_session_test.go @@ -16,9 +16,9 @@ import ( "github.com/moby/buildkit/session" "github.com/moby/buildkit/session/filesync" "golang.org/x/sync/errgroup" - "gotest.tools/assert" - is "gotest.tools/assert/cmp" - "gotest.tools/skip" + "gotest.tools/v3/assert" + is "gotest.tools/v3/assert/cmp" + "gotest.tools/v3/skip" ) func TestBuildWithSession(t *testing.T) { diff --git a/integration/build/build_squash_test.go b/integration/build/build_squash_test.go index fbc70033e0..7cacb8253b 100644 --- a/integration/build/build_squash_test.go +++ b/integration/build/build_squash_test.go @@ -14,9 +14,9 @@ import ( "github.com/docker/docker/pkg/stdcopy" "github.com/docker/docker/testutil/daemon" "github.com/docker/docker/testutil/fakecontext" - "gotest.tools/assert" - is "gotest.tools/assert/cmp" - "gotest.tools/skip" + "gotest.tools/v3/assert" + is "gotest.tools/v3/assert/cmp" + "gotest.tools/v3/skip" ) func TestBuildSquashParent(t *testing.T) { diff --git a/integration/build/build_test.go b/integration/build/build_test.go index a1f4e37193..0802b2cb3b 100644 --- a/integration/build/build_test.go +++ b/integration/build/build_test.go @@ -16,9 +16,9 @@ import ( "github.com/docker/docker/errdefs" "github.com/docker/docker/pkg/jsonmessage" "github.com/docker/docker/testutil/fakecontext" - "gotest.tools/assert" - is "gotest.tools/assert/cmp" - "gotest.tools/skip" + "gotest.tools/v3/assert" + is "gotest.tools/v3/assert/cmp" + "gotest.tools/v3/skip" ) func TestBuildWithRemoveAndForceRemove(t *testing.T) { @@ -38,8 +38,8 @@ func TestBuildWithRemoveAndForceRemove(t *testing.T) { RUN exit 0 RUN exit 0`, numberOfIntermediateContainers: 2, - rm: false, - forceRm: false, + rm: false, + forceRm: false, }, { name: "successful build with remove", @@ -47,8 +47,8 @@ func TestBuildWithRemoveAndForceRemove(t *testing.T) { RUN exit 0 RUN exit 0`, numberOfIntermediateContainers: 0, - rm: true, - forceRm: false, + rm: true, + forceRm: false, }, { name: "successful build with remove and force remove", @@ -56,8 +56,8 @@ func TestBuildWithRemoveAndForceRemove(t *testing.T) { RUN exit 0 RUN exit 0`, numberOfIntermediateContainers: 0, - rm: true, - forceRm: true, + rm: true, + forceRm: true, }, { name: "failed build with no removal", @@ -65,8 +65,8 @@ func TestBuildWithRemoveAndForceRemove(t *testing.T) { RUN exit 0 RUN exit 1`, numberOfIntermediateContainers: 2, - rm: false, - forceRm: false, + rm: false, + forceRm: false, }, { name: "failed build with remove", @@ -74,8 +74,8 @@ func TestBuildWithRemoveAndForceRemove(t *testing.T) { RUN exit 0 RUN exit 1`, numberOfIntermediateContainers: 1, - rm: true, - forceRm: false, + rm: true, + forceRm: false, }, { name: "failed build with remove and force remove", @@ -83,8 +83,8 @@ func TestBuildWithRemoveAndForceRemove(t *testing.T) { RUN exit 0 RUN exit 1`, numberOfIntermediateContainers: 0, - rm: true, - forceRm: true, + rm: true, + forceRm: true, }, } diff --git a/integration/config/config_test.go b/integration/config/config_test.go index a189fe7f84..ea6b87dd0f 100644 --- a/integration/config/config_test.go +++ b/integration/config/config_test.go @@ -17,10 +17,10 @@ import ( "github.com/docker/docker/integration/internal/swarm" "github.com/docker/docker/pkg/stdcopy" "github.com/docker/docker/testutil/daemon" - "gotest.tools/assert" - is "gotest.tools/assert/cmp" - "gotest.tools/poll" - "gotest.tools/skip" + "gotest.tools/v3/assert" + is "gotest.tools/v3/assert/cmp" + "gotest.tools/v3/poll" + "gotest.tools/v3/skip" ) func TestConfigList(t *testing.T) { diff --git a/integration/container/checkpoint_test.go b/integration/container/checkpoint_test.go index 726fe672c6..88ecce18b6 100644 --- a/integration/container/checkpoint_test.go +++ b/integration/container/checkpoint_test.go @@ -14,10 +14,10 @@ import ( "github.com/docker/docker/client" "github.com/docker/docker/integration/internal/container" "github.com/docker/docker/testutil/request" - "gotest.tools/assert" - is "gotest.tools/assert/cmp" - "gotest.tools/poll" - "gotest.tools/skip" + "gotest.tools/v3/assert" + is "gotest.tools/v3/assert/cmp" + "gotest.tools/v3/poll" + "gotest.tools/v3/skip" ) func containerExec(t *testing.T, client client.APIClient, cID string, cmd []string) { diff --git a/integration/container/container_test.go b/integration/container/container_test.go index 7365d142e2..86e02d9faa 100644 --- a/integration/container/container_test.go +++ b/integration/container/container_test.go @@ -5,8 +5,8 @@ import ( "testing" "github.com/docker/docker/testutil/request" - "gotest.tools/assert" - is "gotest.tools/assert/cmp" + "gotest.tools/v3/assert" + is "gotest.tools/v3/assert/cmp" ) func TestContainerInvalidJSON(t *testing.T) { diff --git a/integration/container/copy_test.go b/integration/container/copy_test.go index 229fe0a908..2ec8278ac9 100644 --- a/integration/container/copy_test.go +++ b/integration/container/copy_test.go @@ -15,9 +15,9 @@ import ( "github.com/docker/docker/integration/internal/container" "github.com/docker/docker/pkg/jsonmessage" "github.com/docker/docker/testutil/fakecontext" - "gotest.tools/assert" - is "gotest.tools/assert/cmp" - "gotest.tools/skip" + "gotest.tools/v3/assert" + is "gotest.tools/v3/assert/cmp" + "gotest.tools/v3/skip" ) func TestCopyFromContainerPathDoesNotExist(t *testing.T) { diff --git a/integration/container/create_test.go b/integration/container/create_test.go index adde301ccf..f1b6d32906 100644 --- a/integration/container/create_test.go +++ b/integration/container/create_test.go @@ -17,10 +17,10 @@ import ( ctr "github.com/docker/docker/integration/internal/container" "github.com/docker/docker/oci" "github.com/docker/docker/testutil/request" - "gotest.tools/assert" - is "gotest.tools/assert/cmp" - "gotest.tools/poll" - "gotest.tools/skip" + "gotest.tools/v3/assert" + is "gotest.tools/v3/assert/cmp" + "gotest.tools/v3/poll" + "gotest.tools/v3/skip" ) func TestCreateFailsWhenIdentifierDoesNotExist(t *testing.T) { diff --git a/integration/container/daemon_linux_test.go b/integration/container/daemon_linux_test.go index 5e260a495d..e43f8633c7 100644 --- a/integration/container/daemon_linux_test.go +++ b/integration/container/daemon_linux_test.go @@ -12,9 +12,9 @@ import ( "github.com/docker/docker/integration/internal/container" "github.com/docker/docker/testutil/daemon" "golang.org/x/sys/unix" - "gotest.tools/assert" - is "gotest.tools/assert/cmp" - "gotest.tools/skip" + "gotest.tools/v3/assert" + is "gotest.tools/v3/assert/cmp" + "gotest.tools/v3/skip" ) // This is a regression test for #36145 diff --git a/integration/container/diff_test.go b/integration/container/diff_test.go index 32e67447ba..7df11ce605 100644 --- a/integration/container/diff_test.go +++ b/integration/container/diff_test.go @@ -8,9 +8,9 @@ import ( containertypes "github.com/docker/docker/api/types/container" "github.com/docker/docker/integration/internal/container" "github.com/docker/docker/pkg/archive" - "gotest.tools/assert" - "gotest.tools/poll" - "gotest.tools/skip" + "gotest.tools/v3/assert" + "gotest.tools/v3/poll" + "gotest.tools/v3/skip" ) func TestDiff(t *testing.T) { diff --git a/integration/container/exec_test.go b/integration/container/exec_test.go index 392b5bb688..9c86fcac45 100644 --- a/integration/container/exec_test.go +++ b/integration/container/exec_test.go @@ -10,9 +10,9 @@ import ( "github.com/docker/docker/api/types/strslice" "github.com/docker/docker/api/types/versions" "github.com/docker/docker/integration/internal/container" - "gotest.tools/assert" - is "gotest.tools/assert/cmp" - "gotest.tools/skip" + "gotest.tools/v3/assert" + is "gotest.tools/v3/assert/cmp" + "gotest.tools/v3/skip" ) // TestExecWithCloseStdin adds case for moby#37870 issue. diff --git a/integration/container/export_test.go b/integration/container/export_test.go index 9058eda8a1..756442a600 100644 --- a/integration/container/export_test.go +++ b/integration/container/export_test.go @@ -11,10 +11,10 @@ import ( "github.com/docker/docker/integration/internal/container" "github.com/docker/docker/pkg/jsonmessage" "github.com/docker/docker/testutil/daemon" - "gotest.tools/assert" - is "gotest.tools/assert/cmp" - "gotest.tools/poll" - "gotest.tools/skip" + "gotest.tools/v3/assert" + is "gotest.tools/v3/assert/cmp" + "gotest.tools/v3/poll" + "gotest.tools/v3/skip" ) // export an image and try to import it into a new one diff --git a/integration/container/health_test.go b/integration/container/health_test.go index 2f90afd390..6d23a44d82 100644 --- a/integration/container/health_test.go +++ b/integration/container/health_test.go @@ -9,9 +9,9 @@ import ( containertypes "github.com/docker/docker/api/types/container" "github.com/docker/docker/client" "github.com/docker/docker/integration/internal/container" - "gotest.tools/assert" - "gotest.tools/poll" - "gotest.tools/skip" + "gotest.tools/v3/assert" + "gotest.tools/v3/poll" + "gotest.tools/v3/skip" ) // TestHealthCheckWorkdir verifies that health-checks inherit the containers' diff --git a/integration/container/inspect_test.go b/integration/container/inspect_test.go index 9c01fba511..4b7418adf2 100644 --- a/integration/container/inspect_test.go +++ b/integration/container/inspect_test.go @@ -9,10 +9,10 @@ import ( "github.com/docker/docker/client" "github.com/docker/docker/integration/internal/container" "github.com/docker/docker/testutil/request" - "gotest.tools/assert" - is "gotest.tools/assert/cmp" - "gotest.tools/poll" - "gotest.tools/skip" + "gotest.tools/v3/assert" + is "gotest.tools/v3/assert/cmp" + "gotest.tools/v3/poll" + "gotest.tools/v3/skip" ) func TestInspectCpusetInConfigPre120(t *testing.T) { diff --git a/integration/container/ipcmode_linux_test.go b/integration/container/ipcmode_linux_test.go index 1a4160b374..5a050413cd 100644 --- a/integration/container/ipcmode_linux_test.go +++ b/integration/container/ipcmode_linux_test.go @@ -16,10 +16,10 @@ import ( "github.com/docker/docker/integration/internal/container" "github.com/docker/docker/testutil/daemon" "github.com/docker/docker/testutil/request" - "gotest.tools/assert" - is "gotest.tools/assert/cmp" - "gotest.tools/fs" - "gotest.tools/skip" + "gotest.tools/v3/assert" + is "gotest.tools/v3/assert/cmp" + "gotest.tools/v3/fs" + "gotest.tools/v3/skip" ) // testIpcCheckDevExists checks whether a given mount (identified by its diff --git a/integration/container/kill_test.go b/integration/container/kill_test.go index a2c8f3c6ff..7e41019e4a 100644 --- a/integration/container/kill_test.go +++ b/integration/container/kill_test.go @@ -8,10 +8,10 @@ import ( "github.com/docker/docker/client" "github.com/docker/docker/integration/internal/container" "github.com/docker/docker/testutil/request" - "gotest.tools/assert" - is "gotest.tools/assert/cmp" - "gotest.tools/poll" - "gotest.tools/skip" + "gotest.tools/v3/assert" + is "gotest.tools/v3/assert/cmp" + "gotest.tools/v3/poll" + "gotest.tools/v3/skip" ) func TestKillContainerInvalidSignal(t *testing.T) { diff --git a/integration/container/links_linux_test.go b/integration/container/links_linux_test.go index e0fb9d6284..efd04decb6 100644 --- a/integration/container/links_linux_test.go +++ b/integration/container/links_linux_test.go @@ -9,9 +9,9 @@ import ( "github.com/docker/docker/api/types" "github.com/docker/docker/api/types/filters" "github.com/docker/docker/integration/internal/container" - "gotest.tools/assert" - is "gotest.tools/assert/cmp" - "gotest.tools/skip" + "gotest.tools/v3/assert" + is "gotest.tools/v3/assert/cmp" + "gotest.tools/v3/skip" ) func TestLinksEtcHostsContentMatch(t *testing.T) { diff --git a/integration/container/logs_test.go b/integration/container/logs_test.go index 79e13fa80e..08ab25ee84 100644 --- a/integration/container/logs_test.go +++ b/integration/container/logs_test.go @@ -8,8 +8,8 @@ import ( "github.com/docker/docker/api/types" "github.com/docker/docker/integration/internal/container" "github.com/docker/docker/pkg/stdcopy" - "gotest.tools/assert" - "gotest.tools/skip" + "gotest.tools/v3/assert" + "gotest.tools/v3/skip" ) // Regression test for #35370 diff --git a/integration/container/mounts_linux_test.go b/integration/container/mounts_linux_test.go index 1ee5dd100b..f2a1f48700 100644 --- a/integration/container/mounts_linux_test.go +++ b/integration/container/mounts_linux_test.go @@ -16,11 +16,11 @@ import ( "github.com/docker/docker/integration/internal/container" "github.com/docker/docker/pkg/mount" "github.com/docker/docker/pkg/system" - "gotest.tools/assert" - is "gotest.tools/assert/cmp" - "gotest.tools/fs" - "gotest.tools/poll" - "gotest.tools/skip" + "gotest.tools/v3/assert" + is "gotest.tools/v3/assert/cmp" + "gotest.tools/v3/fs" + "gotest.tools/v3/poll" + "gotest.tools/v3/skip" ) func TestContainerNetworkMountsNoChown(t *testing.T) { diff --git a/integration/container/nat_test.go b/integration/container/nat_test.go index 8a19d78a59..2cd4e141b6 100644 --- a/integration/container/nat_test.go +++ b/integration/container/nat_test.go @@ -14,10 +14,10 @@ import ( "github.com/docker/docker/api/types" "github.com/docker/docker/integration/internal/container" "github.com/docker/go-connections/nat" - "gotest.tools/assert" - is "gotest.tools/assert/cmp" - "gotest.tools/poll" - "gotest.tools/skip" + "gotest.tools/v3/assert" + is "gotest.tools/v3/assert/cmp" + "gotest.tools/v3/poll" + "gotest.tools/v3/skip" ) func TestNetworkNat(t *testing.T) { diff --git a/integration/container/pause_test.go b/integration/container/pause_test.go index 22a9b568bf..050b00f7ac 100644 --- a/integration/container/pause_test.go +++ b/integration/container/pause_test.go @@ -12,10 +12,10 @@ import ( "github.com/docker/docker/api/types/versions" "github.com/docker/docker/integration/internal/container" "github.com/docker/docker/testutil/request" - "gotest.tools/assert" - is "gotest.tools/assert/cmp" - "gotest.tools/poll" - "gotest.tools/skip" + "gotest.tools/v3/assert" + is "gotest.tools/v3/assert/cmp" + "gotest.tools/v3/poll" + "gotest.tools/v3/skip" ) func TestPause(t *testing.T) { diff --git a/integration/container/ps_test.go b/integration/container/ps_test.go index 7c04ac307f..6e3a09a19c 100644 --- a/integration/container/ps_test.go +++ b/integration/container/ps_test.go @@ -7,8 +7,8 @@ import ( "github.com/docker/docker/api/types" "github.com/docker/docker/api/types/filters" "github.com/docker/docker/integration/internal/container" - "gotest.tools/assert" - is "gotest.tools/assert/cmp" + "gotest.tools/v3/assert" + is "gotest.tools/v3/assert/cmp" ) func TestPsFilter(t *testing.T) { diff --git a/integration/container/remove_test.go b/integration/container/remove_test.go index 0239a97f47..860d5479e3 100644 --- a/integration/container/remove_test.go +++ b/integration/container/remove_test.go @@ -9,11 +9,11 @@ import ( "github.com/docker/docker/api/types" "github.com/docker/docker/api/types/filters" "github.com/docker/docker/integration/internal/container" - "gotest.tools/assert" - is "gotest.tools/assert/cmp" - "gotest.tools/fs" - "gotest.tools/poll" - "gotest.tools/skip" + "gotest.tools/v3/assert" + is "gotest.tools/v3/assert/cmp" + "gotest.tools/v3/fs" + "gotest.tools/v3/poll" + "gotest.tools/v3/skip" ) func getPrefixAndSlashFromDaemonPlatform() (prefix, slash string) { diff --git a/integration/container/rename_test.go b/integration/container/rename_test.go index fc94b33677..e7aa139ef9 100644 --- a/integration/container/rename_test.go +++ b/integration/container/rename_test.go @@ -11,10 +11,10 @@ import ( "github.com/docker/docker/api/types/versions" "github.com/docker/docker/integration/internal/container" "github.com/docker/docker/pkg/stringid" - "gotest.tools/assert" - is "gotest.tools/assert/cmp" - "gotest.tools/poll" - "gotest.tools/skip" + "gotest.tools/v3/assert" + is "gotest.tools/v3/assert/cmp" + "gotest.tools/v3/poll" + "gotest.tools/v3/skip" ) // This test simulates the scenario mentioned in #31392: diff --git a/integration/container/resize_test.go b/integration/container/resize_test.go index 2d18a19869..876fb4632a 100644 --- a/integration/container/resize_test.go +++ b/integration/container/resize_test.go @@ -10,10 +10,10 @@ import ( "github.com/docker/docker/api/types/versions" "github.com/docker/docker/integration/internal/container" req "github.com/docker/docker/testutil/request" - "gotest.tools/assert" - is "gotest.tools/assert/cmp" - "gotest.tools/poll" - "gotest.tools/skip" + "gotest.tools/v3/assert" + is "gotest.tools/v3/assert/cmp" + "gotest.tools/v3/poll" + "gotest.tools/v3/skip" ) func TestResize(t *testing.T) { diff --git a/integration/container/restart_test.go b/integration/container/restart_test.go index 7ba120f14c..e74809d4f5 100644 --- a/integration/container/restart_test.go +++ b/integration/container/restart_test.go @@ -9,8 +9,8 @@ import ( "github.com/docker/docker/api/types" "github.com/docker/docker/api/types/container" "github.com/docker/docker/testutil/daemon" - "gotest.tools/assert" - "gotest.tools/skip" + "gotest.tools/v3/assert" + "gotest.tools/v3/skip" ) func TestDaemonRestartKillContainers(t *testing.T) { diff --git a/integration/container/run_cgroupns_linux_test.go b/integration/container/run_cgroupns_linux_test.go index f06d01e3da..9754a9682c 100644 --- a/integration/container/run_cgroupns_linux_test.go +++ b/integration/container/run_cgroupns_linux_test.go @@ -10,10 +10,10 @@ import ( "github.com/docker/docker/integration/internal/container" "github.com/docker/docker/integration/internal/requirement" "github.com/docker/docker/testutil/daemon" - "gotest.tools/assert" - is "gotest.tools/assert/cmp" - "gotest.tools/poll" - "gotest.tools/skip" + "gotest.tools/v3/assert" + is "gotest.tools/v3/assert/cmp" + "gotest.tools/v3/poll" + "gotest.tools/v3/skip" ) // Gets the value of the cgroup namespace for pid 1 of a container diff --git a/integration/container/run_linux_test.go b/integration/container/run_linux_test.go index e25246eb26..8adca9203b 100644 --- a/integration/container/run_linux_test.go +++ b/integration/container/run_linux_test.go @@ -11,10 +11,10 @@ import ( "github.com/docker/docker/api/types/versions" "github.com/docker/docker/integration/internal/container" net "github.com/docker/docker/integration/internal/network" - "gotest.tools/assert" - is "gotest.tools/assert/cmp" - "gotest.tools/poll" - "gotest.tools/skip" + "gotest.tools/v3/assert" + is "gotest.tools/v3/assert/cmp" + "gotest.tools/v3/poll" + "gotest.tools/v3/skip" ) func TestKernelTCPMemory(t *testing.T) { diff --git a/integration/container/stats_test.go b/integration/container/stats_test.go index 66ce5a218a..a33f8f809c 100644 --- a/integration/container/stats_test.go +++ b/integration/container/stats_test.go @@ -9,10 +9,10 @@ import ( "github.com/docker/docker/api/types" "github.com/docker/docker/integration/internal/container" - "gotest.tools/assert" - is "gotest.tools/assert/cmp" - "gotest.tools/poll" - "gotest.tools/skip" + "gotest.tools/v3/assert" + is "gotest.tools/v3/assert/cmp" + "gotest.tools/v3/poll" + "gotest.tools/v3/skip" ) func TestStats(t *testing.T) { diff --git a/integration/container/stop_linux_test.go b/integration/container/stop_linux_test.go index 1aa80c90c7..9ce11f37d1 100644 --- a/integration/container/stop_linux_test.go +++ b/integration/container/stop_linux_test.go @@ -10,10 +10,10 @@ import ( "github.com/docker/docker/api/types" "github.com/docker/docker/integration/internal/container" - "gotest.tools/assert" - "gotest.tools/icmd" - "gotest.tools/poll" - "gotest.tools/skip" + "gotest.tools/v3/assert" + "gotest.tools/v3/icmd" + "gotest.tools/v3/poll" + "gotest.tools/v3/skip" ) // TestStopContainerWithTimeout checks that ContainerStop with diff --git a/integration/container/stop_test.go b/integration/container/stop_test.go index c88e1c965a..7e12996e33 100644 --- a/integration/container/stop_test.go +++ b/integration/container/stop_test.go @@ -6,8 +6,8 @@ import ( "time" "github.com/docker/docker/integration/internal/container" - "gotest.tools/assert" - "gotest.tools/poll" + "gotest.tools/v3/assert" + "gotest.tools/v3/poll" ) func TestStopContainerWithRestartPolicyAlways(t *testing.T) { diff --git a/integration/container/stop_windows_test.go b/integration/container/stop_windows_test.go index ecda947bc1..a20ba5e6d9 100644 --- a/integration/container/stop_windows_test.go +++ b/integration/container/stop_windows_test.go @@ -7,9 +7,9 @@ import ( "time" "github.com/docker/docker/integration/internal/container" - "gotest.tools/assert" - "gotest.tools/poll" - "gotest.tools/skip" + "gotest.tools/v3/assert" + "gotest.tools/v3/poll" + "gotest.tools/v3/skip" ) // TestStopContainerWithTimeout checks that ContainerStop with diff --git a/integration/container/update_linux_test.go b/integration/container/update_linux_test.go index 426d00950d..c0caabf141 100644 --- a/integration/container/update_linux_test.go +++ b/integration/container/update_linux_test.go @@ -11,10 +11,10 @@ import ( "github.com/docker/docker/client" "github.com/docker/docker/integration/internal/container" "github.com/docker/docker/testutil/request" - "gotest.tools/assert" - is "gotest.tools/assert/cmp" - "gotest.tools/poll" - "gotest.tools/skip" + "gotest.tools/v3/assert" + is "gotest.tools/v3/assert/cmp" + "gotest.tools/v3/poll" + "gotest.tools/v3/skip" ) func TestUpdateMemory(t *testing.T) { diff --git a/integration/container/update_test.go b/integration/container/update_test.go index 53b6480c70..086014540a 100644 --- a/integration/container/update_test.go +++ b/integration/container/update_test.go @@ -7,9 +7,9 @@ import ( containertypes "github.com/docker/docker/api/types/container" "github.com/docker/docker/integration/internal/container" - "gotest.tools/assert" - is "gotest.tools/assert/cmp" - "gotest.tools/poll" + "gotest.tools/v3/assert" + is "gotest.tools/v3/assert/cmp" + "gotest.tools/v3/poll" ) func TestUpdateRestartPolicy(t *testing.T) { diff --git a/integration/container/wait_test.go b/integration/container/wait_test.go index 061b426918..44e2c81143 100644 --- a/integration/container/wait_test.go +++ b/integration/container/wait_test.go @@ -7,10 +7,10 @@ import ( "github.com/docker/docker/integration/internal/container" "github.com/docker/docker/testutil/request" - "gotest.tools/assert" - is "gotest.tools/assert/cmp" - "gotest.tools/poll" - "gotest.tools/skip" + "gotest.tools/v3/assert" + is "gotest.tools/v3/assert/cmp" + "gotest.tools/v3/poll" + "gotest.tools/v3/skip" ) func TestWaitNonBlocked(t *testing.T) { diff --git a/integration/distribution/inspect_test.go.temp b/integration/distribution/inspect_test.go.temp new file mode 100644 index 0000000000..5a821f6415 --- /dev/null +++ b/integration/distribution/inspect_test.go.temp @@ -0,0 +1,24 @@ +package distribution + +import ( + "context" + "testing" + + "github.com/docker/docker/internal/test/request" + "gotest.tools/v3/assert" +) + +// tagging a named image in a new unprefixed repo should work +func TestUnknownManifest(t *testing.T) { + defer setupTest(t)() + client := request.NewAPIClient(t) + ctx := context.Background() + + // By name + insp, err := client.DistributionInspect(ctx, "nosuchimage:latest", "") + assert.NilError(t, err) + assert.Equal(t, insp.Descriptor, nil) + + //err = client.ImageTag(ctx, insp.ID, "testfoobarbaz") + //assert.NilError(t, err) +} diff --git a/integration/distribution/main_test.go.temp b/integration/distribution/main_test.go.temp new file mode 100644 index 0000000000..bd75788087 --- /dev/null +++ b/integration/distribution/main_test.go.temp @@ -0,0 +1,33 @@ +package distribution // import "github.com/docker/docker/integration/distribution" + +import ( + "fmt" + "os" + "testing" + + "github.com/docker/docker/internal/test/environment" +) + +var testEnv *environment.Execution + +func TestMain(m *testing.M) { + var err error + testEnv, err = environment.New() + if err != nil { + fmt.Println(err) + os.Exit(1) + } + err = environment.EnsureFrozenImagesLinux(testEnv) + if err != nil { + fmt.Println(err) + os.Exit(1) + } + + testEnv.Print() + os.Exit(m.Run()) +} + +func setupTest(t *testing.T) func() { + environment.ProtectAll(t, testEnv) + return func() { testEnv.Clean(t) } +} diff --git a/integration/image/commit_test.go b/integration/image/commit_test.go index 26850c52da..b9d4cb5a16 100644 --- a/integration/image/commit_test.go +++ b/integration/image/commit_test.go @@ -7,9 +7,9 @@ import ( "github.com/docker/docker/api/types" "github.com/docker/docker/api/types/versions" "github.com/docker/docker/integration/internal/container" - "gotest.tools/assert" - is "gotest.tools/assert/cmp" - "gotest.tools/skip" + "gotest.tools/v3/assert" + is "gotest.tools/v3/assert/cmp" + "gotest.tools/v3/skip" ) func TestCommitInheritsEnv(t *testing.T) { diff --git a/integration/image/import_test.go b/integration/image/import_test.go index c2b953ae25..c133d3ccbc 100644 --- a/integration/image/import_test.go +++ b/integration/image/import_test.go @@ -11,8 +11,8 @@ import ( "github.com/docker/docker/api/types" "github.com/docker/docker/testutil" "github.com/docker/docker/testutil/daemon" - "gotest.tools/assert" - "gotest.tools/skip" + "gotest.tools/v3/assert" + "gotest.tools/v3/skip" ) // Ensure we don't regress on CVE-2017-14992. diff --git a/integration/image/list_test.go b/integration/image/list_test.go index dcbd8c4a97..0dd5735537 100644 --- a/integration/image/list_test.go +++ b/integration/image/list_test.go @@ -7,9 +7,9 @@ import ( "github.com/docker/docker/api/types" "github.com/docker/docker/api/types/filters" "github.com/docker/docker/api/types/versions" - "gotest.tools/assert" - is "gotest.tools/assert/cmp" - "gotest.tools/skip" + "gotest.tools/v3/assert" + is "gotest.tools/v3/assert/cmp" + "gotest.tools/v3/skip" ) // Regression : #38171 diff --git a/integration/image/pull_test.go b/integration/image/pull_test.go index f05dc64672..15db3295d8 100644 --- a/integration/image/pull_test.go +++ b/integration/image/pull_test.go @@ -7,8 +7,8 @@ import ( "github.com/docker/docker/api/types" "github.com/docker/docker/api/types/versions" "github.com/docker/docker/errdefs" - "gotest.tools/assert" - "gotest.tools/skip" + "gotest.tools/v3/assert" + "gotest.tools/v3/skip" ) func TestImagePullPlatformInvalid(t *testing.T) { diff --git a/integration/image/remove_test.go b/integration/image/remove_test.go index 603f191b4f..5ed8fe630e 100644 --- a/integration/image/remove_test.go +++ b/integration/image/remove_test.go @@ -6,9 +6,9 @@ import ( "github.com/docker/docker/api/types" "github.com/docker/docker/integration/internal/container" - "gotest.tools/assert" - is "gotest.tools/assert/cmp" - "gotest.tools/skip" + "gotest.tools/v3/assert" + is "gotest.tools/v3/assert/cmp" + "gotest.tools/v3/skip" ) func TestRemoveImageOrphaning(t *testing.T) { diff --git a/integration/image/remove_unix_test.go b/integration/image/remove_unix_test.go index cbcb3c23fb..a053e4116e 100644 --- a/integration/image/remove_unix_test.go +++ b/integration/image/remove_unix_test.go @@ -22,8 +22,8 @@ import ( "github.com/docker/docker/pkg/idtools" "github.com/docker/docker/testutil/daemon" "github.com/docker/docker/testutil/fakecontext" - "gotest.tools/assert" - "gotest.tools/skip" + "gotest.tools/v3/assert" + "gotest.tools/v3/skip" ) // This is a regression test for #38488 @@ -46,7 +46,7 @@ func TestRemoveImageGarbageCollector(t *testing.T) { layerStores := make(map[string]layer.Store) layerStores[runtime.GOOS], _ = layer.NewStoreFromOptions(layer.StoreOptions{ - Root: d.Root, + Root: d.Root, MetadataStorePathTemplate: filepath.Join(d.RootDir(), "image", "%s", "layerdb"), GraphDriver: d.StorageDriver(), GraphDriverOptions: nil, diff --git a/integration/image/tag_test.go b/integration/image/tag_test.go index b2d28569ae..e14100e9a1 100644 --- a/integration/image/tag_test.go +++ b/integration/image/tag_test.go @@ -6,9 +6,9 @@ import ( "testing" "github.com/docker/docker/testutil" - "gotest.tools/assert" - is "gotest.tools/assert/cmp" - "gotest.tools/skip" + "gotest.tools/v3/assert" + is "gotest.tools/v3/assert/cmp" + "gotest.tools/v3/skip" ) // tagging a named image in a new unprefixed repo should work diff --git a/integration/internal/container/container.go b/integration/internal/container/container.go index e8b87ec068..46a2c51daa 100644 --- a/integration/internal/container/container.go +++ b/integration/internal/container/container.go @@ -9,7 +9,7 @@ import ( "github.com/docker/docker/api/types/container" "github.com/docker/docker/api/types/network" "github.com/docker/docker/client" - "gotest.tools/assert" + "gotest.tools/v3/assert" ) // TestContainerConfig holds container configuration struct that diff --git a/integration/internal/container/states.go b/integration/internal/container/states.go index 2397159188..fea8e3f598 100644 --- a/integration/internal/container/states.go +++ b/integration/internal/container/states.go @@ -6,7 +6,7 @@ import ( "github.com/docker/docker/client" "github.com/pkg/errors" - "gotest.tools/poll" + "gotest.tools/v3/poll" ) // IsStopped verifies the container is in stopped state. diff --git a/integration/internal/network/network.go b/integration/internal/network/network.go index c8194d7898..4f1f176993 100644 --- a/integration/internal/network/network.go +++ b/integration/internal/network/network.go @@ -6,7 +6,7 @@ import ( "github.com/docker/docker/api/types" "github.com/docker/docker/client" - "gotest.tools/assert" + "gotest.tools/v3/assert" ) func createNetwork(ctx context.Context, client client.APIClient, name string, ops ...func(*types.NetworkCreate)) (string, error) { diff --git a/integration/internal/network/states.go b/integration/internal/network/states.go index 1f00e0b80c..31bf6ac7fe 100644 --- a/integration/internal/network/states.go +++ b/integration/internal/network/states.go @@ -5,7 +5,7 @@ import ( "github.com/docker/docker/api/types" "github.com/docker/docker/client" - "gotest.tools/poll" + "gotest.tools/v3/poll" ) // IsRemoved verifies the network is removed. diff --git a/integration/internal/requirement/requirement_linux.go b/integration/internal/requirement/requirement_linux.go index 1197e407ed..0718646f9c 100644 --- a/integration/internal/requirement/requirement_linux.go +++ b/integration/internal/requirement/requirement_linux.go @@ -5,7 +5,7 @@ import ( "strings" "github.com/docker/docker/pkg/parsers/kernel" - "gotest.tools/icmd" + "gotest.tools/v3/icmd" ) // CgroupNamespacesEnabled checks if cgroup namespaces are enabled on this host diff --git a/integration/internal/swarm/service.go b/integration/internal/swarm/service.go index ccf945b6fa..ed30045c2d 100644 --- a/integration/internal/swarm/service.go +++ b/integration/internal/swarm/service.go @@ -12,9 +12,9 @@ import ( "github.com/docker/docker/client" "github.com/docker/docker/testutil/daemon" "github.com/docker/docker/testutil/environment" - "gotest.tools/assert" - "gotest.tools/poll" - "gotest.tools/skip" + "gotest.tools/v3/assert" + "gotest.tools/v3/poll" + "gotest.tools/v3/skip" ) // ServicePoll tweaks the pollSettings for `service` diff --git a/integration/internal/swarm/states.go b/integration/internal/swarm/states.go index 77b3f30209..3f69feeef3 100644 --- a/integration/internal/swarm/states.go +++ b/integration/internal/swarm/states.go @@ -8,7 +8,7 @@ import ( "github.com/docker/docker/api/types/filters" swarmtypes "github.com/docker/docker/api/types/swarm" "github.com/docker/docker/client" - "gotest.tools/poll" + "gotest.tools/v3/poll" ) // NoTasksForService verifies that there are no more tasks for the given service diff --git a/integration/network/delete_test.go b/integration/network/delete_test.go index 1d2b0c5e07..221960e986 100644 --- a/integration/network/delete_test.go +++ b/integration/network/delete_test.go @@ -8,9 +8,9 @@ import ( "github.com/docker/docker/api/types/versions" dclient "github.com/docker/docker/client" "github.com/docker/docker/integration/internal/network" - "gotest.tools/assert" - is "gotest.tools/assert/cmp" - "gotest.tools/skip" + "gotest.tools/v3/assert" + is "gotest.tools/v3/assert/cmp" + "gotest.tools/v3/skip" ) func containsNetwork(nws []types.NetworkResource, networkID string) bool { diff --git a/integration/network/helpers.go b/integration/network/helpers.go index d5907f2baa..e7b087d9cd 100644 --- a/integration/network/helpers.go +++ b/integration/network/helpers.go @@ -11,8 +11,8 @@ import ( "github.com/docker/docker/api/types" "github.com/docker/docker/client" "github.com/docker/docker/pkg/parsers/kernel" - "gotest.tools/assert/cmp" - "gotest.tools/icmd" + "gotest.tools/v3/assert/cmp" + "gotest.tools/v3/icmd" ) // CreateMasterDummy creates a dummy network interface diff --git a/integration/network/helpers_windows.go b/integration/network/helpers_windows.go index 049d89310a..0652c05dcf 100644 --- a/integration/network/helpers_windows.go +++ b/integration/network/helpers_windows.go @@ -7,7 +7,7 @@ import ( "github.com/docker/docker/api/types" "github.com/docker/docker/client" - "gotest.tools/assert/cmp" + "gotest.tools/v3/assert/cmp" ) // IsNetworkAvailable provides a comparison to check if a docker network is available diff --git a/integration/network/inspect_test.go b/integration/network/inspect_test.go index dabf96926f..0a6caac83c 100644 --- a/integration/network/inspect_test.go +++ b/integration/network/inspect_test.go @@ -7,9 +7,9 @@ import ( "github.com/docker/docker/api/types" "github.com/docker/docker/integration/internal/network" "github.com/docker/docker/integration/internal/swarm" - "gotest.tools/assert" - "gotest.tools/poll" - "gotest.tools/skip" + "gotest.tools/v3/assert" + "gotest.tools/v3/poll" + "gotest.tools/v3/skip" ) func TestInspectNetwork(t *testing.T) { diff --git a/integration/network/ipvlan/ipvlan_test.go b/integration/network/ipvlan/ipvlan_test.go index dd04206597..3a78b3d7f1 100644 --- a/integration/network/ipvlan/ipvlan_test.go +++ b/integration/network/ipvlan/ipvlan_test.go @@ -16,8 +16,8 @@ import ( net "github.com/docker/docker/integration/internal/network" n "github.com/docker/docker/integration/network" "github.com/docker/docker/testutil/daemon" - "gotest.tools/assert" - "gotest.tools/skip" + "gotest.tools/v3/assert" + "gotest.tools/v3/skip" ) func TestDockerNetworkIpvlanPersistance(t *testing.T) { diff --git a/integration/network/macvlan/macvlan_test.go b/integration/network/macvlan/macvlan_test.go index 4caed271f1..439a2dcbb8 100644 --- a/integration/network/macvlan/macvlan_test.go +++ b/integration/network/macvlan/macvlan_test.go @@ -13,8 +13,8 @@ import ( net "github.com/docker/docker/integration/internal/network" n "github.com/docker/docker/integration/network" "github.com/docker/docker/testutil/daemon" - "gotest.tools/assert" - "gotest.tools/skip" + "gotest.tools/v3/assert" + "gotest.tools/v3/skip" ) func TestDockerNetworkMacvlanPersistance(t *testing.T) { diff --git a/integration/network/network_test.go b/integration/network/network_test.go index b0a3afa107..0def9754ad 100644 --- a/integration/network/network_test.go +++ b/integration/network/network_test.go @@ -12,9 +12,9 @@ import ( "github.com/docker/docker/integration/internal/container" "github.com/docker/docker/testutil/daemon" "github.com/docker/docker/testutil/request" - "gotest.tools/assert" - is "gotest.tools/assert/cmp" - "gotest.tools/skip" + "gotest.tools/v3/assert" + is "gotest.tools/v3/assert/cmp" + "gotest.tools/v3/skip" ) func TestRunContainerWithBridgeNone(t *testing.T) { diff --git a/integration/network/service_test.go b/integration/network/service_test.go index 8942f7f07a..0bf11ae0f6 100644 --- a/integration/network/service_test.go +++ b/integration/network/service_test.go @@ -12,10 +12,10 @@ import ( "github.com/docker/docker/integration/internal/network" "github.com/docker/docker/integration/internal/swarm" "github.com/docker/docker/testutil/daemon" - "gotest.tools/assert" - "gotest.tools/icmd" - "gotest.tools/poll" - "gotest.tools/skip" + "gotest.tools/v3/assert" + "gotest.tools/v3/icmd" + "gotest.tools/v3/poll" + "gotest.tools/v3/skip" ) // delInterface removes given network interface diff --git a/integration/plugin/authz/authz_plugin_test.go b/integration/plugin/authz/authz_plugin_test.go index af8acaa428..2ae52f3965 100644 --- a/integration/plugin/authz/authz_plugin_test.go +++ b/integration/plugin/authz/authz_plugin_test.go @@ -25,9 +25,9 @@ import ( "github.com/docker/docker/pkg/archive" "github.com/docker/docker/pkg/authorization" "github.com/docker/docker/testutil/environment" - "gotest.tools/assert" - "gotest.tools/poll" - "gotest.tools/skip" + "gotest.tools/v3/assert" + "gotest.tools/v3/poll" + "gotest.tools/v3/skip" ) const ( diff --git a/integration/plugin/authz/authz_plugin_v2_test.go b/integration/plugin/authz/authz_plugin_v2_test.go index 937bcd3ef6..b72552ac4f 100644 --- a/integration/plugin/authz/authz_plugin_v2_test.go +++ b/integration/plugin/authz/authz_plugin_v2_test.go @@ -16,8 +16,8 @@ import ( "github.com/docker/docker/client" "github.com/docker/docker/integration/internal/container" "github.com/docker/docker/integration/internal/requirement" - "gotest.tools/assert" - "gotest.tools/skip" + "gotest.tools/v3/assert" + "gotest.tools/v3/skip" ) var ( diff --git a/integration/plugin/authz/main_test.go b/integration/plugin/authz/main_test.go index 07dbefa33c..7c1bf56c57 100644 --- a/integration/plugin/authz/main_test.go +++ b/integration/plugin/authz/main_test.go @@ -16,7 +16,7 @@ import ( "github.com/docker/docker/pkg/plugins" "github.com/docker/docker/testutil/daemon" "github.com/docker/docker/testutil/environment" - "gotest.tools/skip" + "gotest.tools/v3/skip" ) var ( diff --git a/integration/plugin/common/plugin_test.go b/integration/plugin/common/plugin_test.go index 6e2a5e9e90..35dc7fb980 100644 --- a/integration/plugin/common/plugin_test.go +++ b/integration/plugin/common/plugin_test.go @@ -5,8 +5,8 @@ import ( "testing" "github.com/docker/docker/testutil/request" - "gotest.tools/assert" - is "gotest.tools/assert/cmp" + "gotest.tools/v3/assert" + is "gotest.tools/v3/assert/cmp" ) func TestPluginInvalidJSON(t *testing.T) { diff --git a/integration/plugin/graphdriver/external_test.go b/integration/plugin/graphdriver/external_test.go index 0013ec7bc7..c9c99ff070 100644 --- a/integration/plugin/graphdriver/external_test.go +++ b/integration/plugin/graphdriver/external_test.go @@ -22,9 +22,9 @@ import ( "github.com/docker/docker/pkg/archive" "github.com/docker/docker/pkg/plugins" "github.com/docker/docker/testutil/daemon" - "gotest.tools/assert" - is "gotest.tools/assert/cmp" - "gotest.tools/skip" + "gotest.tools/v3/assert" + is "gotest.tools/v3/assert/cmp" + "gotest.tools/v3/skip" ) type graphEventsCounter struct { diff --git a/integration/plugin/logging/logging_linux_test.go b/integration/plugin/logging/logging_linux_test.go index 3ee66fdc77..a959e86bcc 100644 --- a/integration/plugin/logging/logging_linux_test.go +++ b/integration/plugin/logging/logging_linux_test.go @@ -11,8 +11,8 @@ import ( "github.com/docker/docker/api/types" "github.com/docker/docker/integration/internal/container" "github.com/docker/docker/testutil/daemon" - "gotest.tools/assert" - "gotest.tools/skip" + "gotest.tools/v3/assert" + "gotest.tools/v3/skip" ) func TestContinueAfterPluginCrash(t *testing.T) { diff --git a/integration/plugin/logging/validation_test.go b/integration/plugin/logging/validation_test.go index 07f8c21ce8..8a59b65474 100644 --- a/integration/plugin/logging/validation_test.go +++ b/integration/plugin/logging/validation_test.go @@ -8,8 +8,8 @@ import ( "github.com/docker/docker/api/types" "github.com/docker/docker/testutil/daemon" - "gotest.tools/assert" - "gotest.tools/skip" + "gotest.tools/v3/assert" + "gotest.tools/v3/skip" ) // Regression test for #35553 diff --git a/integration/plugin/volumes/helpers_test.go b/integration/plugin/volumes/helpers_test.go index 1238ae62d5..223ea9144a 100644 --- a/integration/plugin/volumes/helpers_test.go +++ b/integration/plugin/volumes/helpers_test.go @@ -12,7 +12,7 @@ import ( "github.com/docker/docker/pkg/locker" "github.com/docker/docker/testutil/fixtures/plugin" "github.com/pkg/errors" - "gotest.tools/assert" + "gotest.tools/v3/assert" ) var pluginBuildLock = locker.New() diff --git a/integration/plugin/volumes/mounts_test.go b/integration/plugin/volumes/mounts_test.go index e3165c22f2..87ec9caeca 100644 --- a/integration/plugin/volumes/mounts_test.go +++ b/integration/plugin/volumes/mounts_test.go @@ -9,8 +9,8 @@ import ( "github.com/docker/docker/api/types" "github.com/docker/docker/testutil/daemon" "github.com/docker/docker/testutil/fixtures/plugin" - "gotest.tools/assert" - "gotest.tools/skip" + "gotest.tools/v3/assert" + "gotest.tools/v3/skip" ) // TestPluginWithDevMounts tests very specific regression caused by mounts ordering diff --git a/integration/secret/secret_test.go b/integration/secret/secret_test.go index 4f9c7f5102..1ce11d0496 100644 --- a/integration/secret/secret_test.go +++ b/integration/secret/secret_test.go @@ -13,9 +13,9 @@ import ( "github.com/docker/docker/client" "github.com/docker/docker/integration/internal/swarm" "github.com/docker/docker/pkg/stdcopy" - "gotest.tools/assert" - is "gotest.tools/assert/cmp" - "gotest.tools/skip" + "gotest.tools/v3/assert" + is "gotest.tools/v3/assert/cmp" + "gotest.tools/v3/skip" ) func TestSecretInspect(t *testing.T) { diff --git a/integration/service/create_test.go b/integration/service/create_test.go index 24f73616ac..5f3828edc6 100644 --- a/integration/service/create_test.go +++ b/integration/service/create_test.go @@ -17,10 +17,10 @@ import ( "github.com/docker/docker/integration/internal/network" "github.com/docker/docker/integration/internal/swarm" "github.com/docker/docker/testutil/daemon" - "gotest.tools/assert" - is "gotest.tools/assert/cmp" - "gotest.tools/poll" - "gotest.tools/skip" + "gotest.tools/v3/assert" + is "gotest.tools/v3/assert/cmp" + "gotest.tools/v3/poll" + "gotest.tools/v3/skip" ) func TestServiceCreateInit(t *testing.T) { diff --git a/integration/service/inspect_test.go b/integration/service/inspect_test.go index b48d3301d2..7b6d6ff116 100644 --- a/integration/service/inspect_test.go +++ b/integration/service/inspect_test.go @@ -10,10 +10,10 @@ import ( swarmtypes "github.com/docker/docker/api/types/swarm" "github.com/docker/docker/integration/internal/swarm" "github.com/google/go-cmp/cmp" - "gotest.tools/assert" - is "gotest.tools/assert/cmp" - "gotest.tools/poll" - "gotest.tools/skip" + "gotest.tools/v3/assert" + is "gotest.tools/v3/assert/cmp" + "gotest.tools/v3/poll" + "gotest.tools/v3/skip" ) func TestInspect(t *testing.T) { diff --git a/integration/service/jobs_test.go b/integration/service/jobs_test.go index 6c1ac06f88..47b0750648 100644 --- a/integration/service/jobs_test.go +++ b/integration/service/jobs_test.go @@ -7,9 +7,9 @@ import ( "github.com/docker/docker/api/types" swarmtypes "github.com/docker/docker/api/types/swarm" "github.com/docker/docker/integration/internal/swarm" - "gotest.tools/assert" - "gotest.tools/poll" - "gotest.tools/skip" + "gotest.tools/v3/assert" + "gotest.tools/v3/poll" + "gotest.tools/v3/skip" ) // The file jobs_test.go contains tests that verify that services which are in @@ -104,7 +104,7 @@ func TestUpdateReplicatedJob(t *testing.T) { id := swarm.CreateService(t, d, swarm.ServiceWithMode(swarmtypes.ServiceMode{ ReplicatedJob: &swarmtypes.ReplicatedJob{ - // use the default, empty values. + // use the default, empty values. }, }), // run "true" so the task exits with 0 diff --git a/integration/service/list_test.go b/integration/service/list_test.go index 82a03f6618..5ea5ba01c9 100644 --- a/integration/service/list_test.go +++ b/integration/service/list_test.go @@ -10,10 +10,10 @@ import ( swarmtypes "github.com/docker/docker/api/types/swarm" "github.com/docker/docker/api/types/versions" "github.com/docker/docker/integration/internal/swarm" - "gotest.tools/assert" - is "gotest.tools/assert/cmp" - "gotest.tools/poll" - "gotest.tools/skip" + "gotest.tools/v3/assert" + is "gotest.tools/v3/assert/cmp" + "gotest.tools/v3/poll" + "gotest.tools/v3/skip" ) // TestServiceListWithStatuses tests that performing a ServiceList operation diff --git a/integration/service/network_test.go b/integration/service/network_test.go index 3961963822..e0c2103f60 100644 --- a/integration/service/network_test.go +++ b/integration/service/network_test.go @@ -9,9 +9,9 @@ import ( "github.com/docker/docker/integration/internal/container" net "github.com/docker/docker/integration/internal/network" "github.com/docker/docker/integration/internal/swarm" - "gotest.tools/assert" - is "gotest.tools/assert/cmp" - "gotest.tools/skip" + "gotest.tools/v3/assert" + is "gotest.tools/v3/assert/cmp" + "gotest.tools/v3/skip" ) func TestDockerNetworkConnectAlias(t *testing.T) { diff --git a/integration/service/plugin_test.go b/integration/service/plugin_test.go index ea012f4852..651c6dd057 100644 --- a/integration/service/plugin_test.go +++ b/integration/service/plugin_test.go @@ -17,9 +17,9 @@ import ( "github.com/docker/docker/testutil/daemon" "github.com/docker/docker/testutil/fixtures/plugin" "github.com/docker/docker/testutil/registry" - "gotest.tools/assert" - "gotest.tools/poll" - "gotest.tools/skip" + "gotest.tools/v3/assert" + "gotest.tools/v3/poll" + "gotest.tools/v3/skip" ) func TestServicePlugin(t *testing.T) { diff --git a/integration/service/update_test.go b/integration/service/update_test.go index 6268f12091..3ba03a3f70 100644 --- a/integration/service/update_test.go +++ b/integration/service/update_test.go @@ -9,10 +9,10 @@ import ( "github.com/docker/docker/client" "github.com/docker/docker/integration/internal/network" "github.com/docker/docker/integration/internal/swarm" - "gotest.tools/assert" - is "gotest.tools/assert/cmp" - "gotest.tools/poll" - "gotest.tools/skip" + "gotest.tools/v3/assert" + is "gotest.tools/v3/assert/cmp" + "gotest.tools/v3/poll" + "gotest.tools/v3/skip" ) func TestServiceUpdateLabel(t *testing.T) { diff --git a/integration/session/session_test.go b/integration/session/session_test.go index 3b16afb86b..b5fdf0b32d 100644 --- a/integration/session/session_test.go +++ b/integration/session/session_test.go @@ -6,9 +6,9 @@ import ( "github.com/docker/docker/api/types/versions" req "github.com/docker/docker/testutil/request" - "gotest.tools/assert" - is "gotest.tools/assert/cmp" - "gotest.tools/skip" + "gotest.tools/v3/assert" + is "gotest.tools/v3/assert/cmp" + "gotest.tools/v3/skip" ) func TestSessionCreate(t *testing.T) { diff --git a/integration/system/cgroupdriver_systemd_test.go b/integration/system/cgroupdriver_systemd_test.go index 1019532397..87060ad1f9 100644 --- a/integration/system/cgroupdriver_systemd_test.go +++ b/integration/system/cgroupdriver_systemd_test.go @@ -9,8 +9,8 @@ import ( "github.com/docker/docker/integration/internal/container" "github.com/docker/docker/testutil/daemon" - "gotest.tools/assert" - "gotest.tools/skip" + "gotest.tools/v3/assert" + "gotest.tools/v3/skip" ) // hasSystemd checks whether the host was booted with systemd as its init diff --git a/integration/system/event_test.go b/integration/system/event_test.go index 162dd80e13..7fb4b8fbde 100644 --- a/integration/system/event_test.go +++ b/integration/system/event_test.go @@ -18,9 +18,9 @@ import ( "github.com/docker/docker/pkg/jsonmessage" "github.com/docker/docker/testutil/request" req "github.com/docker/docker/testutil/request" - "gotest.tools/assert" - is "gotest.tools/assert/cmp" - "gotest.tools/skip" + "gotest.tools/v3/assert" + is "gotest.tools/v3/assert/cmp" + "gotest.tools/v3/skip" ) func TestEventsExecDie(t *testing.T) { diff --git a/integration/system/info_linux_test.go b/integration/system/info_linux_test.go index c51e7a3a39..ed350661ca 100644 --- a/integration/system/info_linux_test.go +++ b/integration/system/info_linux_test.go @@ -11,9 +11,9 @@ import ( "github.com/docker/docker/testutil/daemon" req "github.com/docker/docker/testutil/request" - "gotest.tools/assert" - is "gotest.tools/assert/cmp" - "gotest.tools/skip" + "gotest.tools/v3/assert" + is "gotest.tools/v3/assert/cmp" + "gotest.tools/v3/skip" ) func TestInfoBinaryCommits(t *testing.T) { diff --git a/integration/system/info_test.go b/integration/system/info_test.go index b719e5579e..b3ee70bb00 100644 --- a/integration/system/info_test.go +++ b/integration/system/info_test.go @@ -8,9 +8,9 @@ import ( "github.com/docker/docker/api/types/registry" "github.com/docker/docker/testutil/daemon" - "gotest.tools/assert" - is "gotest.tools/assert/cmp" - "gotest.tools/skip" + "gotest.tools/v3/assert" + is "gotest.tools/v3/assert/cmp" + "gotest.tools/v3/skip" ) func TestInfoAPI(t *testing.T) { diff --git a/integration/system/login_test.go b/integration/system/login_test.go index e6506c0811..1284911020 100644 --- a/integration/system/login_test.go +++ b/integration/system/login_test.go @@ -6,9 +6,9 @@ import ( "github.com/docker/docker/api/types" "github.com/docker/docker/integration/internal/requirement" - "gotest.tools/assert" - is "gotest.tools/assert/cmp" - "gotest.tools/skip" + "gotest.tools/v3/assert" + is "gotest.tools/v3/assert/cmp" + "gotest.tools/v3/skip" ) // Test case for GitHub 22244 diff --git a/integration/system/ping_test.go b/integration/system/ping_test.go index 2bbd7d2ad9..cd7a1c8eff 100644 --- a/integration/system/ping_test.go +++ b/integration/system/ping_test.go @@ -7,8 +7,8 @@ import ( "github.com/docker/docker/api/types/versions" "github.com/docker/docker/testutil/request" - "gotest.tools/assert" - "gotest.tools/skip" + "gotest.tools/v3/assert" + "gotest.tools/v3/skip" ) func TestPingCacheHeaders(t *testing.T) { diff --git a/integration/system/version_test.go b/integration/system/version_test.go index 2f8d06bb38..98a3c8ed44 100644 --- a/integration/system/version_test.go +++ b/integration/system/version_test.go @@ -4,8 +4,8 @@ import ( "context" "testing" - "gotest.tools/assert" - is "gotest.tools/assert/cmp" + "gotest.tools/v3/assert" + is "gotest.tools/v3/assert/cmp" ) func TestVersion(t *testing.T) { diff --git a/integration/volume/volume_test.go b/integration/volume/volume_test.go index 985f9eecc3..a7a729764d 100644 --- a/integration/volume/volume_test.go +++ b/integration/volume/volume_test.go @@ -14,9 +14,9 @@ import ( "github.com/docker/docker/integration/internal/container" "github.com/docker/docker/testutil/request" "github.com/google/go-cmp/cmp/cmpopts" - "gotest.tools/assert" - is "gotest.tools/assert/cmp" - "gotest.tools/skip" + "gotest.tools/v3/assert" + is "gotest.tools/v3/assert/cmp" + "gotest.tools/v3/skip" ) func TestVolumesCreateAndList(t *testing.T) { diff --git a/libcontainerd/queue/queue_test.go b/libcontainerd/queue/queue_test.go index 7d3eddab82..66381bf8e8 100644 --- a/libcontainerd/queue/queue_test.go +++ b/libcontainerd/queue/queue_test.go @@ -4,7 +4,7 @@ import ( "testing" "time" - "gotest.tools/assert" + "gotest.tools/v3/assert" ) func TestSerialization(t *testing.T) { diff --git a/opts/quotedstring_test.go b/opts/quotedstring_test.go index 89fed6cfa6..8ee603adac 100644 --- a/opts/quotedstring_test.go +++ b/opts/quotedstring_test.go @@ -3,8 +3,8 @@ package opts // import "github.com/docker/docker/opts" import ( "testing" - "gotest.tools/assert" - is "gotest.tools/assert/cmp" + "gotest.tools/v3/assert" + is "gotest.tools/v3/assert/cmp" ) func TestQuotedStringSetWithQuotes(t *testing.T) { diff --git a/pkg/archive/archive_linux_test.go b/pkg/archive/archive_linux_test.go index 8fdcb34b53..e756defcfb 100644 --- a/pkg/archive/archive_linux_test.go +++ b/pkg/archive/archive_linux_test.go @@ -14,8 +14,8 @@ import ( rsystem "github.com/opencontainers/runc/libcontainer/system" "github.com/pkg/errors" "golang.org/x/sys/unix" - "gotest.tools/assert" - "gotest.tools/skip" + "gotest.tools/v3/assert" + "gotest.tools/v3/skip" ) // setupOverlayTestDir creates files in a directory with overlay whiteouts diff --git a/pkg/archive/archive_test.go b/pkg/archive/archive_test.go index 76fd59f3a6..08cbc3fc20 100644 --- a/pkg/archive/archive_test.go +++ b/pkg/archive/archive_test.go @@ -19,9 +19,9 @@ import ( "github.com/docker/docker/pkg/idtools" "github.com/docker/docker/pkg/ioutils" rsystem "github.com/opencontainers/runc/libcontainer/system" - "gotest.tools/assert" - is "gotest.tools/assert/cmp" - "gotest.tools/skip" + "gotest.tools/v3/assert" + is "gotest.tools/v3/assert/cmp" + "gotest.tools/v3/skip" ) var tmp string diff --git a/pkg/archive/archive_unix_test.go b/pkg/archive/archive_unix_test.go index 40ff46370c..6d564391dd 100644 --- a/pkg/archive/archive_unix_test.go +++ b/pkg/archive/archive_unix_test.go @@ -16,9 +16,9 @@ import ( "github.com/docker/docker/pkg/system" rsystem "github.com/opencontainers/runc/libcontainer/system" "golang.org/x/sys/unix" - "gotest.tools/assert" - is "gotest.tools/assert/cmp" - "gotest.tools/skip" + "gotest.tools/v3/assert" + is "gotest.tools/v3/assert/cmp" + "gotest.tools/v3/skip" ) func TestCanonicalTarNameForPath(t *testing.T) { diff --git a/pkg/archive/changes_test.go b/pkg/archive/changes_test.go index a5c00b87c4..0a2689d7aa 100644 --- a/pkg/archive/changes_test.go +++ b/pkg/archive/changes_test.go @@ -13,8 +13,8 @@ import ( "time" "github.com/docker/docker/pkg/system" - "gotest.tools/assert" - "gotest.tools/skip" + "gotest.tools/v3/assert" + "gotest.tools/v3/skip" ) func max(x, y int) int { diff --git a/pkg/archive/copy_unix_test.go b/pkg/archive/copy_unix_test.go index ca0f4653af..7523f5c21d 100644 --- a/pkg/archive/copy_unix_test.go +++ b/pkg/archive/copy_unix_test.go @@ -16,7 +16,7 @@ import ( "strings" "testing" - "gotest.tools/assert" + "gotest.tools/v3/assert" ) func removeAllPaths(paths ...string) { diff --git a/pkg/archive/wrap_test.go b/pkg/archive/wrap_test.go index 1faa7aed75..764ef304d1 100644 --- a/pkg/archive/wrap_test.go +++ b/pkg/archive/wrap_test.go @@ -6,7 +6,7 @@ import ( "io" "testing" - "gotest.tools/assert" + "gotest.tools/v3/assert" ) func TestGenerateEmptyFile(t *testing.T) { diff --git a/pkg/authorization/api_test.go b/pkg/authorization/api_test.go index 617fd69a17..e7ada8f76b 100644 --- a/pkg/authorization/api_test.go +++ b/pkg/authorization/api_test.go @@ -11,13 +11,13 @@ import ( "testing" "time" - "gotest.tools/assert" - is "gotest.tools/assert/cmp" + "gotest.tools/v3/assert" + is "gotest.tools/v3/assert/cmp" ) func TestPeerCertificateMarshalJSON(t *testing.T) { template := &x509.Certificate{ - IsCA: true, + IsCA: true, BasicConstraintsValid: true, SubjectKeyId: []byte{1, 2, 3}, SerialNumber: big.NewInt(1234), diff --git a/pkg/authorization/middleware_test.go b/pkg/authorization/middleware_test.go index 6afafe082d..c7597d35c6 100644 --- a/pkg/authorization/middleware_test.go +++ b/pkg/authorization/middleware_test.go @@ -7,7 +7,7 @@ import ( "testing" "github.com/docker/docker/pkg/plugingetter" - "gotest.tools/assert" + "gotest.tools/v3/assert" ) func TestMiddleware(t *testing.T) { diff --git a/pkg/authorization/middleware_unix_test.go b/pkg/authorization/middleware_unix_test.go index b399d2b805..3473846897 100644 --- a/pkg/authorization/middleware_unix_test.go +++ b/pkg/authorization/middleware_unix_test.go @@ -9,8 +9,8 @@ import ( "testing" "github.com/docker/docker/pkg/plugingetter" - "gotest.tools/assert" - is "gotest.tools/assert/cmp" + "gotest.tools/v3/assert" + is "gotest.tools/v3/assert/cmp" ) func TestMiddlewareWrapHandler(t *testing.T) { diff --git a/pkg/chrootarchive/archive_test.go b/pkg/chrootarchive/archive_test.go index 53bc8458da..222b1b3790 100644 --- a/pkg/chrootarchive/archive_test.go +++ b/pkg/chrootarchive/archive_test.go @@ -16,7 +16,7 @@ import ( "github.com/docker/docker/pkg/archive" "github.com/docker/docker/pkg/reexec" "github.com/docker/docker/pkg/system" - "gotest.tools/skip" + "gotest.tools/v3/skip" ) func init() { diff --git a/pkg/chrootarchive/archive_unix_test.go b/pkg/chrootarchive/archive_unix_test.go index f39a88ad38..f7b99e3306 100644 --- a/pkg/chrootarchive/archive_unix_test.go +++ b/pkg/chrootarchive/archive_unix_test.go @@ -15,7 +15,7 @@ import ( "github.com/docker/docker/pkg/archive" "golang.org/x/sys/unix" - "gotest.tools/assert" + "gotest.tools/v3/assert" ) // Test for CVE-2018-15664 diff --git a/pkg/discovery/discovery_test.go b/pkg/discovery/discovery_test.go index 8166d4afde..ffd9b29352 100644 --- a/pkg/discovery/discovery_test.go +++ b/pkg/discovery/discovery_test.go @@ -4,7 +4,7 @@ import ( "testing" "github.com/docker/docker/internal/test/suite" - "gotest.tools/assert" + "gotest.tools/v3/assert" ) // Hook up gocheck into the "go test" runner. diff --git a/pkg/discovery/file/file_test.go b/pkg/discovery/file/file_test.go index 78a1798419..0418c9ecc4 100644 --- a/pkg/discovery/file/file_test.go +++ b/pkg/discovery/file/file_test.go @@ -7,7 +7,7 @@ import ( "github.com/docker/docker/internal/test/suite" "github.com/docker/docker/pkg/discovery" - "gotest.tools/assert" + "gotest.tools/v3/assert" ) // Hook up gocheck into the "go test" runner. diff --git a/pkg/discovery/generator_test.go b/pkg/discovery/generator_test.go index bfc8fb0f9d..e4d79629a1 100644 --- a/pkg/discovery/generator_test.go +++ b/pkg/discovery/generator_test.go @@ -2,7 +2,7 @@ package discovery // import "github.com/docker/docker/pkg/discovery" import ( "testing" - "gotest.tools/assert" + "gotest.tools/v3/assert" ) func (s *DiscoverySuite) TestGeneratorNotGenerate(c *testing.T) { diff --git a/pkg/discovery/kv/kv_test.go b/pkg/discovery/kv/kv_test.go index 5394038b04..2c42449b6f 100644 --- a/pkg/discovery/kv/kv_test.go +++ b/pkg/discovery/kv/kv_test.go @@ -12,7 +12,7 @@ import ( "github.com/docker/docker/pkg/discovery" "github.com/docker/libkv" "github.com/docker/libkv/store" - "gotest.tools/assert" + "gotest.tools/v3/assert" ) // Hook up gocheck into the "go test" runner. diff --git a/pkg/discovery/memory/memory_test.go b/pkg/discovery/memory/memory_test.go index f54807a552..9907505dcc 100644 --- a/pkg/discovery/memory/memory_test.go +++ b/pkg/discovery/memory/memory_test.go @@ -5,7 +5,7 @@ import ( "github.com/docker/docker/internal/test/suite" "github.com/docker/docker/pkg/discovery" - "gotest.tools/assert" + "gotest.tools/v3/assert" ) // Hook up gocheck into the "go test" runner. diff --git a/pkg/discovery/nodes/nodes_test.go b/pkg/discovery/nodes/nodes_test.go index 1212512fc9..a5846e0111 100644 --- a/pkg/discovery/nodes/nodes_test.go +++ b/pkg/discovery/nodes/nodes_test.go @@ -5,7 +5,7 @@ import ( "github.com/docker/docker/internal/test/suite" "github.com/docker/docker/pkg/discovery" - "gotest.tools/assert" + "gotest.tools/v3/assert" ) // Hook up gocheck into the "go test" runner. diff --git a/pkg/fileutils/fileutils_test.go b/pkg/fileutils/fileutils_test.go index 6918aa8818..1ed0254254 100644 --- a/pkg/fileutils/fileutils_test.go +++ b/pkg/fileutils/fileutils_test.go @@ -10,8 +10,8 @@ import ( "strings" "testing" - "gotest.tools/assert" - is "gotest.tools/assert/cmp" + "gotest.tools/v3/assert" + is "gotest.tools/v3/assert/cmp" ) // CopyFile with invalid src diff --git a/pkg/idtools/idtools_test.go b/pkg/idtools/idtools_test.go index 7627d1998c..34b57b6bcd 100644 --- a/pkg/idtools/idtools_test.go +++ b/pkg/idtools/idtools_test.go @@ -3,7 +3,7 @@ package idtools // import "github.com/docker/docker/pkg/idtools" import ( "testing" - "gotest.tools/assert" + "gotest.tools/v3/assert" ) func TestCreateIDMapOrder(t *testing.T) { diff --git a/pkg/idtools/idtools_unix_test.go b/pkg/idtools/idtools_unix_test.go index 11092c4699..fd1edd7306 100644 --- a/pkg/idtools/idtools_unix_test.go +++ b/pkg/idtools/idtools_unix_test.go @@ -11,9 +11,9 @@ import ( "testing" "golang.org/x/sys/unix" - "gotest.tools/assert" - is "gotest.tools/assert/cmp" - "gotest.tools/skip" + "gotest.tools/v3/assert" + is "gotest.tools/v3/assert/cmp" + "gotest.tools/v3/skip" ) const ( diff --git a/pkg/ioutils/readers_test.go b/pkg/ioutils/readers_test.go index e645c78d83..949e28739f 100644 --- a/pkg/ioutils/readers_test.go +++ b/pkg/ioutils/readers_test.go @@ -8,8 +8,8 @@ import ( "testing" "time" - "gotest.tools/assert" - is "gotest.tools/assert/cmp" + "gotest.tools/v3/assert" + is "gotest.tools/v3/assert/cmp" ) // Implement io.Reader diff --git a/pkg/jsonmessage/jsonmessage_test.go b/pkg/jsonmessage/jsonmessage_test.go index a7100daa73..d4e338d623 100644 --- a/pkg/jsonmessage/jsonmessage_test.go +++ b/pkg/jsonmessage/jsonmessage_test.go @@ -9,8 +9,8 @@ import ( "time" "github.com/docker/docker/pkg/term" - "gotest.tools/assert" - is "gotest.tools/assert/cmp" + "gotest.tools/v3/assert" + is "gotest.tools/v3/assert/cmp" ) func TestError(t *testing.T) { diff --git a/pkg/mount/mountinfo_linux_test.go b/pkg/mount/mountinfo_linux_test.go index beebd3d312..57d124da15 100644 --- a/pkg/mount/mountinfo_linux_test.go +++ b/pkg/mount/mountinfo_linux_test.go @@ -6,7 +6,7 @@ import ( "bytes" "testing" - "gotest.tools/assert" + "gotest.tools/v3/assert" ) const ( diff --git a/pkg/parsers/operatingsystem/operatingsystem_linux_test.go b/pkg/parsers/operatingsystem/operatingsystem_linux_test.go index 4934fab6c8..ec761b669e 100644 --- a/pkg/parsers/operatingsystem/operatingsystem_linux_test.go +++ b/pkg/parsers/operatingsystem/operatingsystem_linux_test.go @@ -8,7 +8,7 @@ import ( "path/filepath" "testing" - "gotest.tools/assert" + "gotest.tools/v3/assert" ) type EtcReleaseParsingTest struct { diff --git a/pkg/plugins/client_test.go b/pkg/plugins/client_test.go index 2540ec3561..421d59c3e1 100644 --- a/pkg/plugins/client_test.go +++ b/pkg/plugins/client_test.go @@ -14,8 +14,8 @@ import ( "github.com/docker/docker/pkg/plugins/transport" "github.com/docker/go-connections/tlsconfig" "github.com/pkg/errors" - "gotest.tools/assert" - is "gotest.tools/assert/cmp" + "gotest.tools/v3/assert" + is "gotest.tools/v3/assert/cmp" ) var ( diff --git a/pkg/plugins/discovery_unix_test.go b/pkg/plugins/discovery_unix_test.go index b4aefc83e4..60e7d6fecf 100644 --- a/pkg/plugins/discovery_unix_test.go +++ b/pkg/plugins/discovery_unix_test.go @@ -11,7 +11,7 @@ import ( "reflect" "testing" - "gotest.tools/assert" + "gotest.tools/v3/assert" ) func TestLocalSocket(t *testing.T) { diff --git a/pkg/plugins/plugin_test.go b/pkg/plugins/plugin_test.go index 12c35ccbb2..76984ba271 100644 --- a/pkg/plugins/plugin_test.go +++ b/pkg/plugins/plugin_test.go @@ -15,7 +15,7 @@ import ( "github.com/docker/docker/pkg/plugins/transport" "github.com/docker/go-connections/tlsconfig" "github.com/pkg/errors" - "gotest.tools/assert" + "gotest.tools/v3/assert" ) const ( diff --git a/pkg/plugins/transport/http_test.go b/pkg/plugins/transport/http_test.go index 2573306cf8..2435fbb01d 100644 --- a/pkg/plugins/transport/http_test.go +++ b/pkg/plugins/transport/http_test.go @@ -5,8 +5,8 @@ import ( "net/http" "testing" - "gotest.tools/assert" - is "gotest.tools/assert/cmp" + "gotest.tools/v3/assert" + is "gotest.tools/v3/assert/cmp" ) func TestHTTPTransport(t *testing.T) { diff --git a/pkg/pools/pools_test.go b/pkg/pools/pools_test.go index 7ff01ce3d5..6d1ca0598a 100644 --- a/pkg/pools/pools_test.go +++ b/pkg/pools/pools_test.go @@ -7,8 +7,8 @@ import ( "strings" "testing" - "gotest.tools/assert" - is "gotest.tools/assert/cmp" + "gotest.tools/v3/assert" + is "gotest.tools/v3/assert/cmp" ) func TestBufioReaderPoolGetWithNoReaderShouldCreateOne(t *testing.T) { diff --git a/pkg/reexec/reexec_test.go b/pkg/reexec/reexec_test.go index 44675e7b63..8aea0431e3 100644 --- a/pkg/reexec/reexec_test.go +++ b/pkg/reexec/reexec_test.go @@ -5,7 +5,7 @@ import ( "os/exec" "testing" - "gotest.tools/assert" + "gotest.tools/v3/assert" ) func init() { diff --git a/pkg/signal/signal_linux_test.go b/pkg/signal/signal_linux_test.go index 9a021e2164..91604bb23e 100644 --- a/pkg/signal/signal_linux_test.go +++ b/pkg/signal/signal_linux_test.go @@ -8,8 +8,8 @@ import ( "testing" "time" - "gotest.tools/assert" - is "gotest.tools/assert/cmp" + "gotest.tools/v3/assert" + is "gotest.tools/v3/assert/cmp" ) func TestCatchAll(t *testing.T) { diff --git a/pkg/signal/signal_test.go b/pkg/signal/signal_test.go index 9abe3883f6..c275345b8b 100644 --- a/pkg/signal/signal_test.go +++ b/pkg/signal/signal_test.go @@ -4,8 +4,8 @@ import ( "syscall" "testing" - "gotest.tools/assert" - is "gotest.tools/assert/cmp" + "gotest.tools/v3/assert" + is "gotest.tools/v3/assert/cmp" ) func TestParseSignal(t *testing.T) { diff --git a/pkg/signal/trap_linux_test.go b/pkg/signal/trap_linux_test.go index d5c6240b44..781ca5a354 100644 --- a/pkg/signal/trap_linux_test.go +++ b/pkg/signal/trap_linux_test.go @@ -9,8 +9,8 @@ import ( "syscall" "testing" - "gotest.tools/assert" - is "gotest.tools/assert/cmp" + "gotest.tools/v3/assert" + is "gotest.tools/v3/assert/cmp" ) func buildTestBinary(t *testing.T, tmpdir string, prefix string) (string, string) { diff --git a/pkg/streamformatter/streamformatter_test.go b/pkg/streamformatter/streamformatter_test.go index f630699d73..85a80c61ce 100644 --- a/pkg/streamformatter/streamformatter_test.go +++ b/pkg/streamformatter/streamformatter_test.go @@ -10,8 +10,8 @@ import ( "github.com/docker/docker/pkg/jsonmessage" "github.com/google/go-cmp/cmp" "github.com/google/go-cmp/cmp/cmpopts" - "gotest.tools/assert" - is "gotest.tools/assert/cmp" + "gotest.tools/v3/assert" + is "gotest.tools/v3/assert/cmp" ) func TestRawProgressFormatterFormatStatus(t *testing.T) { diff --git a/pkg/streamformatter/streamwriter_test.go b/pkg/streamformatter/streamwriter_test.go index 5b679f2cf4..f8a37c25ae 100644 --- a/pkg/streamformatter/streamwriter_test.go +++ b/pkg/streamformatter/streamwriter_test.go @@ -4,8 +4,8 @@ import ( "bytes" "testing" - "gotest.tools/assert" - is "gotest.tools/assert/cmp" + "gotest.tools/v3/assert" + is "gotest.tools/v3/assert/cmp" ) func TestStreamWriterStdout(t *testing.T) { diff --git a/pkg/sysinfo/sysinfo_linux_test.go b/pkg/sysinfo/sysinfo_linux_test.go index 0a359cb901..aa557c9230 100644 --- a/pkg/sysinfo/sysinfo_linux_test.go +++ b/pkg/sysinfo/sysinfo_linux_test.go @@ -8,7 +8,7 @@ import ( "testing" "golang.org/x/sys/unix" - "gotest.tools/assert" + "gotest.tools/v3/assert" ) func TestReadProcBool(t *testing.T) { diff --git a/pkg/system/rm_test.go b/pkg/system/rm_test.go index 0448aac619..a956d47bd4 100644 --- a/pkg/system/rm_test.go +++ b/pkg/system/rm_test.go @@ -9,7 +9,7 @@ import ( "time" "github.com/docker/docker/pkg/mount" - "gotest.tools/skip" + "gotest.tools/v3/skip" ) func TestEnsureRemoveAllNotExist(t *testing.T) { diff --git a/pkg/system/stat_unix_test.go b/pkg/system/stat_unix_test.go index 44e048f2a7..d1001a9e25 100644 --- a/pkg/system/stat_unix_test.go +++ b/pkg/system/stat_unix_test.go @@ -7,7 +7,7 @@ import ( "syscall" "testing" - "gotest.tools/assert" + "gotest.tools/v3/assert" ) // TestFromStatT tests fromStatT for a tempfile diff --git a/pkg/tailfile/tailfile_test.go b/pkg/tailfile/tailfile_test.go index 6a2af28a62..9e4d2be3ac 100644 --- a/pkg/tailfile/tailfile_test.go +++ b/pkg/tailfile/tailfile_test.go @@ -11,7 +11,7 @@ import ( "strings" "testing" - "gotest.tools/assert" + "gotest.tools/v3/assert" ) func TestTailFile(t *testing.T) { diff --git a/pkg/tarsum/tarsum_test.go b/pkg/tarsum/tarsum_test.go index 6f6b3eb976..24f7cce7d4 100644 --- a/pkg/tarsum/tarsum_test.go +++ b/pkg/tarsum/tarsum_test.go @@ -17,8 +17,8 @@ import ( "strings" "testing" - "gotest.tools/assert" - is "gotest.tools/assert/cmp" + "gotest.tools/v3/assert" + is "gotest.tools/v3/assert/cmp" ) type testLayer struct { diff --git a/pkg/term/ascii_test.go b/pkg/term/ascii_test.go index 665ab1552f..5faec304dd 100644 --- a/pkg/term/ascii_test.go +++ b/pkg/term/ascii_test.go @@ -3,8 +3,8 @@ package term // import "github.com/docker/docker/pkg/term" import ( "testing" - "gotest.tools/assert" - is "gotest.tools/assert/cmp" + "gotest.tools/v3/assert" + is "gotest.tools/v3/assert/cmp" ) func TestToBytes(t *testing.T) { diff --git a/pkg/term/proxy_test.go b/pkg/term/proxy_test.go index 8f8e4cb6d4..98a9907e94 100644 --- a/pkg/term/proxy_test.go +++ b/pkg/term/proxy_test.go @@ -4,8 +4,8 @@ import ( "bytes" "testing" - "gotest.tools/assert" - is "gotest.tools/assert/cmp" + "gotest.tools/v3/assert" + is "gotest.tools/v3/assert/cmp" ) func TestEscapeProxyRead(t *testing.T) { diff --git a/pkg/term/term_linux_test.go b/pkg/term/term_linux_test.go index 28d28e3a67..8206c4bae5 100644 --- a/pkg/term/term_linux_test.go +++ b/pkg/term/term_linux_test.go @@ -8,7 +8,7 @@ import ( "testing" "github.com/google/go-cmp/cmp" - "gotest.tools/assert" + "gotest.tools/v3/assert" ) // RequiresRoot skips tests that require root, unless the test.root flag has diff --git a/plugin/manager_linux_test.go b/plugin/manager_linux_test.go index c75efb7b72..a42d34727f 100644 --- a/plugin/manager_linux_test.go +++ b/plugin/manager_linux_test.go @@ -15,7 +15,7 @@ import ( v2 "github.com/docker/docker/plugin/v2" specs "github.com/opencontainers/runtime-spec/specs-go" "github.com/pkg/errors" - "gotest.tools/skip" + "gotest.tools/v3/skip" ) func TestManagerWithPluginMounts(t *testing.T) { diff --git a/reference/store_test.go b/reference/store_test.go index 4f2149590e..85a5ba300e 100644 --- a/reference/store_test.go +++ b/reference/store_test.go @@ -10,17 +10,17 @@ import ( "github.com/docker/distribution/reference" digest "github.com/opencontainers/go-digest" - "gotest.tools/assert" - is "gotest.tools/assert/cmp" + "gotest.tools/v3/assert" + is "gotest.tools/v3/assert/cmp" ) var ( saveLoadTestCases = map[string]digest.Digest{ - "registry:5000/foobar:HEAD": "sha256:470022b8af682154f57a2163d030eb369549549cba00edc69e1b99b46bb924d6", - "registry:5000/foobar:alternate": "sha256:ae300ebc4a4f00693702cfb0a5e0b7bc527b353828dc86ad09fb95c8a681b793", - "registry:5000/foobar:latest": "sha256:6153498b9ac00968d71b66cca4eac37e990b5f9eb50c26877eb8799c8847451b", - "registry:5000/foobar:master": "sha256:6c9917af4c4e05001b346421959d7ea81b6dc9d25718466a37a6add865dfd7fc", - "jess/hollywood:latest": "sha256:ae7a5519a0a55a2d4ef20ddcbd5d0ca0888a1f7ab806acc8e2a27baf46f529fe", + "registry:5000/foobar:HEAD": "sha256:470022b8af682154f57a2163d030eb369549549cba00edc69e1b99b46bb924d6", + "registry:5000/foobar:alternate": "sha256:ae300ebc4a4f00693702cfb0a5e0b7bc527b353828dc86ad09fb95c8a681b793", + "registry:5000/foobar:latest": "sha256:6153498b9ac00968d71b66cca4eac37e990b5f9eb50c26877eb8799c8847451b", + "registry:5000/foobar:master": "sha256:6c9917af4c4e05001b346421959d7ea81b6dc9d25718466a37a6add865dfd7fc", + "jess/hollywood:latest": "sha256:ae7a5519a0a55a2d4ef20ddcbd5d0ca0888a1f7ab806acc8e2a27baf46f529fe", "registry@sha256:367eb40fd0330a7e464777121e39d2f5b3e8e23a1e159342e53ab05c9e4d94e6": "sha256:24126a56805beb9711be5f4590cc2eb55ab8d4a85ebd618eed72bb19fc50631c", "busybox:latest": "sha256:91e54dfb11794fad694460162bf0cb0a4fa710cfa3f60979c177d920813e267c", } diff --git a/registry/config_test.go b/registry/config_test.go index 30a257e325..ae8cb23f94 100644 --- a/registry/config_test.go +++ b/registry/config_test.go @@ -6,8 +6,8 @@ import ( "strings" "testing" - "gotest.tools/assert" - is "gotest.tools/assert/cmp" + "gotest.tools/v3/assert" + is "gotest.tools/v3/assert/cmp" ) func TestLoadAllowNondistributableArtifacts(t *testing.T) { diff --git a/registry/registry_test.go b/registry/registry_test.go index 51ca083e80..d0659c17fc 100644 --- a/registry/registry_test.go +++ b/registry/registry_test.go @@ -13,8 +13,8 @@ import ( "github.com/docker/distribution/registry/client/transport" "github.com/docker/docker/api/types" registrytypes "github.com/docker/docker/api/types/registry" - "gotest.tools/assert" - "gotest.tools/skip" + "gotest.tools/v3/assert" + "gotest.tools/v3/skip" ) var ( diff --git a/registry/resumable/resumablerequestreader_test.go b/registry/resumable/resumablerequestreader_test.go index 90f8bbd028..786c6ab105 100644 --- a/registry/resumable/resumablerequestreader_test.go +++ b/registry/resumable/resumablerequestreader_test.go @@ -10,8 +10,8 @@ import ( "testing" "time" - "gotest.tools/assert" - is "gotest.tools/assert/cmp" + "gotest.tools/v3/assert" + is "gotest.tools/v3/assert/cmp" ) func TestResumableRequestHeaderSimpleErrors(t *testing.T) { diff --git a/runconfig/hostconfig_test.go b/runconfig/hostconfig_test.go index f4ad69a642..365f797cb9 100644 --- a/runconfig/hostconfig_test.go +++ b/runconfig/hostconfig_test.go @@ -10,8 +10,8 @@ import ( "github.com/docker/docker/api/types/container" "github.com/docker/docker/pkg/sysinfo" - "gotest.tools/assert" - is "gotest.tools/assert/cmp" + "gotest.tools/v3/assert" + is "gotest.tools/v3/assert/cmp" ) func TestCgroupnsModeTest(t *testing.T) { @@ -48,20 +48,20 @@ func TestNetworkModeTest(t *testing.T) { "something:weird": {true, false, false, false, false, false}, "bridge": {true, true, false, false, false, false}, DefaultDaemonNetworkMode(): {true, true, false, false, false, false}, - "host": {false, false, true, false, false, false}, - "container:name": {false, false, false, true, false, false}, - "none": {true, false, false, false, true, false}, - "default": {true, false, false, false, false, true}, + "host": {false, false, true, false, false, false}, + "container:name": {false, false, false, true, false, false}, + "none": {true, false, false, false, true, false}, + "default": {true, false, false, false, false, true}, } networkModeNames := map[container.NetworkMode]string{ "": "", "something:weird": "something:weird", "bridge": "bridge", DefaultDaemonNetworkMode(): "bridge", - "host": "host", - "container:name": "container", - "none": "none", - "default": "default", + "host": "host", + "container:name": "container", + "none": "none", + "default": "default", } for networkMode, state := range networkModes { if networkMode.IsPrivate() != state[0] { diff --git a/testutil/daemon/config.go b/testutil/daemon/config.go index 2f11795bc6..1bf182ae28 100644 --- a/testutil/daemon/config.go +++ b/testutil/daemon/config.go @@ -6,7 +6,7 @@ import ( "github.com/docker/docker/api/types" "github.com/docker/docker/api/types/swarm" - "gotest.tools/assert" + "gotest.tools/v3/assert" ) // ConfigConstructor defines a swarm config constructor diff --git a/testutil/daemon/container.go b/testutil/daemon/container.go index 1a6f6b6ecc..8e88e7b202 100644 --- a/testutil/daemon/container.go +++ b/testutil/daemon/container.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/docker/docker/api/types" - "gotest.tools/assert" + "gotest.tools/v3/assert" ) // ActiveContainers returns the list of ids of the currently running containers diff --git a/testutil/daemon/daemon.go b/testutil/daemon/daemon.go index c26c5c5280..860ff05d7c 100644 --- a/testutil/daemon/daemon.go +++ b/testutil/daemon/daemon.go @@ -25,7 +25,7 @@ import ( "github.com/docker/go-connections/sockets" "github.com/docker/go-connections/tlsconfig" "github.com/pkg/errors" - "gotest.tools/assert" + "gotest.tools/v3/assert" ) // LogT is the subset of the testing.TB interface used by the daemon. diff --git a/testutil/daemon/daemon_unix.go b/testutil/daemon/daemon_unix.go index 6ef860b962..f638951eb8 100644 --- a/testutil/daemon/daemon_unix.go +++ b/testutil/daemon/daemon_unix.go @@ -10,7 +10,7 @@ import ( "testing" "golang.org/x/sys/unix" - "gotest.tools/assert" + "gotest.tools/v3/assert" ) func cleanupNetworkNamespace(t testing.TB, d *Daemon) { diff --git a/testutil/daemon/daemon_windows.go b/testutil/daemon/daemon_windows.go index 7e7709e6c5..3cc87e2bf9 100644 --- a/testutil/daemon/daemon_windows.go +++ b/testutil/daemon/daemon_windows.go @@ -6,7 +6,7 @@ import ( "testing" "golang.org/x/sys/windows" - "gotest.tools/assert" + "gotest.tools/v3/assert" ) // SignalDaemonDump sends a signal to the daemon to write a dump file diff --git a/testutil/daemon/node.go b/testutil/daemon/node.go index 96e6acfbca..89d0817b00 100644 --- a/testutil/daemon/node.go +++ b/testutil/daemon/node.go @@ -8,7 +8,7 @@ import ( "github.com/docker/docker/api/types" "github.com/docker/docker/api/types/swarm" - "gotest.tools/assert" + "gotest.tools/v3/assert" ) // NodeConstructor defines a swarm node constructor diff --git a/testutil/daemon/plugin.go b/testutil/daemon/plugin.go index 11959f7723..98aa6063a9 100644 --- a/testutil/daemon/plugin.go +++ b/testutil/daemon/plugin.go @@ -6,7 +6,7 @@ import ( "github.com/docker/docker/api/types" "github.com/docker/docker/client" - "gotest.tools/poll" + "gotest.tools/v3/poll" ) // PluginIsRunning provides a poller to check if the specified plugin is running diff --git a/testutil/daemon/secret.go b/testutil/daemon/secret.go index 6cb9448884..099fdf33f1 100644 --- a/testutil/daemon/secret.go +++ b/testutil/daemon/secret.go @@ -6,7 +6,7 @@ import ( "github.com/docker/docker/api/types" "github.com/docker/docker/api/types/swarm" - "gotest.tools/assert" + "gotest.tools/v3/assert" ) // SecretConstructor defines a swarm secret constructor diff --git a/testutil/daemon/service.go b/testutil/daemon/service.go index 9a39c951dd..0fb49b5f5b 100644 --- a/testutil/daemon/service.go +++ b/testutil/daemon/service.go @@ -8,7 +8,7 @@ import ( "github.com/docker/docker/api/types" "github.com/docker/docker/api/types/filters" "github.com/docker/docker/api/types/swarm" - "gotest.tools/assert" + "gotest.tools/v3/assert" ) // ServiceConstructor defines a swarm service constructor function diff --git a/testutil/daemon/swarm.go b/testutil/daemon/swarm.go index 4ebf622634..8746a0e8a6 100644 --- a/testutil/daemon/swarm.go +++ b/testutil/daemon/swarm.go @@ -7,7 +7,7 @@ import ( "github.com/docker/docker/api/types/swarm" "github.com/pkg/errors" - "gotest.tools/assert" + "gotest.tools/v3/assert" ) const ( diff --git a/testutil/environment/clean.go b/testutil/environment/clean.go index 0cea31f9a4..23d434f0bd 100644 --- a/testutil/environment/clean.go +++ b/testutil/environment/clean.go @@ -9,7 +9,7 @@ import ( "github.com/docker/docker/api/types" "github.com/docker/docker/api/types/filters" "github.com/docker/docker/client" - "gotest.tools/assert" + "gotest.tools/v3/assert" ) // Clean the environment, preserving protected objects (images, containers, ...) diff --git a/testutil/environment/environment.go b/testutil/environment/environment.go index e7c906a28c..d2cb295e7c 100644 --- a/testutil/environment/environment.go +++ b/testutil/environment/environment.go @@ -13,7 +13,7 @@ import ( "github.com/docker/docker/client" "github.com/docker/docker/testutil/fixtures/load" "github.com/pkg/errors" - "gotest.tools/assert" + "gotest.tools/v3/assert" ) // Execution contains information about the current test execution and daemon diff --git a/testutil/environment/protect.go b/testutil/environment/protect.go index 12e4e5979b..b90a92b1d5 100644 --- a/testutil/environment/protect.go +++ b/testutil/environment/protect.go @@ -7,7 +7,7 @@ import ( "github.com/docker/docker/api/types" "github.com/docker/docker/api/types/filters" dclient "github.com/docker/docker/client" - "gotest.tools/assert" + "gotest.tools/v3/assert" ) var frozenImages = []string{"busybox:latest", "busybox:glibc", "hello-world:frozen", "debian:jessie"} diff --git a/testutil/fakestorage/fixtures.go b/testutil/fakestorage/fixtures.go index 08adb7e7ac..1d9e3b6df3 100644 --- a/testutil/fakestorage/fixtures.go +++ b/testutil/fakestorage/fixtures.go @@ -12,7 +12,7 @@ import ( "github.com/docker/docker/api/types" "github.com/docker/docker/pkg/archive" - "gotest.tools/assert" + "gotest.tools/v3/assert" ) var ensureHTTPServerOnce sync.Once diff --git a/testutil/fakestorage/storage.go b/testutil/fakestorage/storage.go index 224081b66c..b5fb474c34 100644 --- a/testutil/fakestorage/storage.go +++ b/testutil/fakestorage/storage.go @@ -20,7 +20,7 @@ import ( "github.com/docker/docker/testutil/fakecontext" "github.com/docker/docker/testutil/request" "github.com/docker/go-connections/nat" - "gotest.tools/assert" + "gotest.tools/v3/assert" ) var testEnv *environment.Execution diff --git a/testutil/registry/registry.go b/testutil/registry/registry.go index 771d58b1cd..c272d88ce6 100644 --- a/testutil/registry/registry.go +++ b/testutil/registry/registry.go @@ -11,7 +11,7 @@ import ( "time" "github.com/opencontainers/go-digest" - "gotest.tools/assert" + "gotest.tools/v3/assert" ) const ( diff --git a/testutil/request/request.go b/testutil/request/request.go index bc9fc1ee19..3efa77c17d 100644 --- a/testutil/request/request.go +++ b/testutil/request/request.go @@ -21,7 +21,7 @@ import ( "github.com/docker/go-connections/sockets" "github.com/docker/go-connections/tlsconfig" "github.com/pkg/errors" - "gotest.tools/assert" + "gotest.tools/v3/assert" ) // NewAPIClient returns a docker API client configured from environment variables diff --git a/testutil/stringutils_test.go b/testutil/stringutils_test.go index ee95997768..438683664f 100644 --- a/testutil/stringutils_test.go +++ b/testutil/stringutils_test.go @@ -3,8 +3,8 @@ package testutil // import "github.com/docker/docker/testutil" import ( "testing" - "gotest.tools/assert" - is "gotest.tools/assert/cmp" + "gotest.tools/v3/assert" + is "gotest.tools/v3/assert/cmp" ) func testLengthHelper(generator func(int) string, t *testing.T) { diff --git a/vendor.conf b/vendor.conf index d9a69aeba8..fe5414ba1a 100644 --- a/vendor.conf +++ b/vendor.conf @@ -17,7 +17,7 @@ golang.org/x/sys 6d18c012aee9febd81bbf9806760 github.com/docker/go-units 519db1ee28dcc9fd2474ae59fca29a810482bfb1 # v0.4.0 github.com/docker/go-connections 7395e3f8aa162843a74ed6d48e79627d9792ac55 # v0.4.0 golang.org/x/text f21a4dfb5e38f5895301dc265a8def02365cc3d0 # v0.3.0 -gotest.tools 1083505acf35a0bd8a696b26837e1fb3187a7a83 # v2.3.0 +gotest.tools/v3 ab4a870b92ce57a83881fbeb535a137a20d664b7 # v3.0.1 github.com/google/go-cmp 3af367b6b30c263d47e8895973edcca9a49cf029 # v0.2.0 github.com/syndtr/gocapability d98352740cb2c55f81556b63d4a1ec64c5a319c2 diff --git a/vendor/gotest.tools/go.mod b/vendor/gotest.tools/go.mod deleted file mode 100644 index 39d0a1a779..0000000000 --- a/vendor/gotest.tools/go.mod +++ /dev/null @@ -1,8 +0,0 @@ -module gotest.tools - -require ( - github.com/google/go-cmp v0.2.0 - github.com/pkg/errors v0.8.0 - github.com/spf13/pflag v1.0.3 - golang.org/x/tools v0.0.0-20180810170437-e96c4e24768d -) diff --git a/vendor/gotest.tools/LICENSE b/vendor/gotest.tools/v3/LICENSE index aeaa2fac3d..aeaa2fac3d 100644 --- a/vendor/gotest.tools/LICENSE +++ b/vendor/gotest.tools/v3/LICENSE diff --git a/vendor/gotest.tools/README.md b/vendor/gotest.tools/v3/README.md index 3155723dd7..56b3e4ad20 100644 --- a/vendor/gotest.tools/README.md +++ b/vendor/gotest.tools/v3/README.md @@ -2,26 +2,41 @@ A collection of packages to augment `testing` and support common patterns. -[![GoDoc](https://godoc.org/gotest.tools?status.svg)](https://godoc.org/gotest.tools) +[![GoDoc](https://godoc.org/gotest.tools?status.svg)](http://gotest.tools) [![CircleCI](https://circleci.com/gh/gotestyourself/gotest.tools/tree/master.svg?style=shield)](https://circleci.com/gh/gotestyourself/gotest.tools/tree/master) [![Go Reportcard](https://goreportcard.com/badge/gotest.tools)](https://goreportcard.com/report/gotest.tools) +## Usage + +With Go modules enabled (go1.11+) + +``` +$ go get gotest.tools/v3 +``` + +``` +import "gotest.tools/v3/assert" +``` + +To use `gotest.tools` with an older version of Go that does not understand Go +module paths pin to version `v2.3.0`. + ## Packages -* [assert](http://godoc.org/gotest.tools/assert) - +* [assert](http://gotest.tools/assert) - compare values and fail the test when a comparison fails -* [env](http://godoc.org/gotest.tools/env) - +* [env](http://gotest.tools/env) - test code which uses environment variables -* [fs](http://godoc.org/gotest.tools/fs) - +* [fs](http://gotest.tools/fs) - create temporary files and compare a filesystem tree to an expected value -* [golden](http://godoc.org/gotest.tools/golden) - +* [golden](http://gotest.tools/golden) - compare large multi-line strings against values frozen in golden files -* [icmd](http://godoc.org/gotest.tools/icmd) - +* [icmd](http://gotest.tools/icmd) - execute binaries and test the output -* [poll](http://godoc.org/gotest.tools/poll) - +* [poll](http://gotest.tools/poll) - test asynchronous code by polling until a desired state is reached -* [skip](http://godoc.org/gotest.tools/skip) - +* [skip](http://gotest.tools/skip) - skip a test and print the source code of the condition used to skip the test ## Related diff --git a/vendor/gotest.tools/assert/assert.go b/vendor/gotest.tools/v3/assert/assert.go index 05d6635436..83610aa852 100644 --- a/vendor/gotest.tools/assert/assert.go +++ b/vendor/gotest.tools/v3/assert/assert.go @@ -49,30 +49,31 @@ The example below shows assert used with some common types. Comparisons -Package https://godoc.org/gotest.tools/assert/cmp provides +Package http://gotest.tools/assert/cmp provides many common comparisons. Additional comparisons can be written to compare values in other ways. See the example Assert (CustomComparison). Automated migration from testify -gty-migrate-from-testify is a binary which can update source code which uses -testify assertions to use the assertions provided by this package. +gty-migrate-from-testify is a command which translates Go source code from +testify assertions to the assertions provided by this package. -See http://bit.do/cmd-gty-migrate-from-testify. +See http://gotest.tools/assert/cmd/gty-migrate-from-testify. */ -package assert // import "gotest.tools/assert" +package assert // import "gotest.tools/v3/assert" import ( "fmt" "go/ast" "go/token" + "reflect" gocmp "github.com/google/go-cmp/cmp" - "gotest.tools/assert/cmp" - "gotest.tools/internal/format" - "gotest.tools/internal/source" + "gotest.tools/v3/assert/cmp" + "gotest.tools/v3/internal/format" + "gotest.tools/v3/internal/source" ) // BoolOrComparison can be a bool, or cmp.Comparison. See Assert() for usage. @@ -118,6 +119,10 @@ func assert( return true case error: + // Handle nil structs which implement error as a nil error + if reflect.ValueOf(check).IsNil() { + return true + } msg := "error is not nil: " t.Log(format.WithCustomMessage(failureMessage+msg+check.Error(), msgAndArgs...)) @@ -202,17 +207,20 @@ func boolFailureMessage(expr ast.Expr) (string, error) { return "expression is false: " + formatted, nil } -// Assert performs a comparison. If the comparison fails the test is marked as +// Assert performs a comparison. If the comparison fails, the test is marked as // failed, a failure message is logged, and execution is stopped immediately. // -// The comparison argument may be one of three types: bool, cmp.Comparison or -// error. -// When called with a bool the failure message will contain the literal source -// code of the expression. -// When called with a cmp.Comparison the comparison is responsible for producing -// a helpful failure message. -// When called with an error a nil value is considered success. A non-nil error -// is a failure, and Error() is used as the failure message. +// The comparison argument may be one of three types: +// bool +// True is success. False is a failure. +// The failure message will contain the literal source code of the expression. +// cmp.Comparison +// Uses cmp.Result.Success() to check for success of failure. +// The comparison is responsible for producing a helpful failure message. +// http://gotest.tools/assert/cmp provides many common comparisons. +// error +// A nil value is considered success. +// A non-nil error is a failure, err.Error() is used as the failure message. func Assert(t TestingT, comparison BoolOrComparison, msgAndArgs ...interface{}) { if ht, ok := t.(helperT); ok { ht.Helper() @@ -260,10 +268,10 @@ func Equal(t TestingT, x, y interface{}, msgAndArgs ...interface{}) { assert(t, t.FailNow, argsAfterT, cmp.Equal(x, y), msgAndArgs...) } -// DeepEqual uses google/go-cmp (http://bit.do/go-cmp) to assert two values are -// equal and fails the test if they are not equal. +// DeepEqual uses google/go-cmp (https://godoc.org/github.com/google/go-cmp/cmp) +// to assert two values are equal and fails the test if they are not equal. // -// Package https://godoc.org/gotest.tools/assert/opt provides some additional +// Package http://gotest.tools/assert/opt provides some additional // commonly used Options. // // This is equivalent to Assert(t, cmp.DeepEqual(x, y)). @@ -295,14 +303,19 @@ func ErrorContains(t TestingT, err error, substring string, msgAndArgs ...interf } // ErrorType fails the test if err is nil, or err is not the expected type. +// Equivalent to Assert(t, cmp.ErrorType(err, expected)). // // Expected can be one of: -// a func(error) bool which returns true if the error is the expected type, -// an instance of (or a pointer to) a struct of the expected type, -// a pointer to an interface the error is expected to implement, -// a reflect.Type of the expected struct or interface. -// -// Equivalent to Assert(t, cmp.ErrorType(err, expected)). +// func(error) bool +// Function should return true if the error is the expected type. +// type struct{}, type &struct{} +// A struct or a pointer to a struct. +// Fails if the error is not of the same type as expected. +// type &interface{} +// A pointer to an interface type. +// Fails if err does not implement the interface. +// reflect.Type +// Fails if err does not implement the reflect.Type func ErrorType(t TestingT, err error, expected interface{}, msgAndArgs ...interface{}) { if ht, ok := t.(helperT); ok { ht.Helper() diff --git a/vendor/gotest.tools/assert/cmp/compare.go b/vendor/gotest.tools/v3/assert/cmp/compare.go index cf48d887ac..bb3b24f437 100644 --- a/vendor/gotest.tools/assert/cmp/compare.go +++ b/vendor/gotest.tools/v3/assert/cmp/compare.go @@ -1,5 +1,5 @@ /*Package cmp provides Comparisons for Assert and Check*/ -package cmp // import "gotest.tools/assert/cmp" +package cmp // import "gotest.tools/v3/assert/cmp" import ( "fmt" @@ -8,7 +8,7 @@ import ( "strings" "github.com/google/go-cmp/cmp" - "gotest.tools/internal/format" + "gotest.tools/v3/internal/format" ) // Comparison is a function which compares values and returns ResultSuccess if @@ -16,11 +16,12 @@ import ( // Result will contain a message about why it failed. type Comparison func() Result -// DeepEqual compares two values using google/go-cmp (http://bit.do/go-cmp) +// DeepEqual compares two values using google/go-cmp +// (https://godoc.org/github.com/google/go-cmp/cmp) // and succeeds if the values are equal. // // The comparison can be customized using comparison Options. -// Package https://godoc.org/gotest.tools/assert/opt provides some additional +// Package http://gotest.tools/assert/opt provides some additional // commonly used Options. func DeepEqual(x, y interface{}, opts ...cmp.Option) Comparison { return func() (result Result) { @@ -103,10 +104,10 @@ func Equal(x, y interface{}) Comparison { return multiLineDiffResult(diff) } return ResultFailureTemplate(` - {{- .Data.x}} ( + {{- printf "%v" .Data.x}} ( {{- with callArg 0 }}{{ formatNode . }} {{end -}} {{- printf "%T" .Data.x -}} - ) != {{ .Data.y}} ( + ) != {{ printf "%v" .Data.y}} ( {{- with callArg 1 }}{{ formatNode . }} {{end -}} {{- printf "%T" .Data.y -}} )`, @@ -241,10 +242,12 @@ func ErrorContains(err error, substring string) Comparison { } } +type causer interface { + Cause() error +} + func formatErrorMessage(err error) string { - if _, ok := err.(interface { - Cause() error - }); ok { + if _, ok := err.(causer); ok { return fmt.Sprintf("%q\n%+v", err, err) } // This error was not wrapped with github.com/pkg/errors @@ -283,10 +286,16 @@ func isNil(obj interface{}, msgFunc func(reflect.Value) string) Comparison { // ErrorType succeeds if err is not nil and is of the expected type. // // Expected can be one of: -// a func(error) bool which returns true if the error is the expected type, -// an instance of (or a pointer to) a struct of the expected type, -// a pointer to an interface the error is expected to implement, -// a reflect.Type of the expected struct or interface. +// func(error) bool +// Function should return true if the error is the expected type. +// type struct{}, type &struct{} +// A struct or a pointer to a struct. +// Fails if the error is not of the same type as expected. +// type &interface{} +// A pointer to an interface type. +// Fails if err does not implement the interface. +// reflect.Type +// Fails if err does not implement the reflect.Type func ErrorType(err error, expected interface{}) Comparison { return func() Result { switch expectedType := expected.(type) { diff --git a/vendor/gotest.tools/assert/cmp/result.go b/vendor/gotest.tools/v3/assert/cmp/result.go index 204edda4bc..385e1a0873 100644 --- a/vendor/gotest.tools/assert/cmp/result.go +++ b/vendor/gotest.tools/v3/assert/cmp/result.go @@ -6,7 +6,7 @@ import ( "go/ast" "text/template" - "gotest.tools/internal/source" + "gotest.tools/v3/internal/source" ) // A Result of a Comparison. diff --git a/vendor/gotest.tools/assert/result.go b/vendor/gotest.tools/v3/assert/result.go index 949d939619..d77860b588 100644 --- a/vendor/gotest.tools/assert/result.go +++ b/vendor/gotest.tools/v3/assert/result.go @@ -4,9 +4,9 @@ import ( "fmt" "go/ast" - "gotest.tools/assert/cmp" - "gotest.tools/internal/format" - "gotest.tools/internal/source" + "gotest.tools/v3/assert/cmp" + "gotest.tools/v3/internal/format" + "gotest.tools/v3/internal/source" ) func runComparison( diff --git a/vendor/gotest.tools/env/env.go b/vendor/gotest.tools/v3/env/env.go index 609d90e996..7a71acd0d7 100644 --- a/vendor/gotest.tools/env/env.go +++ b/vendor/gotest.tools/v3/env/env.go @@ -1,14 +1,14 @@ /*Package env provides functions to test code that read environment variables or the current working directory. */ -package env // import "gotest.tools/env" +package env // import "gotest.tools/v3/env" import ( "os" "strings" - "gotest.tools/assert" - "gotest.tools/x/subtest" + "gotest.tools/v3/assert" + "gotest.tools/v3/internal/cleanup" ) type helperT interface { @@ -18,30 +18,34 @@ type helperT interface { // Patch changes the value of an environment variable, and returns a // function which will reset the the value of that variable back to the // previous state. +// +// When used with Go 1.14+ the unpatch function will be called automatically +// when the test ends, unless the TEST_NOCLEANUP env var is set to true. func Patch(t assert.TestingT, key, value string) func() { if ht, ok := t.(helperT); ok { ht.Helper() } - oldValue, ok := os.LookupEnv(key) + oldValue, envVarExists := os.LookupEnv(key) assert.NilError(t, os.Setenv(key, value)) - cleanup := func() { + clean := func() { if ht, ok := t.(helperT); ok { ht.Helper() } - if !ok { + if !envVarExists { assert.NilError(t, os.Unsetenv(key)) return } assert.NilError(t, os.Setenv(key, oldValue)) } - if tc, ok := t.(subtest.TestContext); ok { - tc.AddCleanup(cleanup) - } - return cleanup + cleanup.Cleanup(t, clean) + return clean } // PatchAll sets the environment to env, and returns a function which will // reset the environment back to the previous state. +// +// When used with Go 1.14+ the unpatch function will be called automatically +// when the test ends, unless the TEST_NOCLEANUP env var is set to true. func PatchAll(t assert.TestingT, env map[string]string) func() { if ht, ok := t.(helperT); ok { ht.Helper() @@ -52,7 +56,7 @@ func PatchAll(t assert.TestingT, env map[string]string) func() { for key, value := range env { assert.NilError(t, os.Setenv(key, value), "setenv %s=%s", key, value) } - cleanup := func() { + clean := func() { if ht, ok := t.(helperT); ok { ht.Helper() } @@ -61,10 +65,8 @@ func PatchAll(t assert.TestingT, env map[string]string) func() { assert.NilError(t, os.Setenv(key, oldVal), "setenv %s=%s", key, oldVal) } } - if tc, ok := t.(subtest.TestContext); ok { - tc.AddCleanup(cleanup) - } - return cleanup + cleanup.Cleanup(t, clean) + return clean } // ToMap takes a list of strings in the format returned by os.Environ() and @@ -94,6 +96,10 @@ func getParts(raw string) (string, string) { // ChangeWorkingDir to the directory, and return a function which restores the // previous working directory. +// +// When used with Go 1.14+ the previous working directory will be restored +// automatically when the test ends, unless the TEST_NOCLEANUP env var is set to +// true. func ChangeWorkingDir(t assert.TestingT, dir string) func() { if ht, ok := t.(helperT); ok { ht.Helper() @@ -101,14 +107,12 @@ func ChangeWorkingDir(t assert.TestingT, dir string) func() { cwd, err := os.Getwd() assert.NilError(t, err) assert.NilError(t, os.Chdir(dir)) - cleanup := func() { + clean := func() { if ht, ok := t.(helperT); ok { ht.Helper() } assert.NilError(t, os.Chdir(cwd)) } - if tc, ok := t.(subtest.TestContext); ok { - tc.AddCleanup(cleanup) - } - return cleanup + cleanup.Cleanup(t, clean) + return clean } diff --git a/vendor/gotest.tools/fs/file.go b/vendor/gotest.tools/v3/fs/file.go index 7d0cab363b..de5f4ec120 100644 --- a/vendor/gotest.tools/fs/file.go +++ b/vendor/gotest.tools/v3/fs/file.go @@ -1,7 +1,7 @@ /*Package fs provides tools for creating temporary files, and testing the contents and structure of a directory. */ -package fs // import "gotest.tools/fs" +package fs // import "gotest.tools/v3/fs" import ( "io/ioutil" @@ -10,8 +10,8 @@ import ( "runtime" "strings" - "gotest.tools/assert" - "gotest.tools/x/subtest" + "gotest.tools/v3/assert" + "gotest.tools/v3/internal/cleanup" ) // Path objects return their filesystem path. Path may be implemented by a @@ -38,18 +38,21 @@ type helperT interface { // NewFile creates a new file in a temporary directory using prefix as part of // the filename. The PathOps are applied to the before returning the File. +// +// When used with Go 1.14+ the file will be automatically removed when the test +// ends, unless the TEST_NOCLEANUP env var is set to true. func NewFile(t assert.TestingT, prefix string, ops ...PathOp) *File { if ht, ok := t.(helperT); ok { ht.Helper() } tempfile, err := ioutil.TempFile("", cleanPrefix(prefix)+"-") assert.NilError(t, err) + file := &File{path: tempfile.Name()} + cleanup.Cleanup(t, file.Remove) + assert.NilError(t, tempfile.Close()) assert.NilError(t, applyPathOps(file, ops)) - if tc, ok := t.(subtest.TestContext); ok { - tc.AddCleanup(file.Remove) - } return file } @@ -79,6 +82,9 @@ type Dir struct { // NewDir returns a new temporary directory using prefix as part of the directory // name. The PathOps are applied before returning the Dir. +// +// When used with Go 1.14+ the directory will be automatically removed when the test +// ends, unless the TEST_NOCLEANUP env var is set to true. func NewDir(t assert.TestingT, prefix string, ops ...PathOp) *Dir { if ht, ok := t.(helperT); ok { ht.Helper() @@ -86,10 +92,9 @@ func NewDir(t assert.TestingT, prefix string, ops ...PathOp) *Dir { path, err := ioutil.TempDir("", cleanPrefix(prefix)+"-") assert.NilError(t, err) dir := &Dir{path: path} + cleanup.Cleanup(t, dir.Remove) + assert.NilError(t, applyPathOps(dir, ops)) - if tc, ok := t.(subtest.TestContext); ok { - tc.AddCleanup(dir.Remove) - } return dir } diff --git a/vendor/gotest.tools/fs/manifest.go b/vendor/gotest.tools/v3/fs/manifest.go index e5e693e6c5..d396756376 100644 --- a/vendor/gotest.tools/fs/manifest.go +++ b/vendor/gotest.tools/v3/fs/manifest.go @@ -7,7 +7,7 @@ import ( "path/filepath" "github.com/pkg/errors" - "gotest.tools/assert" + "gotest.tools/v3/assert" ) // Manifest stores the expected structure and properties of files and directories diff --git a/vendor/gotest.tools/fs/manifest_unix.go b/vendor/gotest.tools/v3/fs/manifest_unix.go index bba2fcd9df..bba2fcd9df 100644 --- a/vendor/gotest.tools/fs/manifest_unix.go +++ b/vendor/gotest.tools/v3/fs/manifest_unix.go diff --git a/vendor/gotest.tools/fs/manifest_windows.go b/vendor/gotest.tools/v3/fs/manifest_windows.go index 1c1a093679..1c1a093679 100644 --- a/vendor/gotest.tools/fs/manifest_windows.go +++ b/vendor/gotest.tools/v3/fs/manifest_windows.go diff --git a/vendor/gotest.tools/fs/ops.go b/vendor/gotest.tools/v3/fs/ops.go index c3c33587b6..4589623fa9 100644 --- a/vendor/gotest.tools/fs/ops.go +++ b/vendor/gotest.tools/v3/fs/ops.go @@ -10,7 +10,7 @@ import ( "time" "github.com/pkg/errors" - "gotest.tools/assert" + "gotest.tools/v3/assert" ) const defaultFileMode = 0644 @@ -61,6 +61,23 @@ func WithBytes(raw []byte) PathOp { } } +// WithReaderContent copies the reader contents to the file at Path +func WithReaderContent(r io.Reader) PathOp { + return func(path Path) error { + if m, ok := path.(manifestFile); ok { + m.SetContent(ioutil.NopCloser(r)) + return nil + } + f, err := os.OpenFile(path.Path(), os.O_WRONLY, defaultFileMode) + if err != nil { + return err + } + defer f.Close() + _, err = io.Copy(f, r) + return err + } +} + // AsUser changes ownership of the file system object at Path func AsUser(uid, gid int) PathOp { return func(path Path) error { diff --git a/vendor/gotest.tools/fs/path.go b/vendor/gotest.tools/v3/fs/path.go index 4bb38774bc..c301b90489 100644 --- a/vendor/gotest.tools/fs/path.go +++ b/vendor/gotest.tools/v3/fs/path.go @@ -6,7 +6,7 @@ import ( "io/ioutil" "os" - "gotest.tools/assert" + "gotest.tools/v3/assert" ) // resourcePath is an adaptor for resources so they can be used as a Path @@ -150,7 +150,7 @@ const anyFile = "*" // to contain unspecified files. func MatchExtraFiles(path Path) error { if m, ok := path.(*directoryPath); ok { - m.AddFile(anyFile) + return m.AddFile(anyFile) } return nil } @@ -180,7 +180,7 @@ func MatchFileContent(f func([]byte) CompareResult) PathOp { func MatchFilesWithGlob(glob string, ops ...PathOp) PathOp { return func(path Path) error { if m, ok := path.(*directoryPath); ok { - m.AddGlobFiles(glob, ops...) + return m.AddGlobFiles(glob, ops...) } return nil } diff --git a/vendor/gotest.tools/fs/report.go b/vendor/gotest.tools/v3/fs/report.go index adc5a5f1bc..0b2d73d977 100644 --- a/vendor/gotest.tools/fs/report.go +++ b/vendor/gotest.tools/v3/fs/report.go @@ -10,8 +10,8 @@ import ( "sort" "strings" - "gotest.tools/assert/cmp" - "gotest.tools/internal/format" + "gotest.tools/v3/assert/cmp" + "gotest.tools/v3/internal/format" ) // Equal compares a directory to the expected structured described by a manifest @@ -159,7 +159,7 @@ func eqSymlink(x, y *symlink) []problem { func eqDirectory(path string, x, y *directory) []failure { p := eqResource(x.resource, y.resource) - var f []failure + var f []failure // nolint: prealloc matchedFiles := make(map[string]bool) for _, name := range sortedKeys(x.items) { @@ -209,7 +209,7 @@ func maybeAppendFailure(failures []failure, path string, problems []problem) []f } func sortedKeys(items map[string]dirEntry) []string { - var keys []string + keys := make([]string, 0, len(items)) for key := range items { keys = append(keys, key) } diff --git a/vendor/gotest.tools/v3/go.mod b/vendor/gotest.tools/v3/go.mod new file mode 100644 index 0000000000..4ae9354e50 --- /dev/null +++ b/vendor/gotest.tools/v3/go.mod @@ -0,0 +1,10 @@ +module gotest.tools/v3 + +require ( + github.com/google/go-cmp v0.3.0 + github.com/pkg/errors v0.8.1 + github.com/spf13/pflag v1.0.3 + golang.org/x/tools v0.0.0-20190624222133-a101b041ded4 +) + +go 1.11 diff --git a/vendor/gotest.tools/icmd/command.go b/vendor/gotest.tools/v3/icmd/command.go index e931ccb928..3f0c64893a 100644 --- a/vendor/gotest.tools/icmd/command.go +++ b/vendor/gotest.tools/v3/icmd/command.go @@ -1,18 +1,19 @@ /*Package icmd executes binaries and provides convenient assertions for testing the results. */ -package icmd // import "gotest.tools/icmd" +package icmd // import "gotest.tools/v3/icmd" import ( "bytes" "fmt" "io" + "os" "os/exec" "strings" "sync" "time" - "gotest.tools/assert" - "gotest.tools/assert/cmp" + "gotest.tools/v3/assert" + "gotest.tools/v3/assert/cmp" ) type helperT interface { @@ -191,12 +192,13 @@ func (r *Result) setExitError(err error) { // Cmd contains the arguments and options for a process to run as part of a test // suite. type Cmd struct { - Command []string - Timeout time.Duration - Stdin io.Reader - Stdout io.Writer - Dir string - Env []string + Command []string + Timeout time.Duration + Stdin io.Reader + Stdout io.Writer + Dir string + Env []string + ExtraFiles []*os.File } // Command create a simple Cmd with the specified command and arguments @@ -252,6 +254,8 @@ func buildCmd(cmd Cmd) *Result { execCmd.Stdout = outBuffer } execCmd.Stderr = errBuffer + execCmd.ExtraFiles = cmd.ExtraFiles + return &Result{ Cmd: execCmd, outBuffer: outBuffer, diff --git a/vendor/gotest.tools/icmd/exitcode.go b/vendor/gotest.tools/v3/icmd/exitcode.go index 9356dbcdef..9356dbcdef 100644 --- a/vendor/gotest.tools/icmd/exitcode.go +++ b/vendor/gotest.tools/v3/icmd/exitcode.go diff --git a/vendor/gotest.tools/icmd/ops.go b/vendor/gotest.tools/v3/icmd/ops.go index 18176eead3..35c3958d52 100644 --- a/vendor/gotest.tools/icmd/ops.go +++ b/vendor/gotest.tools/v3/icmd/ops.go @@ -2,6 +2,7 @@ package icmd import ( "io" + "os" "time" ) @@ -36,3 +37,10 @@ func WithStdin(r io.Reader) CmdOp { c.Stdin = r } } + +// WithExtraFile adds a file descriptor to the command +func WithExtraFile(f *os.File) CmdOp { + return func(c *Cmd) { + c.ExtraFiles = append(c.ExtraFiles, f) + } +} diff --git a/vendor/gotest.tools/v3/internal/cleanup/cleanup.go b/vendor/gotest.tools/v3/internal/cleanup/cleanup.go new file mode 100644 index 0000000000..7e2922f409 --- /dev/null +++ b/vendor/gotest.tools/v3/internal/cleanup/cleanup.go @@ -0,0 +1,45 @@ +/*Package cleanup handles migration to and support for the Go 1.14+ +testing.TB.Cleanup() function. +*/ +package cleanup + +import ( + "os" + "strings" + + "gotest.tools/v3/x/subtest" +) + +type cleanupT interface { + Cleanup(f func()) +} + +type logT interface { + Log(...interface{}) +} + +type helperT interface { + Helper() +} + +var noCleanup = strings.ToLower(os.Getenv("TEST_NOCLEANUP")) == "true" + +// Cleanup registers f as a cleanup function on t if any mechanisms are available. +// +// Skips registering f if TEST_NOCLEANUP is set to true. +func Cleanup(t logT, f func()) { + if ht, ok := t.(helperT); ok { + ht.Helper() + } + if noCleanup { + t.Log("skipping cleanup because TEST_NOCLEANUP was enabled.") + return + } + if ct, ok := t.(cleanupT); ok { + ct.Cleanup(f) + return + } + if tc, ok := t.(subtest.TestContext); ok { + tc.AddCleanup(f) + } +} diff --git a/vendor/gotest.tools/internal/difflib/LICENSE b/vendor/gotest.tools/v3/internal/difflib/LICENSE index c67dad612a..c67dad612a 100644 --- a/vendor/gotest.tools/internal/difflib/LICENSE +++ b/vendor/gotest.tools/v3/internal/difflib/LICENSE diff --git a/vendor/gotest.tools/internal/difflib/difflib.go b/vendor/gotest.tools/v3/internal/difflib/difflib.go index b6f486b9c9..9bf506b6be 100644 --- a/vendor/gotest.tools/internal/difflib/difflib.go +++ b/vendor/gotest.tools/v3/internal/difflib/difflib.go @@ -4,7 +4,7 @@ Original source: https://github.com/pmezard/go-difflib This file is trimmed to only the parts used by this repository. */ -package difflib // import "gotest.tools/internal/difflib" +package difflib // import "gotest.tools/v3/internal/difflib" func min(a, b int) int { if a < b { diff --git a/vendor/gotest.tools/internal/format/diff.go b/vendor/gotest.tools/v3/internal/format/diff.go index c938c97bec..9897d4b9d9 100644 --- a/vendor/gotest.tools/internal/format/diff.go +++ b/vendor/gotest.tools/v3/internal/format/diff.go @@ -6,7 +6,7 @@ import ( "strings" "unicode" - "gotest.tools/internal/difflib" + "gotest.tools/v3/internal/difflib" ) const ( diff --git a/vendor/gotest.tools/internal/format/format.go b/vendor/gotest.tools/v3/internal/format/format.go index 8f6494f994..5097e4bd6e 100644 --- a/vendor/gotest.tools/internal/format/format.go +++ b/vendor/gotest.tools/v3/internal/format/format.go @@ -1,4 +1,4 @@ -package format // import "gotest.tools/internal/format" +package format // import "gotest.tools/v3/internal/format" import "fmt" diff --git a/vendor/gotest.tools/internal/source/defers.go b/vendor/gotest.tools/v3/internal/source/defers.go index 66cfafbb64..66cfafbb64 100644 --- a/vendor/gotest.tools/internal/source/defers.go +++ b/vendor/gotest.tools/v3/internal/source/defers.go diff --git a/vendor/gotest.tools/internal/source/source.go b/vendor/gotest.tools/v3/internal/source/source.go index 8a5d0e8d35..134afb6bac 100644 --- a/vendor/gotest.tools/internal/source/source.go +++ b/vendor/gotest.tools/v3/internal/source/source.go @@ -1,4 +1,4 @@ -package source // import "gotest.tools/internal/source" +package source // import "gotest.tools/v3/internal/source" import ( "bytes" @@ -92,7 +92,9 @@ func nodePosition(fileset *token.FileSet, node ast.Node) token.Position { return fileset.Position(node.Pos()) } -var goVersionBefore19 = func() bool { +// GoVersionLessThan returns true if runtime.Version() is semantically less than +// version 1.minor. +func GoVersionLessThan(minor int64) bool { version := runtime.Version() // not a release version if !strings.HasPrefix(version, "go") { @@ -103,9 +105,11 @@ var goVersionBefore19 = func() bool { if len(parts) < 2 { return false } - minor, err := strconv.ParseInt(parts[1], 10, 32) - return err == nil && parts[0] == "1" && minor < 9 -}() + actual, err := strconv.ParseInt(parts[1], 10, 32) + return err == nil && parts[0] == "1" && actual < minor +} + +var goVersionBefore19 = GoVersionLessThan(9) func getCallExprArgs(node ast.Node) ([]ast.Expr, error) { visitor := &callExprVisitor{} diff --git a/vendor/gotest.tools/poll/check.go b/vendor/gotest.tools/v3/poll/check.go index 060b099890..060b099890 100644 --- a/vendor/gotest.tools/poll/check.go +++ b/vendor/gotest.tools/v3/poll/check.go diff --git a/vendor/gotest.tools/poll/poll.go b/vendor/gotest.tools/v3/poll/poll.go index 5e238dca42..b5bd7108c2 100644 --- a/vendor/gotest.tools/poll/poll.go +++ b/vendor/gotest.tools/v3/poll/poll.go @@ -1,6 +1,6 @@ /*Package poll provides tools for testing asynchronous code. */ -package poll // import "gotest.tools/poll" +package poll // import "gotest.tools/v3/poll" import ( "fmt" diff --git a/vendor/gotest.tools/skip/skip.go b/vendor/gotest.tools/v3/skip/skip.go index d27ca53c3d..cb899f78b1 100644 --- a/vendor/gotest.tools/skip/skip.go +++ b/vendor/gotest.tools/v3/skip/skip.go @@ -1,7 +1,7 @@ /*Package skip provides functions for skipping a test and printing the source code of the condition used to skip the test. */ -package skip // import "gotest.tools/skip" +package skip // import "gotest.tools/v3/skip" import ( "fmt" @@ -10,8 +10,8 @@ import ( "runtime" "strings" - "gotest.tools/internal/format" - "gotest.tools/internal/source" + "gotest.tools/v3/internal/format" + "gotest.tools/v3/internal/source" ) type skipT interface { diff --git a/vendor/gotest.tools/x/subtest/context.go b/vendor/gotest.tools/v3/x/subtest/context.go index 878bdebf14..5750bf409f 100644 --- a/vendor/gotest.tools/x/subtest/context.go +++ b/vendor/gotest.tools/v3/x/subtest/context.go @@ -3,7 +3,7 @@ provides a testing.TB, and context.Context. This package was inspired by github.com/frankban/quicktest. */ -package subtest // import "gotest.tools/x/subtest" +package subtest // import "gotest.tools/v3/x/subtest" import ( "context" @@ -27,9 +27,9 @@ func (tc *testcase) Ctx() context.Context { return tc.ctx } -// Cleanup runs all cleanup functions. Functions are run in the opposite order +// cleanup runs all cleanup functions. Functions are run in the opposite order // in which they were added. Cleanup is called automatically before Run exits. -func (tc *testcase) Cleanup() { +func (tc *testcase) cleanup() { for _, f := range tc.cleanupFuncs { // Defer all cleanup functions so they all run even if one calls // t.FailNow() or panics. Deferring them also runs them in reverse order. @@ -59,7 +59,7 @@ type parallel interface { func Run(t *testing.T, name string, subtest func(t TestContext)) bool { return t.Run(name, func(t *testing.T) { tc := &testcase{TB: t} - defer tc.Cleanup() + defer tc.cleanup() subtest(tc) }) } @@ -68,6 +68,9 @@ func Run(t *testing.T, name string, subtest func(t TestContext)) bool { type TestContext interface { testing.TB // AddCleanup function which will be run when before Run returns. + // + // Deprecated: Go 1.14+ now includes a testing.TB.Cleanup(func()) which + // should be used instead. AddCleanup will be removed in a future release. AddCleanup(f func()) // Ctx returns a context for the test case. Multiple calls from the same subtest // will return the same context. The context is cancelled when Run diff --git a/volume/local/local_test.go b/volume/local/local_test.go index 9e0e6beb25..381787ecb1 100644 --- a/volume/local/local_test.go +++ b/volume/local/local_test.go @@ -11,7 +11,7 @@ import ( "github.com/docker/docker/pkg/idtools" "github.com/docker/docker/pkg/mount" - "gotest.tools/skip" + "gotest.tools/v3/skip" ) func TestGetAddress(t *testing.T) { diff --git a/volume/mounts/parser_test.go b/volume/mounts/parser_test.go index f9b32e5ccf..c879c3b152 100644 --- a/volume/mounts/parser_test.go +++ b/volume/mounts/parser_test.go @@ -9,8 +9,8 @@ import ( "testing" "github.com/docker/docker/api/types/mount" - "gotest.tools/assert" - "gotest.tools/assert/cmp" + "gotest.tools/v3/assert" + "gotest.tools/v3/assert/cmp" ) type parseMountRawTestSet struct { diff --git a/volume/service/db_test.go b/volume/service/db_test.go index 8b6295adfd..b7e2424b43 100644 --- a/volume/service/db_test.go +++ b/volume/service/db_test.go @@ -8,8 +8,8 @@ import ( "time" bolt "go.etcd.io/bbolt" - "gotest.tools/assert" - is "gotest.tools/assert/cmp" + "gotest.tools/v3/assert" + is "gotest.tools/v3/assert/cmp" ) func TestSetGetMeta(t *testing.T) { diff --git a/volume/service/restore_test.go b/volume/service/restore_test.go index 95420d9586..bf528bb935 100644 --- a/volume/service/restore_test.go +++ b/volume/service/restore_test.go @@ -10,7 +10,7 @@ import ( volumedrivers "github.com/docker/docker/volume/drivers" "github.com/docker/docker/volume/service/opts" volumetestutils "github.com/docker/docker/volume/testutils" - "gotest.tools/assert" + "gotest.tools/v3/assert" ) func TestRestore(t *testing.T) { diff --git a/volume/service/service_linux_test.go b/volume/service/service_linux_test.go index 31b3f81e2c..fec9f7f358 100644 --- a/volume/service/service_linux_test.go +++ b/volume/service/service_linux_test.go @@ -13,8 +13,8 @@ import ( "github.com/docker/docker/volume/local" "github.com/docker/docker/volume/service/opts" "github.com/docker/docker/volume/testutils" - "gotest.tools/assert" - is "gotest.tools/assert/cmp" + "gotest.tools/v3/assert" + is "gotest.tools/v3/assert/cmp" ) func TestLocalVolumeSize(t *testing.T) { diff --git a/volume/service/service_test.go b/volume/service/service_test.go index dd83df3172..9a9f349bcd 100644 --- a/volume/service/service_test.go +++ b/volume/service/service_test.go @@ -12,8 +12,8 @@ import ( volumedrivers "github.com/docker/docker/volume/drivers" "github.com/docker/docker/volume/service/opts" "github.com/docker/docker/volume/testutils" - "gotest.tools/assert" - is "gotest.tools/assert/cmp" + "gotest.tools/v3/assert" + is "gotest.tools/v3/assert/cmp" ) func TestServiceCreate(t *testing.T) { diff --git a/volume/service/store_test.go b/volume/service/store_test.go index 59a314d69b..5442f4558c 100644 --- a/volume/service/store_test.go +++ b/volume/service/store_test.go @@ -15,8 +15,8 @@ import ( "github.com/docker/docker/volume/service/opts" volumetestutils "github.com/docker/docker/volume/testutils" "github.com/google/go-cmp/cmp" - "gotest.tools/assert" - is "gotest.tools/assert/cmp" + "gotest.tools/v3/assert" + is "gotest.tools/v3/assert/cmp" ) func TestCreate(t *testing.T) { |