diff --git a/TESTING.md b/TESTING.md index 1231e1c5f4d91..34ad843638b65 100644 --- a/TESTING.md +++ b/TESTING.md @@ -8,11 +8,11 @@ questions you may have as an aspiring Moby contributor. Moby has two test suites (and one legacy test suite): * Unit tests - use standard `go test` and - [gotestyourself/assert](https://godoc.org/github.com/gotestyourself/gotestyourself/assert) assertions. They are located in + [gotest.tools/assert](https://godoc.org/gotest.tools/assert) assertions. They are located in the package they test. Unit tests should be fast and test only their own package. * API integration tests - use standard `go test` and - [gotestyourself/assert](https://godoc.org/github.com/gotestyourself/gotestyourself/assert) assertions. They are located in + [gotest.tools/assert](https://godoc.org/gotest.tools/assert) assertions. They are located in `./integration/` directories, where `component` is: container, image, volume, etc. These tests perform HTTP requests to an API endpoint and check the HTTP response and daemon state after the call. diff --git a/api/server/middleware/debug_test.go b/api/server/middleware/debug_test.go index cc227b324844f..a64b73e0d718b 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" - "github.com/gotestyourself/gotestyourself/assert" - is "github.com/gotestyourself/gotestyourself/assert/cmp" + "gotest.tools/assert" + is "gotest.tools/assert/cmp" ) func TestMaskSecretKeys(t *testing.T) { diff --git a/api/server/middleware/version_test.go b/api/server/middleware/version_test.go index c439c8abfc1ea..edbc0bcaa589f 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" - "github.com/gotestyourself/gotestyourself/assert" - is "github.com/gotestyourself/gotestyourself/assert/cmp" + "gotest.tools/assert" + is "gotest.tools/assert/cmp" ) func TestVersionMiddlewareVersion(t *testing.T) { diff --git a/api/types/filters/parse_test.go b/api/types/filters/parse_test.go index fbd9ae4fb174a..e8345a1d5d524 100644 --- a/api/types/filters/parse_test.go +++ b/api/types/filters/parse_test.go @@ -4,8 +4,8 @@ import ( "errors" "testing" - "github.com/gotestyourself/gotestyourself/assert" - is "github.com/gotestyourself/gotestyourself/assert/cmp" + "gotest.tools/assert" + is "gotest.tools/assert/cmp" ) func TestParseArgs(t *testing.T) { diff --git a/builder/dockerfile/buildargs_test.go b/builder/dockerfile/buildargs_test.go index c3f61048626f0..c3b82c83f4b60 100644 --- a/builder/dockerfile/buildargs_test.go +++ b/builder/dockerfile/buildargs_test.go @@ -5,8 +5,8 @@ import ( "strings" "testing" - "github.com/gotestyourself/gotestyourself/assert" - is "github.com/gotestyourself/gotestyourself/assert/cmp" + "gotest.tools/assert" + is "gotest.tools/assert/cmp" ) func strPtr(source string) *string { diff --git a/builder/dockerfile/copy_test.go b/builder/dockerfile/copy_test.go index f2f895387ce78..f559ff4fd8213 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" - "github.com/gotestyourself/gotestyourself/assert" - is "github.com/gotestyourself/gotestyourself/assert/cmp" - "github.com/gotestyourself/gotestyourself/fs" + "gotest.tools/assert" + is "gotest.tools/assert/cmp" + "gotest.tools/fs" ) func TestIsExistingDirectory(t *testing.T) { diff --git a/builder/dockerfile/dispatchers_test.go b/builder/dockerfile/dispatchers_test.go index a5474d6db8e77..36d20a1a82bdf 100644 --- a/builder/dockerfile/dispatchers_test.go +++ b/builder/dockerfile/dispatchers_test.go @@ -14,10 +14,10 @@ import ( "github.com/docker/docker/image" "github.com/docker/docker/pkg/system" "github.com/docker/go-connections/nat" - "github.com/gotestyourself/gotestyourself/assert" - is "github.com/gotestyourself/gotestyourself/assert/cmp" "github.com/moby/buildkit/frontend/dockerfile/instructions" "github.com/moby/buildkit/frontend/dockerfile/shell" + "gotest.tools/assert" + is "gotest.tools/assert/cmp" ) func newBuilderWithMockBackend() *Builder { diff --git a/builder/dockerfile/evaluator_test.go b/builder/dockerfile/evaluator_test.go index 4657b1c58073f..fb79b238e8219 100644 --- a/builder/dockerfile/evaluator_test.go +++ b/builder/dockerfile/evaluator_test.go @@ -7,10 +7,10 @@ import ( "github.com/docker/docker/builder/remotecontext" "github.com/docker/docker/pkg/archive" "github.com/docker/docker/pkg/reexec" - "github.com/gotestyourself/gotestyourself/assert" - is "github.com/gotestyourself/gotestyourself/assert/cmp" - "github.com/gotestyourself/gotestyourself/skip" "github.com/moby/buildkit/frontend/dockerfile/instructions" + "gotest.tools/assert" + is "gotest.tools/assert/cmp" + "gotest.tools/skip" ) type dispatchTestCase struct { @@ -97,7 +97,7 @@ func initDispatchTestCases() []dispatchTestCase { } func TestDispatch(t *testing.T) { - skip.IfCondition(t, os.Getuid() != 0, "skipping test that requires root") + skip.If(t, os.Getuid() != 0, "skipping test that requires root") testCases := initDispatchTestCases() for _, testCase := range testCases { diff --git a/builder/dockerfile/internals_linux_test.go b/builder/dockerfile/internals_linux_test.go index c244ddfe3febe..1b3a99893a72b 100644 --- a/builder/dockerfile/internals_linux_test.go +++ b/builder/dockerfile/internals_linux_test.go @@ -6,8 +6,8 @@ import ( "testing" "github.com/docker/docker/pkg/idtools" - "github.com/gotestyourself/gotestyourself/assert" - is "github.com/gotestyourself/gotestyourself/assert/cmp" + "gotest.tools/assert" + is "gotest.tools/assert/cmp" ) func TestChownFlagParsing(t *testing.T) { diff --git a/builder/dockerfile/internals_test.go b/builder/dockerfile/internals_test.go index afd4a45f88b43..1c34fd3871c96 100644 --- a/builder/dockerfile/internals_test.go +++ b/builder/dockerfile/internals_test.go @@ -13,9 +13,9 @@ import ( "github.com/docker/docker/builder/remotecontext" "github.com/docker/docker/pkg/archive" "github.com/docker/go-connections/nat" - "github.com/gotestyourself/gotestyourself/assert" - is "github.com/gotestyourself/gotestyourself/assert/cmp" - "github.com/gotestyourself/gotestyourself/skip" + "gotest.tools/assert" + is "gotest.tools/assert/cmp" + "gotest.tools/skip" ) func TestEmptyDockerfile(t *testing.T) { @@ -61,7 +61,7 @@ func TestNonExistingDockerfile(t *testing.T) { } func readAndCheckDockerfile(t *testing.T, testName, contextDir, dockerfilePath, expectedError string) { - skip.IfCondition(t, os.Getuid() != 0, "skipping test that requires root") + skip.If(t, os.Getuid() != 0, "skipping test that requires root") tarStream, err := archive.Tar(contextDir, archive.Uncompressed) assert.NilError(t, err) diff --git a/builder/dockerfile/internals_windows_test.go b/builder/dockerfile/internals_windows_test.go index ffe52fb132623..4f00623404dbb 100644 --- a/builder/dockerfile/internals_windows_test.go +++ b/builder/dockerfile/internals_windows_test.go @@ -6,8 +6,8 @@ import ( "fmt" "testing" - "github.com/gotestyourself/gotestyourself/assert" - is "github.com/gotestyourself/gotestyourself/assert/cmp" + "gotest.tools/assert" + is "gotest.tools/assert/cmp" ) func TestNormalizeDest(t *testing.T) { diff --git a/builder/fscache/fscache_test.go b/builder/fscache/fscache_test.go index 16712ff743894..5108d65df1576 100644 --- a/builder/fscache/fscache_test.go +++ b/builder/fscache/fscache_test.go @@ -8,9 +8,9 @@ import ( "testing" "time" - "github.com/gotestyourself/gotestyourself/assert" - is "github.com/gotestyourself/gotestyourself/assert/cmp" "github.com/moby/buildkit/session/filesync" + "gotest.tools/assert" + is "gotest.tools/assert/cmp" ) func TestFSCache(t *testing.T) { diff --git a/builder/remotecontext/git/gitutils_test.go b/builder/remotecontext/git/gitutils_test.go index a46675b22b6c2..8c39679081f1e 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" - "github.com/gotestyourself/gotestyourself/assert" - is "github.com/gotestyourself/gotestyourself/assert/cmp" + "gotest.tools/assert" + is "gotest.tools/assert/cmp" ) func TestParseRemoteURL(t *testing.T) { diff --git a/builder/remotecontext/mimetype_test.go b/builder/remotecontext/mimetype_test.go index b13429cfa8a67..df9c37877091f 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" - "github.com/gotestyourself/gotestyourself/assert" - is "github.com/gotestyourself/gotestyourself/assert/cmp" + "gotest.tools/assert" + is "gotest.tools/assert/cmp" ) func TestDetectContentType(t *testing.T) { diff --git a/builder/remotecontext/remote_test.go b/builder/remotecontext/remote_test.go index 64442d5107623..a0101f7493853 100644 --- a/builder/remotecontext/remote_test.go +++ b/builder/remotecontext/remote_test.go @@ -10,9 +10,9 @@ import ( "testing" "github.com/docker/docker/builder" - "github.com/gotestyourself/gotestyourself/assert" - is "github.com/gotestyourself/gotestyourself/assert/cmp" - "github.com/gotestyourself/gotestyourself/fs" + "gotest.tools/assert" + is "gotest.tools/assert/cmp" + "gotest.tools/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 b05e4449ff15a..46f128d9f0608 100644 --- a/builder/remotecontext/tarsum_test.go +++ b/builder/remotecontext/tarsum_test.go @@ -9,8 +9,8 @@ import ( "github.com/docker/docker/builder" "github.com/docker/docker/pkg/archive" "github.com/docker/docker/pkg/reexec" - "github.com/gotestyourself/gotestyourself/skip" "github.com/pkg/errors" + "gotest.tools/skip" ) const ( @@ -137,7 +137,7 @@ func TestRemoveDirectory(t *testing.T) { } func makeTestArchiveContext(t *testing.T, dir string) builder.Source { - skip.IfCondition(t, os.Getuid() != 0, "skipping test that requires root") + skip.If(t, os.Getuid() != 0, "skipping test that requires root") tarStream, err := archive.Tar(dir, archive.Uncompressed) if err != nil { t.Fatalf("error: %s", err) diff --git a/client/client_test.go b/client/client_test.go index 403aa9f3f0784..58bccaa311508 100644 --- a/client/client_test.go +++ b/client/client_test.go @@ -10,10 +10,10 @@ import ( "github.com/docker/docker/api" "github.com/docker/docker/api/types" - "github.com/gotestyourself/gotestyourself/assert" - is "github.com/gotestyourself/gotestyourself/assert/cmp" - "github.com/gotestyourself/gotestyourself/env" - "github.com/gotestyourself/gotestyourself/skip" + "gotest.tools/assert" + is "gotest.tools/assert/cmp" + "gotest.tools/env" + "gotest.tools/skip" ) func TestNewEnvClient(t *testing.T) { diff --git a/client/config_create_test.go b/client/config_create_test.go index 8675e7f541a14..a6408792db931 100644 --- a/client/config_create_test.go +++ b/client/config_create_test.go @@ -12,8 +12,8 @@ import ( "github.com/docker/docker/api/types" "github.com/docker/docker/api/types/swarm" - "github.com/gotestyourself/gotestyourself/assert" - is "github.com/gotestyourself/gotestyourself/assert/cmp" + "gotest.tools/assert" + is "gotest.tools/assert/cmp" ) func TestConfigCreateUnsupported(t *testing.T) { diff --git a/client/config_inspect_test.go b/client/config_inspect_test.go index b0c30fa27942f..76a5dae9e5ebc 100644 --- a/client/config_inspect_test.go +++ b/client/config_inspect_test.go @@ -11,9 +11,9 @@ import ( "testing" "github.com/docker/docker/api/types/swarm" - "github.com/gotestyourself/gotestyourself/assert" - is "github.com/gotestyourself/gotestyourself/assert/cmp" "github.com/pkg/errors" + "gotest.tools/assert" + is "gotest.tools/assert/cmp" ) func TestConfigInspectNotFound(t *testing.T) { diff --git a/client/config_list_test.go b/client/config_list_test.go index e01d3d4c9df5c..b35a5929531ef 100644 --- a/client/config_list_test.go +++ b/client/config_list_test.go @@ -13,8 +13,8 @@ import ( "github.com/docker/docker/api/types" "github.com/docker/docker/api/types/filters" "github.com/docker/docker/api/types/swarm" - "github.com/gotestyourself/gotestyourself/assert" - is "github.com/gotestyourself/gotestyourself/assert/cmp" + "gotest.tools/assert" + is "gotest.tools/assert/cmp" ) func TestConfigListUnsupported(t *testing.T) { diff --git a/client/config_remove_test.go b/client/config_remove_test.go index d574c5be0cfe2..9c0c0f9337e2c 100644 --- a/client/config_remove_test.go +++ b/client/config_remove_test.go @@ -9,8 +9,8 @@ import ( "strings" "testing" - "github.com/gotestyourself/gotestyourself/assert" - is "github.com/gotestyourself/gotestyourself/assert/cmp" + "gotest.tools/assert" + is "gotest.tools/assert/cmp" ) func TestConfigRemoveUnsupported(t *testing.T) { diff --git a/client/config_update_test.go b/client/config_update_test.go index 8b82d42eda9fa..1299f8278ca7c 100644 --- a/client/config_update_test.go +++ b/client/config_update_test.go @@ -10,8 +10,8 @@ import ( "testing" "github.com/docker/docker/api/types/swarm" - "github.com/gotestyourself/gotestyourself/assert" - is "github.com/gotestyourself/gotestyourself/assert/cmp" + "gotest.tools/assert" + is "gotest.tools/assert/cmp" ) func TestConfigUpdateUnsupported(t *testing.T) { diff --git a/client/container_logs_test.go b/client/container_logs_test.go index f4ba0e76b475f..6d6e34e101272 100644 --- a/client/container_logs_test.go +++ b/client/container_logs_test.go @@ -14,8 +14,8 @@ import ( "time" "github.com/docker/docker/api/types" - "github.com/gotestyourself/gotestyourself/assert" - is "github.com/gotestyourself/gotestyourself/assert/cmp" + "gotest.tools/assert" + is "gotest.tools/assert/cmp" ) func TestContainerLogsNotFoundError(t *testing.T) { diff --git a/client/container_prune_test.go b/client/container_prune_test.go index 9efb7b5854771..6a830d01dcacb 100644 --- a/client/container_prune_test.go +++ b/client/container_prune_test.go @@ -12,8 +12,8 @@ import ( "github.com/docker/docker/api/types" "github.com/docker/docker/api/types/filters" - "github.com/gotestyourself/gotestyourself/assert" - is "github.com/gotestyourself/gotestyourself/assert/cmp" + "gotest.tools/assert" + is "gotest.tools/assert/cmp" ) func TestContainersPruneError(t *testing.T) { diff --git a/client/container_remove_test.go b/client/container_remove_test.go index 8a2d01b1882cd..d94d8313041e8 100644 --- a/client/container_remove_test.go +++ b/client/container_remove_test.go @@ -10,8 +10,8 @@ import ( "testing" "github.com/docker/docker/api/types" - "github.com/gotestyourself/gotestyourself/assert" - is "github.com/gotestyourself/gotestyourself/assert/cmp" + "gotest.tools/assert" + is "gotest.tools/assert/cmp" ) func TestContainerRemoveError(t *testing.T) { diff --git a/client/distribution_inspect_test.go b/client/distribution_inspect_test.go index d3c6828df13ae..a23d5f55d59fb 100644 --- a/client/distribution_inspect_test.go +++ b/client/distribution_inspect_test.go @@ -5,9 +5,9 @@ import ( "net/http" "testing" - "github.com/gotestyourself/gotestyourself/assert" - is "github.com/gotestyourself/gotestyourself/assert/cmp" "github.com/pkg/errors" + "gotest.tools/assert" + is "gotest.tools/assert/cmp" ) func TestDistributionInspectUnsupported(t *testing.T) { diff --git a/client/hijack_test.go b/client/hijack_test.go index dea5addb8ccf0..823bf344f53fe 100644 --- a/client/hijack_test.go +++ b/client/hijack_test.go @@ -11,9 +11,9 @@ import ( "github.com/docker/docker/api/server/httputils" "github.com/docker/docker/api/types" - "github.com/gotestyourself/gotestyourself/assert" "github.com/pkg/errors" "golang.org/x/net/context" + "gotest.tools/assert" ) func TestTLSCloseWriter(t *testing.T) { diff --git a/client/image_prune_test.go b/client/image_prune_test.go index 3de3226f83b17..9b0839bb6c12b 100644 --- a/client/image_prune_test.go +++ b/client/image_prune_test.go @@ -12,8 +12,8 @@ import ( "github.com/docker/docker/api/types" "github.com/docker/docker/api/types/filters" - "github.com/gotestyourself/gotestyourself/assert" - is "github.com/gotestyourself/gotestyourself/assert/cmp" + "gotest.tools/assert" + is "gotest.tools/assert/cmp" ) func TestImagesPruneError(t *testing.T) { diff --git a/client/image_remove_test.go b/client/image_remove_test.go index 274d450ac49b2..acc6bc9177602 100644 --- a/client/image_remove_test.go +++ b/client/image_remove_test.go @@ -11,8 +11,8 @@ import ( "testing" "github.com/docker/docker/api/types" - "github.com/gotestyourself/gotestyourself/assert" - is "github.com/gotestyourself/gotestyourself/assert/cmp" + "gotest.tools/assert" + is "gotest.tools/assert/cmp" ) func TestImageRemoveError(t *testing.T) { diff --git a/client/network_inspect_test.go b/client/network_inspect_test.go index 4f4919e3054e3..699bccba675a0 100644 --- a/client/network_inspect_test.go +++ b/client/network_inspect_test.go @@ -12,9 +12,9 @@ import ( "github.com/docker/docker/api/types" "github.com/docker/docker/api/types/network" - "github.com/gotestyourself/gotestyourself/assert" - is "github.com/gotestyourself/gotestyourself/assert/cmp" "github.com/pkg/errors" + "gotest.tools/assert" + is "gotest.tools/assert/cmp" ) func TestNetworkInspectError(t *testing.T) { diff --git a/client/network_prune_test.go b/client/network_prune_test.go index f67b6ab4d37b9..7a5d340e51953 100644 --- a/client/network_prune_test.go +++ b/client/network_prune_test.go @@ -12,8 +12,8 @@ import ( "github.com/docker/docker/api/types" "github.com/docker/docker/api/types/filters" - "github.com/gotestyourself/gotestyourself/assert" - is "github.com/gotestyourself/gotestyourself/assert/cmp" + "gotest.tools/assert" + is "gotest.tools/assert/cmp" ) func TestNetworksPruneError(t *testing.T) { diff --git a/client/ping_test.go b/client/ping_test.go index a26a136e3e54a..10bbbe811de62 100644 --- a/client/ping_test.go +++ b/client/ping_test.go @@ -8,8 +8,8 @@ import ( "strings" "testing" - "github.com/gotestyourself/gotestyourself/assert" - is "github.com/gotestyourself/gotestyourself/assert/cmp" + "gotest.tools/assert" + is "gotest.tools/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 e45a8651a09a1..fda4d88aa1425 100644 --- a/client/request_test.go +++ b/client/request_test.go @@ -10,7 +10,7 @@ import ( "testing" "github.com/docker/docker/api/types" - "github.com/gotestyourself/gotestyourself/assert" + "gotest.tools/assert" ) // 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 83f99cd09ccc5..419bdbcbc6213 100644 --- a/client/secret_create_test.go +++ b/client/secret_create_test.go @@ -12,8 +12,8 @@ import ( "github.com/docker/docker/api/types" "github.com/docker/docker/api/types/swarm" - "github.com/gotestyourself/gotestyourself/assert" - is "github.com/gotestyourself/gotestyourself/assert/cmp" + "gotest.tools/assert" + is "gotest.tools/assert/cmp" ) func TestSecretCreateUnsupported(t *testing.T) { diff --git a/client/secret_inspect_test.go b/client/secret_inspect_test.go index 75782324a29b0..6c84799b1767a 100644 --- a/client/secret_inspect_test.go +++ b/client/secret_inspect_test.go @@ -11,9 +11,9 @@ import ( "testing" "github.com/docker/docker/api/types/swarm" - "github.com/gotestyourself/gotestyourself/assert" - is "github.com/gotestyourself/gotestyourself/assert/cmp" "github.com/pkg/errors" + "gotest.tools/assert" + is "gotest.tools/assert/cmp" ) func TestSecretInspectUnsupported(t *testing.T) { diff --git a/client/secret_list_test.go b/client/secret_list_test.go index 4fc3235f3d9ec..72323b055faa0 100644 --- a/client/secret_list_test.go +++ b/client/secret_list_test.go @@ -13,8 +13,8 @@ import ( "github.com/docker/docker/api/types" "github.com/docker/docker/api/types/filters" "github.com/docker/docker/api/types/swarm" - "github.com/gotestyourself/gotestyourself/assert" - is "github.com/gotestyourself/gotestyourself/assert/cmp" + "gotest.tools/assert" + is "gotest.tools/assert/cmp" ) func TestSecretListUnsupported(t *testing.T) { diff --git a/client/secret_remove_test.go b/client/secret_remove_test.go index 03e0316cab28e..bdfccf6be86d6 100644 --- a/client/secret_remove_test.go +++ b/client/secret_remove_test.go @@ -9,8 +9,8 @@ import ( "strings" "testing" - "github.com/gotestyourself/gotestyourself/assert" - is "github.com/gotestyourself/gotestyourself/assert/cmp" + "gotest.tools/assert" + is "gotest.tools/assert/cmp" ) func TestSecretRemoveUnsupported(t *testing.T) { diff --git a/client/secret_update_test.go b/client/secret_update_test.go index d0ce89cda2c82..c7670b440c37b 100644 --- a/client/secret_update_test.go +++ b/client/secret_update_test.go @@ -10,8 +10,8 @@ import ( "testing" "github.com/docker/docker/api/types/swarm" - "github.com/gotestyourself/gotestyourself/assert" - is "github.com/gotestyourself/gotestyourself/assert/cmp" + "gotest.tools/assert" + is "gotest.tools/assert/cmp" ) func TestSecretUpdateUnsupported(t *testing.T) { diff --git a/client/service_create_test.go b/client/service_create_test.go index 1ef2f422cd734..9f51c18223b8a 100644 --- a/client/service_create_test.go +++ b/client/service_create_test.go @@ -13,10 +13,10 @@ import ( "github.com/docker/docker/api/types" registrytypes "github.com/docker/docker/api/types/registry" "github.com/docker/docker/api/types/swarm" - "github.com/gotestyourself/gotestyourself/assert" - is "github.com/gotestyourself/gotestyourself/assert/cmp" "github.com/opencontainers/go-digest" "github.com/opencontainers/image-spec/specs-go/v1" + "gotest.tools/assert" + is "gotest.tools/assert/cmp" ) func TestServiceCreateError(t *testing.T) { diff --git a/client/service_logs_test.go b/client/service_logs_test.go index c3d624e212450..28f3ab5c6b669 100644 --- a/client/service_logs_test.go +++ b/client/service_logs_test.go @@ -14,8 +14,8 @@ import ( "time" "github.com/docker/docker/api/types" - "github.com/gotestyourself/gotestyourself/assert" - is "github.com/gotestyourself/gotestyourself/assert/cmp" + "gotest.tools/assert" + is "gotest.tools/assert/cmp" ) func TestServiceLogsError(t *testing.T) { diff --git a/client/service_remove_test.go b/client/service_remove_test.go index 45892ceb2f28b..d2379a1366392 100644 --- a/client/service_remove_test.go +++ b/client/service_remove_test.go @@ -9,8 +9,8 @@ import ( "strings" "testing" - "github.com/gotestyourself/gotestyourself/assert" - is "github.com/gotestyourself/gotestyourself/assert/cmp" + "gotest.tools/assert" + is "gotest.tools/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 be822cb8aa94a..a1e460c1dc51d 100644 --- a/client/swarm_get_unlock_key_test.go +++ b/client/swarm_get_unlock_key_test.go @@ -11,8 +11,8 @@ import ( "testing" "github.com/docker/docker/api/types" - "github.com/gotestyourself/gotestyourself/assert" - is "github.com/gotestyourself/gotestyourself/assert/cmp" + "gotest.tools/assert" + is "gotest.tools/assert/cmp" ) func TestSwarmGetUnlockKeyError(t *testing.T) { diff --git a/client/volume_inspect_test.go b/client/volume_inspect_test.go index d0a3246689cce..04f00129b7142 100644 --- a/client/volume_inspect_test.go +++ b/client/volume_inspect_test.go @@ -11,9 +11,9 @@ import ( "testing" "github.com/docker/docker/api/types" - "github.com/gotestyourself/gotestyourself/assert" - is "github.com/gotestyourself/gotestyourself/assert/cmp" "github.com/pkg/errors" + "gotest.tools/assert" + is "gotest.tools/assert/cmp" ) func TestVolumeInspectError(t *testing.T) { diff --git a/cmd/dockerd/config_unix_test.go b/cmd/dockerd/config_unix_test.go index eaa53d8f6fec8..d7dbf4b4cc5d7 100644 --- a/cmd/dockerd/config_unix_test.go +++ b/cmd/dockerd/config_unix_test.go @@ -6,9 +6,9 @@ import ( "testing" "github.com/docker/docker/daemon/config" - "github.com/gotestyourself/gotestyourself/assert" - is "github.com/gotestyourself/gotestyourself/assert/cmp" "github.com/spf13/pflag" + "gotest.tools/assert" + is "gotest.tools/assert/cmp" ) func TestDaemonParseShmSize(t *testing.T) { diff --git a/cmd/dockerd/daemon_test.go b/cmd/dockerd/daemon_test.go index 539b442cbd7dc..ad447e3b90b5d 100644 --- a/cmd/dockerd/daemon_test.go +++ b/cmd/dockerd/daemon_test.go @@ -4,11 +4,11 @@ import ( "testing" "github.com/docker/docker/daemon/config" - "github.com/gotestyourself/gotestyourself/assert" - is "github.com/gotestyourself/gotestyourself/assert/cmp" - "github.com/gotestyourself/gotestyourself/fs" "github.com/sirupsen/logrus" "github.com/spf13/pflag" + "gotest.tools/assert" + is "gotest.tools/assert/cmp" + "gotest.tools/fs" ) func defaultOptions(configFile string) *daemonOptions { diff --git a/cmd/dockerd/daemon_unix_test.go b/cmd/dockerd/daemon_unix_test.go index 39ff1e682269a..692d0328c4167 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" - "github.com/gotestyourself/gotestyourself/assert" - is "github.com/gotestyourself/gotestyourself/assert/cmp" - "github.com/gotestyourself/gotestyourself/fs" + "gotest.tools/assert" + is "gotest.tools/assert/cmp" + "gotest.tools/fs" ) func TestLoadDaemonCliConfigWithDaemonFlags(t *testing.T) { diff --git a/cmd/dockerd/options_test.go b/cmd/dockerd/options_test.go index 2a4e63b6b624f..691118f08fbe1 100644 --- a/cmd/dockerd/options_test.go +++ b/cmd/dockerd/options_test.go @@ -6,9 +6,9 @@ import ( cliconfig "github.com/docker/docker/cli/config" "github.com/docker/docker/daemon/config" - "github.com/gotestyourself/gotestyourself/assert" - is "github.com/gotestyourself/gotestyourself/assert/cmp" "github.com/spf13/pflag" + "gotest.tools/assert" + is "gotest.tools/assert/cmp" ) func TestCommonOptionsInstallFlags(t *testing.T) { diff --git a/container/container_unit_test.go b/container/container_unit_test.go index fbee6e5eb0567..82b5864760fca 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" - "github.com/gotestyourself/gotestyourself/assert" + "gotest.tools/assert" ) func TestContainerStopSignal(t *testing.T) { diff --git a/container/view_test.go b/container/view_test.go index a872dffea617e..434b7c618d53b 100644 --- a/container/view_test.go +++ b/container/view_test.go @@ -8,9 +8,9 @@ import ( "github.com/docker/docker/api/types" containertypes "github.com/docker/docker/api/types/container" - "github.com/gotestyourself/gotestyourself/assert" - is "github.com/gotestyourself/gotestyourself/assert/cmp" "github.com/pborman/uuid" + "gotest.tools/assert" + is "gotest.tools/assert/cmp" ) var root string diff --git a/daemon/cluster/convert/service_test.go b/daemon/cluster/convert/service_test.go index 826cf6fbefe00..ad5f0d4494246 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" - "github.com/gotestyourself/gotestyourself/assert" + "gotest.tools/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 f9e8c8a92e5b6..1bf6f6cf02648 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" - "github.com/gotestyourself/gotestyourself/assert" + "gotest.tools/assert" ) func TestIsolationConversion(t *testing.T) { diff --git a/daemon/config/config_test.go b/daemon/config/config_test.go index cb7aa740710e1..6998ed3312342 100644 --- a/daemon/config/config_test.go +++ b/daemon/config/config_test.go @@ -8,11 +8,11 @@ import ( "github.com/docker/docker/daemon/discovery" "github.com/docker/docker/opts" - "github.com/gotestyourself/gotestyourself/assert" - is "github.com/gotestyourself/gotestyourself/assert/cmp" - "github.com/gotestyourself/gotestyourself/fs" - "github.com/gotestyourself/gotestyourself/skip" "github.com/spf13/pflag" + "gotest.tools/assert" + is "gotest.tools/assert/cmp" + "gotest.tools/fs" + "gotest.tools/skip" ) func TestDaemonConfigurationNotFound(t *testing.T) { @@ -461,7 +461,7 @@ func TestReloadSetConfigFileNotExist(t *testing.T) { // TestReloadDefaultConfigNotExist tests that if the default configuration file // doesn't exist the daemon still will be reloaded. func TestReloadDefaultConfigNotExist(t *testing.T) { - skip.IfCondition(t, os.Getuid() != 0, "skipping test that requires root") + skip.If(t, os.Getuid() != 0, "skipping test that requires root") reloaded := false configFile := "/etc/docker/daemon.json" flags := pflag.NewFlagSet("test", pflag.ContinueOnError) diff --git a/daemon/config/config_unix_test.go b/daemon/config/config_unix_test.go index d9bb9476ac73a..529b6777050e7 100644 --- a/daemon/config/config_unix_test.go +++ b/daemon/config/config_unix_test.go @@ -7,10 +7,10 @@ import ( "github.com/docker/docker/opts" "github.com/docker/go-units" - "github.com/gotestyourself/gotestyourself/assert" - is "github.com/gotestyourself/gotestyourself/assert/cmp" - "github.com/gotestyourself/gotestyourself/fs" "github.com/spf13/pflag" + "gotest.tools/assert" + is "gotest.tools/assert/cmp" + "gotest.tools/fs" ) func TestGetConflictFreeConfiguration(t *testing.T) { diff --git a/daemon/config/config_windows_test.go b/daemon/config/config_windows_test.go index fff98014f9823..09417ee388307 100644 --- a/daemon/config/config_windows_test.go +++ b/daemon/config/config_windows_test.go @@ -7,9 +7,9 @@ import ( "testing" "github.com/docker/docker/opts" - "github.com/gotestyourself/gotestyourself/assert" - is "github.com/gotestyourself/gotestyourself/assert/cmp" "github.com/spf13/pflag" + "gotest.tools/assert" + is "gotest.tools/assert/cmp" ) func TestDaemonConfigurationMerge(t *testing.T) { diff --git a/daemon/container_unix_test.go b/daemon/container_unix_test.go index 12075f8b8df05..b4c5f84c7e794 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" - "github.com/gotestyourself/gotestyourself/assert" + "gotest.tools/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 7ef49d7623360..3dba847d46b3d 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" - "github.com/gotestyourself/gotestyourself/assert" + "gotest.tools/assert" ) // Test case for 35752 diff --git a/daemon/daemon_linux_test.go b/daemon/daemon_linux_test.go index 1635b08535fad..767925e2fb2b0 100644 --- a/daemon/daemon_linux_test.go +++ b/daemon/daemon_linux_test.go @@ -15,8 +15,8 @@ import ( "github.com/docker/docker/oci" "github.com/docker/docker/pkg/idtools" "github.com/docker/docker/pkg/mount" - "github.com/gotestyourself/gotestyourself/assert" - is "github.com/gotestyourself/gotestyourself/assert/cmp" + "gotest.tools/assert" + is "gotest.tools/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 4e068194f0692..43f4f504b6f98 100644 --- a/daemon/daemon_test.go +++ b/daemon/daemon_test.go @@ -16,9 +16,9 @@ import ( volumesservice "github.com/docker/docker/volume/service" "github.com/docker/go-connections/nat" "github.com/docker/libnetwork" - "github.com/gotestyourself/gotestyourself/assert" - is "github.com/gotestyourself/gotestyourself/assert/cmp" "github.com/pkg/errors" + "gotest.tools/assert" + is "gotest.tools/assert/cmp" ) // diff --git a/daemon/delete_test.go b/daemon/delete_test.go index 4af206d9c6591..d600917b0c188 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" - "github.com/gotestyourself/gotestyourself/assert" - is "github.com/gotestyourself/gotestyourself/assert/cmp" + "gotest.tools/assert" + is "gotest.tools/assert/cmp" ) func newDaemonWithTmpRoot(t *testing.T) (*Daemon, func()) { diff --git a/daemon/discovery/discovery_test.go b/daemon/discovery/discovery_test.go index d00e02e10b2cd..c354a2918d646 100644 --- a/daemon/discovery/discovery_test.go +++ b/daemon/discovery/discovery_test.go @@ -5,8 +5,8 @@ import ( "testing" "time" - "github.com/gotestyourself/gotestyourself/assert" - is "github.com/gotestyourself/gotestyourself/assert/cmp" + "gotest.tools/assert" + is "gotest.tools/assert/cmp" ) func TestDiscoveryOptsErrors(t *testing.T) { diff --git a/daemon/exec_linux_test.go b/daemon/exec_linux_test.go index 9e5496ae4b6e3..0db7f080db106 100644 --- a/daemon/exec_linux_test.go +++ b/daemon/exec_linux_test.go @@ -8,9 +8,9 @@ import ( containertypes "github.com/docker/docker/api/types/container" "github.com/docker/docker/container" "github.com/docker/docker/daemon/exec" - "github.com/gotestyourself/gotestyourself/assert" "github.com/opencontainers/runc/libcontainer/apparmor" "github.com/opencontainers/runtime-spec/specs-go" + "gotest.tools/assert" ) func TestExecSetPlatformOpt(t *testing.T) { diff --git a/daemon/graphdriver/aufs/aufs_test.go b/daemon/graphdriver/aufs/aufs_test.go index 2338ad320d72e..fdc502ba65341 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" - "github.com/gotestyourself/gotestyourself/assert" - is "github.com/gotestyourself/gotestyourself/assert/cmp" + "gotest.tools/assert" + is "gotest.tools/assert/cmp" ) var ( diff --git a/daemon/graphdriver/copy/copy_test.go b/daemon/graphdriver/copy/copy_test.go index b41348827d694..0f3b1670f741a 100644 --- a/daemon/graphdriver/copy/copy_test.go +++ b/daemon/graphdriver/copy/copy_test.go @@ -13,9 +13,9 @@ import ( "time" "github.com/docker/docker/pkg/system" - "github.com/gotestyourself/gotestyourself/assert" - is "github.com/gotestyourself/gotestyourself/assert/cmp" "golang.org/x/sys/unix" + "gotest.tools/assert" + is "gotest.tools/assert/cmp" ) func TestCopy(t *testing.T) { diff --git a/daemon/graphdriver/driver_test.go b/daemon/graphdriver/driver_test.go index 4a29465f15285..e6f973c397e87 100644 --- a/daemon/graphdriver/driver_test.go +++ b/daemon/graphdriver/driver_test.go @@ -6,7 +6,7 @@ import ( "path/filepath" "testing" - "github.com/gotestyourself/gotestyourself/assert" + "gotest.tools/assert" ) func TestIsEmptyDir(t *testing.T) { diff --git a/daemon/graphdriver/graphtest/graphbench_unix.go b/daemon/graphdriver/graphtest/graphbench_unix.go index 1b221dabeffa5..22de8d17813ad 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" - "github.com/gotestyourself/gotestyourself/assert" + "gotest.tools/assert" ) // DriverBenchExists benchmarks calls to exist diff --git a/daemon/graphdriver/graphtest/graphtest_unix.go b/daemon/graphdriver/graphtest/graphtest_unix.go index 5ac3979752a1a..e83d0bb2ad77e 100644 --- a/daemon/graphdriver/graphtest/graphtest_unix.go +++ b/daemon/graphdriver/graphtest/graphtest_unix.go @@ -16,9 +16,9 @@ import ( "github.com/docker/docker/daemon/graphdriver/quota" "github.com/docker/docker/pkg/stringid" "github.com/docker/go-units" - "github.com/gotestyourself/gotestyourself/assert" - is "github.com/gotestyourself/gotestyourself/assert/cmp" "golang.org/x/sys/unix" + "gotest.tools/assert" + is "gotest.tools/assert/cmp" ) var ( diff --git a/daemon/graphdriver/graphtest/testutil_unix.go b/daemon/graphdriver/graphtest/testutil_unix.go index 3103df150d204..6871dca09a690 100644 --- a/daemon/graphdriver/graphtest/testutil_unix.go +++ b/daemon/graphdriver/graphtest/testutil_unix.go @@ -9,9 +9,9 @@ import ( contdriver "github.com/containerd/continuity/driver" "github.com/docker/docker/daemon/graphdriver" - "github.com/gotestyourself/gotestyourself/assert" - is "github.com/gotestyourself/gotestyourself/assert/cmp" "golang.org/x/sys/unix" + "gotest.tools/assert" + is "gotest.tools/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 2f1bf593debcf..aa164cc4198a1 100644 --- a/daemon/graphdriver/quota/projectquota_test.go +++ b/daemon/graphdriver/quota/projectquota_test.go @@ -10,10 +10,10 @@ import ( "path/filepath" "testing" - "github.com/gotestyourself/gotestyourself/assert" - is "github.com/gotestyourself/gotestyourself/assert/cmp" - "github.com/gotestyourself/gotestyourself/fs" "golang.org/x/sys/unix" + "gotest.tools/assert" + is "gotest.tools/assert/cmp" + "gotest.tools/fs" ) // 10MB diff --git a/daemon/info_unix_test.go b/daemon/info_unix_test.go index 7ff1009326513..a5a4e06f98451 100644 --- a/daemon/info_unix_test.go +++ b/daemon/info_unix_test.go @@ -7,8 +7,8 @@ import ( "github.com/docker/docker/api/types" "github.com/docker/docker/dockerversion" - "github.com/gotestyourself/gotestyourself/assert" - is "github.com/gotestyourself/gotestyourself/assert/cmp" + "gotest.tools/assert" + is "gotest.tools/assert/cmp" ) func TestParseInitVersion(t *testing.T) { diff --git a/daemon/inspect_test.go b/daemon/inspect_test.go index d1ad5b0e0a45c..f402a7af99b6e 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" - "github.com/gotestyourself/gotestyourself/assert" - is "github.com/gotestyourself/gotestyourself/assert/cmp" + "gotest.tools/assert" + is "gotest.tools/assert/cmp" ) func TestGetInspectData(t *testing.T) { diff --git a/daemon/list_test.go b/daemon/list_test.go index d35eac3cd6970..3be510d13d940 100644 --- a/daemon/list_test.go +++ b/daemon/list_test.go @@ -6,8 +6,8 @@ import ( "github.com/docker/docker/api/types" "github.com/docker/docker/api/types/filters" "github.com/docker/docker/container" - "github.com/gotestyourself/gotestyourself/assert" - is "github.com/gotestyourself/gotestyourself/assert/cmp" + "gotest.tools/assert" + is "gotest.tools/assert/cmp" ) func TestListInvalidFilter(t *testing.T) { diff --git a/daemon/logger/adapter_test.go b/daemon/logger/adapter_test.go index e9143928b4a11..f47e711c892ea 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" - "github.com/gotestyourself/gotestyourself/assert" - is "github.com/gotestyourself/gotestyourself/assert/cmp" + "gotest.tools/assert" + is "gotest.tools/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 b8e49055e8332..6955d910c3d5b 100644 --- a/daemon/logger/awslogs/cloudwatchlogs_test.go +++ b/daemon/logger/awslogs/cloudwatchlogs_test.go @@ -21,8 +21,8 @@ import ( "github.com/docker/docker/daemon/logger" "github.com/docker/docker/daemon/logger/loggerutils" "github.com/docker/docker/dockerversion" - "github.com/gotestyourself/gotestyourself/assert" - is "github.com/gotestyourself/gotestyourself/assert/cmp" + "gotest.tools/assert" + is "gotest.tools/assert/cmp" ) const ( diff --git a/daemon/logger/jsonfilelog/jsonfilelog_test.go b/daemon/logger/jsonfilelog/jsonfilelog_test.go index 2becd694b0d2f..22bbcf2eb7a16 100644 --- a/daemon/logger/jsonfilelog/jsonfilelog_test.go +++ b/daemon/logger/jsonfilelog/jsonfilelog_test.go @@ -14,9 +14,9 @@ import ( "github.com/docker/docker/daemon/logger" "github.com/docker/docker/daemon/logger/jsonfilelog/jsonlog" - "github.com/gotestyourself/gotestyourself/assert" - is "github.com/gotestyourself/gotestyourself/assert/cmp" - "github.com/gotestyourself/gotestyourself/fs" + "gotest.tools/assert" + is "gotest.tools/assert/cmp" + "gotest.tools/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 b3bfe6b18c853..d268db4df0c97 100644 --- a/daemon/logger/jsonfilelog/jsonlog/jsonlogbytes_test.go +++ b/daemon/logger/jsonfilelog/jsonlog/jsonlogbytes_test.go @@ -8,7 +8,7 @@ import ( "testing" "time" - "github.com/gotestyourself/gotestyourself/assert" + "gotest.tools/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 3cfdcc33db9bd..b3959b0467a50 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" - "github.com/gotestyourself/gotestyourself/assert" - is "github.com/gotestyourself/gotestyourself/assert/cmp" + "gotest.tools/assert" + is "gotest.tools/assert/cmp" ) func TestFastTimeMarshalJSONWithInvalidYear(t *testing.T) { diff --git a/daemon/logger/jsonfilelog/read_test.go b/daemon/logger/jsonfilelog/read_test.go index f89fabfe1c682..cad8003e5efd3 100644 --- a/daemon/logger/jsonfilelog/read_test.go +++ b/daemon/logger/jsonfilelog/read_test.go @@ -6,8 +6,8 @@ import ( "time" "github.com/docker/docker/daemon/logger" - "github.com/gotestyourself/gotestyourself/assert" - "github.com/gotestyourself/gotestyourself/fs" + "gotest.tools/assert" + "gotest.tools/fs" ) func BenchmarkJSONFileLoggerReadLogs(b *testing.B) { diff --git a/daemon/logger/splunk/splunk_test.go b/daemon/logger/splunk/splunk_test.go index 62895a6dd68cf..cfb83e80d1c55 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" - "github.com/gotestyourself/gotestyourself/assert" - "github.com/gotestyourself/gotestyourself/env" + "gotest.tools/assert" + "gotest.tools/env" ) // Validate options diff --git a/daemon/logger/templates/templates_test.go b/daemon/logger/templates/templates_test.go index b767037477a09..25e7c88750781 100644 --- a/daemon/logger/templates/templates_test.go +++ b/daemon/logger/templates/templates_test.go @@ -4,8 +4,8 @@ import ( "bytes" "testing" - "github.com/gotestyourself/gotestyourself/assert" - is "github.com/gotestyourself/gotestyourself/assert/cmp" + "gotest.tools/assert" + is "gotest.tools/assert/cmp" ) func TestNewParse(t *testing.T) { diff --git a/daemon/oci_linux_test.go b/daemon/oci_linux_test.go index e28fac004efdf..e618951ef95ea 100644 --- a/daemon/oci_linux_test.go +++ b/daemon/oci_linux_test.go @@ -9,8 +9,8 @@ import ( "github.com/docker/docker/daemon/config" "github.com/docker/docker/oci" "github.com/docker/docker/pkg/idtools" - "github.com/gotestyourself/gotestyourself/assert" - is "github.com/gotestyourself/gotestyourself/assert/cmp" + "gotest.tools/assert" + is "gotest.tools/assert/cmp" ) // TestTmpfsDevShmNoDupMount checks that a user-specified /dev/shm tmpfs diff --git a/daemon/reload_test.go b/daemon/reload_test.go index c4d15d93e5569..ffad297f71b74 100644 --- a/daemon/reload_test.go +++ b/daemon/reload_test.go @@ -13,8 +13,8 @@ import ( _ "github.com/docker/docker/pkg/discovery/memory" "github.com/docker/docker/registry" "github.com/docker/libnetwork" - "github.com/gotestyourself/gotestyourself/assert" - is "github.com/gotestyourself/gotestyourself/assert/cmp" + "gotest.tools/assert" + is "gotest.tools/assert/cmp" ) func TestDaemonReloadLabels(t *testing.T) { diff --git a/daemon/resize_test.go b/daemon/resize_test.go index dea26c6116426..edfe9d3ed1771 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" - "github.com/gotestyourself/gotestyourself/assert" + "gotest.tools/assert" ) // This test simply verify that when a wrong ID used, a specific error should be returned for exec resize. diff --git a/daemon/trustkey_test.go b/daemon/trustkey_test.go index e13129e46743f..e49e76aa3eeec 100644 --- a/daemon/trustkey_test.go +++ b/daemon/trustkey_test.go @@ -6,9 +6,9 @@ import ( "path/filepath" "testing" - "github.com/gotestyourself/gotestyourself/assert" - is "github.com/gotestyourself/gotestyourself/assert/cmp" - "github.com/gotestyourself/gotestyourself/fs" + "gotest.tools/assert" + is "gotest.tools/assert/cmp" + "gotest.tools/fs" ) // LoadOrCreateTrustKey diff --git a/distribution/metadata/v1_id_service_test.go b/distribution/metadata/v1_id_service_test.go index 7bac8e821230c..5003897cbb92d 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" - "github.com/gotestyourself/gotestyourself/assert" + "gotest.tools/assert" ) func TestV1IDService(t *testing.T) { diff --git a/distribution/pull_v2_test.go b/distribution/pull_v2_test.go index 1079b5fe53843..ca3470c8cfe8d 100644 --- a/distribution/pull_v2_test.go +++ b/distribution/pull_v2_test.go @@ -10,9 +10,9 @@ import ( "github.com/docker/distribution/manifest/schema1" "github.com/docker/distribution/reference" - "github.com/gotestyourself/gotestyourself/assert" - is "github.com/gotestyourself/gotestyourself/assert/cmp" "github.com/opencontainers/go-digest" + "gotest.tools/assert" + is "gotest.tools/assert/cmp" ) // TestFixManifestLayers checks that fixManifestLayers removes a duplicate diff --git a/image/fs_test.go b/image/fs_test.go index e8c120a0032cd..6290c2b66e841 100644 --- a/image/fs_test.go +++ b/image/fs_test.go @@ -10,9 +10,9 @@ import ( "path/filepath" "testing" - "github.com/gotestyourself/gotestyourself/assert" - is "github.com/gotestyourself/gotestyourself/assert/cmp" "github.com/opencontainers/go-digest" + "gotest.tools/assert" + is "gotest.tools/assert/cmp" ) func defaultFSStoreBackend(t *testing.T) (StoreBackend, func()) { diff --git a/image/image_test.go b/image/image_test.go index dfb438b4d316f..981be0b68c698 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" - "github.com/gotestyourself/gotestyourself/assert" - is "github.com/gotestyourself/gotestyourself/assert/cmp" + "gotest.tools/assert" + is "gotest.tools/assert/cmp" ) const sampleImageJSON = `{ diff --git a/image/store_test.go b/image/store_test.go index d59cde9195f8d..0edf3282af471 100644 --- a/image/store_test.go +++ b/image/store_test.go @@ -6,9 +6,9 @@ import ( "testing" "github.com/docker/docker/layer" - "github.com/gotestyourself/gotestyourself/assert" - "github.com/gotestyourself/gotestyourself/assert/cmp" "github.com/opencontainers/go-digest" + "gotest.tools/assert" + "gotest.tools/assert/cmp" ) func TestRestore(t *testing.T) { diff --git a/integration-cli/cli/build/build.go b/integration-cli/cli/build/build.go index 71048d0d6ddac..0b10ea79f81e5 100644 --- a/integration-cli/cli/build/build.go +++ b/integration-cli/cli/build/build.go @@ -5,7 +5,7 @@ import ( "strings" "github.com/docker/docker/internal/test/fakecontext" - "github.com/gotestyourself/gotestyourself/icmd" + "gotest.tools/icmd" ) type testingT interface { diff --git a/integration-cli/cli/cli.go b/integration-cli/cli/cli.go index 17f3fd52caf06..bc3f3c194e52e 100644 --- a/integration-cli/cli/cli.go +++ b/integration-cli/cli/cli.go @@ -8,9 +8,9 @@ import ( "github.com/docker/docker/integration-cli/daemon" "github.com/docker/docker/integration-cli/environment" - "github.com/gotestyourself/gotestyourself/assert" - "github.com/gotestyourself/gotestyourself/icmd" "github.com/pkg/errors" + "gotest.tools/assert" + "gotest.tools/icmd" ) var testEnv *environment.Execution diff --git a/integration-cli/daemon/daemon.go b/integration-cli/daemon/daemon.go index fcbbfdfb0ce39..3d1fa38d5dde3 100644 --- a/integration-cli/daemon/daemon.go +++ b/integration-cli/daemon/daemon.go @@ -8,9 +8,9 @@ import ( "github.com/docker/docker/integration-cli/checker" "github.com/docker/docker/internal/test/daemon" "github.com/go-check/check" - "github.com/gotestyourself/gotestyourself/assert" - "github.com/gotestyourself/gotestyourself/icmd" "github.com/pkg/errors" + "gotest.tools/assert" + "gotest.tools/icmd" ) type testingT interface { diff --git a/integration-cli/daemon/daemon_swarm.go b/integration-cli/daemon/daemon_swarm.go index c38f5a69e067b..4a6ce8a5c5142 100644 --- a/integration-cli/daemon/daemon_swarm.go +++ b/integration-cli/daemon/daemon_swarm.go @@ -11,7 +11,7 @@ import ( "github.com/docker/docker/client" "github.com/docker/docker/integration-cli/checker" "github.com/go-check/check" - "github.com/gotestyourself/gotestyourself/assert" + "gotest.tools/assert" ) // CheckServiceTasksInState returns the number of tasks with a matching state, diff --git a/integration-cli/docker_api_build_test.go b/integration-cli/docker_api_build_test.go index 581df8d5c709e..144acbd046e4e 100644 --- a/integration-cli/docker_api_build_test.go +++ b/integration-cli/docker_api_build_test.go @@ -19,8 +19,8 @@ import ( "github.com/docker/docker/internal/test/fakestorage" "github.com/docker/docker/internal/test/request" "github.com/go-check/check" - "github.com/gotestyourself/gotestyourself/assert" - is "github.com/gotestyourself/gotestyourself/assert/cmp" + "gotest.tools/assert" + is "gotest.tools/assert/cmp" ) func (s *DockerSuite) TestBuildAPIDockerFileRemote(c *check.C) { diff --git a/integration-cli/docker_api_build_windows_test.go b/integration-cli/docker_api_build_windows_test.go index 92d3f5e13459f..a605c5be39225 100644 --- a/integration-cli/docker_api_build_windows_test.go +++ b/integration-cli/docker_api_build_windows_test.go @@ -9,8 +9,8 @@ import ( "github.com/docker/docker/internal/test/fakecontext" "github.com/docker/docker/internal/test/request" "github.com/go-check/check" - "github.com/gotestyourself/gotestyourself/assert" - is "github.com/gotestyourself/gotestyourself/assert/cmp" + "gotest.tools/assert" + is "gotest.tools/assert/cmp" ) func (s *DockerSuite) TestBuildWithRecycleBin(c *check.C) { diff --git a/integration-cli/docker_api_containers_test.go b/integration-cli/docker_api_containers_test.go index 31d6077880d13..e8e47bd8b1573 100644 --- a/integration-cli/docker_api_containers_test.go +++ b/integration-cli/docker_api_containers_test.go @@ -33,9 +33,9 @@ import ( "github.com/docker/docker/volume" "github.com/docker/go-connections/nat" "github.com/go-check/check" - "github.com/gotestyourself/gotestyourself/assert" - is "github.com/gotestyourself/gotestyourself/assert/cmp" - "github.com/gotestyourself/gotestyourself/poll" + "gotest.tools/assert" + is "gotest.tools/assert/cmp" + "gotest.tools/poll" ) func (s *DockerSuite) TestContainerAPIGetAll(c *check.C) { diff --git a/integration-cli/docker_api_containers_windows_test.go b/integration-cli/docker_api_containers_windows_test.go index 8b71fc607746b..c569574de5350 100644 --- a/integration-cli/docker_api_containers_windows_test.go +++ b/integration-cli/docker_api_containers_windows_test.go @@ -14,8 +14,8 @@ import ( "github.com/docker/docker/api/types/container" "github.com/docker/docker/api/types/mount" "github.com/go-check/check" - "github.com/gotestyourself/gotestyourself/assert" - is "github.com/gotestyourself/gotestyourself/assert/cmp" + "gotest.tools/assert" + is "gotest.tools/assert/cmp" ) func (s *DockerSuite) TestContainersAPICreateMountsBindNamedPipe(c *check.C) { diff --git a/integration-cli/docker_api_inspect_test.go b/integration-cli/docker_api_inspect_test.go index 5d7aa5590380e..68055b6c145fa 100644 --- a/integration-cli/docker_api_inspect_test.go +++ b/integration-cli/docker_api_inspect_test.go @@ -10,8 +10,8 @@ import ( "github.com/docker/docker/client" "github.com/docker/docker/integration-cli/checker" "github.com/go-check/check" - "github.com/gotestyourself/gotestyourself/assert" - is "github.com/gotestyourself/gotestyourself/assert/cmp" + "gotest.tools/assert" + is "gotest.tools/assert/cmp" ) func (s *DockerSuite) TestInspectAPIContainerResponse(c *check.C) { diff --git a/integration-cli/docker_api_swarm_service_test.go b/integration-cli/docker_api_swarm_service_test.go index 2e27c7e93dfa4..1a826c99c6bd3 100644 --- a/integration-cli/docker_api_swarm_service_test.go +++ b/integration-cli/docker_api_swarm_service_test.go @@ -17,8 +17,8 @@ import ( "github.com/docker/docker/integration-cli/daemon" testdaemon "github.com/docker/docker/internal/test/daemon" "github.com/go-check/check" - "github.com/gotestyourself/gotestyourself/icmd" "golang.org/x/sys/unix" + "gotest.tools/icmd" ) 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 11cdd89215e0c..6a31dd209f01f 100644 --- a/integration-cli/docker_api_swarm_test.go +++ b/integration-cli/docker_api_swarm_test.go @@ -26,8 +26,8 @@ import ( "github.com/docker/docker/internal/test/request" "github.com/docker/swarmkit/ca" "github.com/go-check/check" - "github.com/gotestyourself/gotestyourself/assert" - is "github.com/gotestyourself/gotestyourself/assert/cmp" + "gotest.tools/assert" + is "gotest.tools/assert/cmp" ) var defaultReconciliationTimeout = 30 * time.Second diff --git a/integration-cli/docker_cli_attach_test.go b/integration-cli/docker_cli_attach_test.go index 353cb65e5d177..ef2c708bbe63a 100644 --- a/integration-cli/docker_cli_attach_test.go +++ b/integration-cli/docker_cli_attach_test.go @@ -12,7 +12,7 @@ import ( "github.com/docker/docker/integration-cli/cli" "github.com/go-check/check" - "github.com/gotestyourself/gotestyourself/icmd" + "gotest.tools/icmd" ) const attachWait = 5 * time.Second diff --git a/integration-cli/docker_cli_build_test.go b/integration-cli/docker_cli_build_test.go index a0ac9c767f8a6..1e88b1ba39fd4 100644 --- a/integration-cli/docker_cli_build_test.go +++ b/integration-cli/docker_cli_build_test.go @@ -16,7 +16,6 @@ import ( "text/template" "time" - "github.com/moby/buildkit/frontend/dockerfile/command" "github.com/docker/docker/integration-cli/checker" "github.com/docker/docker/integration-cli/cli" "github.com/docker/docker/integration-cli/cli/build" @@ -26,8 +25,9 @@ import ( "github.com/docker/docker/internal/testutil" "github.com/docker/docker/pkg/archive" "github.com/go-check/check" - "github.com/gotestyourself/gotestyourself/icmd" + "github.com/moby/buildkit/frontend/dockerfile/command" "github.com/opencontainers/go-digest" + "gotest.tools/icmd" ) func (s *DockerSuite) TestBuildJSONEmptyRun(c *check.C) { diff --git a/integration-cli/docker_cli_build_unix_test.go b/integration-cli/docker_cli_build_unix_test.go index 4b313f95c19e9..8cad28f457371 100644 --- a/integration-cli/docker_cli_build_unix_test.go +++ b/integration-cli/docker_cli_build_unix_test.go @@ -21,7 +21,7 @@ import ( "github.com/docker/docker/internal/test/fakecontext" "github.com/docker/go-units" "github.com/go-check/check" - "github.com/gotestyourself/gotestyourself/icmd" + "gotest.tools/icmd" ) func (s *DockerSuite) TestBuildResourceConstraintsAreUsed(c *check.C) { diff --git a/integration-cli/docker_cli_by_digest_test.go b/integration-cli/docker_cli_by_digest_test.go index ac97e0aecc5f3..006cf11e1a634 100644 --- a/integration-cli/docker_cli_by_digest_test.go +++ b/integration-cli/docker_cli_by_digest_test.go @@ -15,9 +15,9 @@ import ( "github.com/docker/docker/integration-cli/cli" "github.com/docker/docker/integration-cli/cli/build" "github.com/go-check/check" - "github.com/gotestyourself/gotestyourself/assert" - is "github.com/gotestyourself/gotestyourself/assert/cmp" "github.com/opencontainers/go-digest" + "gotest.tools/assert" + is "gotest.tools/assert/cmp" ) var ( diff --git a/integration-cli/docker_cli_cp_test.go b/integration-cli/docker_cli_cp_test.go index b33be6b2099f9..ec53712fab116 100644 --- a/integration-cli/docker_cli_cp_test.go +++ b/integration-cli/docker_cli_cp_test.go @@ -12,7 +12,7 @@ import ( "github.com/docker/docker/integration-cli/checker" "github.com/go-check/check" - "github.com/gotestyourself/gotestyourself/icmd" + "gotest.tools/icmd" ) const ( diff --git a/integration-cli/docker_cli_daemon_plugins_test.go b/integration-cli/docker_cli_daemon_plugins_test.go index 2f66bc05e20ef..69e190c30dd5c 100644 --- a/integration-cli/docker_cli_daemon_plugins_test.go +++ b/integration-cli/docker_cli_daemon_plugins_test.go @@ -8,8 +8,8 @@ import ( "github.com/docker/docker/integration-cli/checker" "github.com/docker/docker/pkg/mount" "github.com/go-check/check" - "github.com/gotestyourself/gotestyourself/icmd" "golang.org/x/sys/unix" + "gotest.tools/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 347696e8a4428..d2ff9606e53ce 100644 --- a/integration-cli/docker_cli_daemon_test.go +++ b/integration-cli/docker_cli_daemon_test.go @@ -39,9 +39,9 @@ import ( "github.com/docker/libnetwork/iptables" "github.com/docker/libtrust" "github.com/go-check/check" - "github.com/gotestyourself/gotestyourself/icmd" "github.com/kr/pty" "golang.org/x/sys/unix" + "gotest.tools/icmd" ) // TestLegacyDaemonCommand test starting docker daemon using "deprecated" docker daemon diff --git a/integration-cli/docker_cli_events_test.go b/integration-cli/docker_cli_events_test.go index 28e418ea3b477..db1e34020f58e 100644 --- a/integration-cli/docker_cli_events_test.go +++ b/integration-cli/docker_cli_events_test.go @@ -20,7 +20,7 @@ import ( "github.com/docker/docker/integration-cli/cli" "github.com/docker/docker/integration-cli/cli/build" "github.com/go-check/check" - "github.com/gotestyourself/gotestyourself/icmd" + "gotest.tools/icmd" ) func (s *DockerSuite) TestEventsTimestampFormats(c *check.C) { diff --git a/integration-cli/docker_cli_exec_test.go b/integration-cli/docker_cli_exec_test.go index d0557c56a0a4b..e97fb851402df 100644 --- a/integration-cli/docker_cli_exec_test.go +++ b/integration-cli/docker_cli_exec_test.go @@ -20,7 +20,7 @@ import ( "github.com/docker/docker/integration-cli/cli" "github.com/docker/docker/integration-cli/cli/build" "github.com/go-check/check" - "github.com/gotestyourself/gotestyourself/icmd" + "gotest.tools/icmd" ) func (s *DockerSuite) TestExec(c *check.C) { diff --git a/integration-cli/docker_cli_export_import_test.go b/integration-cli/docker_cli_export_import_test.go index 6405c1bb5e508..d0dac97367665 100644 --- a/integration-cli/docker_cli_export_import_test.go +++ b/integration-cli/docker_cli_export_import_test.go @@ -6,7 +6,7 @@ import ( "github.com/docker/docker/integration-cli/checker" "github.com/go-check/check" - "github.com/gotestyourself/gotestyourself/icmd" + "gotest.tools/icmd" ) // TODO: Move this test to docker/cli, as it is essentially the same test diff --git a/integration-cli/docker_cli_images_test.go b/integration-cli/docker_cli_images_test.go index 2a1152eb5044f..0dd319fbc9ac5 100644 --- a/integration-cli/docker_cli_images_test.go +++ b/integration-cli/docker_cli_images_test.go @@ -14,7 +14,7 @@ import ( "github.com/docker/docker/integration-cli/cli/build" "github.com/docker/docker/pkg/stringid" "github.com/go-check/check" - "github.com/gotestyourself/gotestyourself/icmd" + "gotest.tools/icmd" ) func (s *DockerSuite) TestImagesEnsureImageIsListed(c *check.C) { diff --git a/integration-cli/docker_cli_import_test.go b/integration-cli/docker_cli_import_test.go index eb0fe2cf8cb7b..9f8e9158036c9 100644 --- a/integration-cli/docker_cli_import_test.go +++ b/integration-cli/docker_cli_import_test.go @@ -12,7 +12,7 @@ import ( "github.com/docker/docker/integration-cli/checker" "github.com/docker/docker/integration-cli/cli" "github.com/go-check/check" - "github.com/gotestyourself/gotestyourself/icmd" + "gotest.tools/icmd" ) func (s *DockerSuite) TestImportDisplay(c *check.C) { diff --git a/integration-cli/docker_cli_inspect_test.go b/integration-cli/docker_cli_inspect_test.go index a1130aebf5a7e..d027c447750d1 100644 --- a/integration-cli/docker_cli_inspect_test.go +++ b/integration-cli/docker_cli_inspect_test.go @@ -12,7 +12,7 @@ import ( "github.com/docker/docker/api/types/container" "github.com/docker/docker/integration-cli/checker" "github.com/go-check/check" - "github.com/gotestyourself/gotestyourself/icmd" + "gotest.tools/icmd" ) func checkValidGraphDriver(c *check.C, name string) { diff --git a/integration-cli/docker_cli_logs_test.go b/integration-cli/docker_cli_logs_test.go index fb99b2807d53c..17ee5deaad81c 100644 --- a/integration-cli/docker_cli_logs_test.go +++ b/integration-cli/docker_cli_logs_test.go @@ -12,7 +12,7 @@ import ( "github.com/docker/docker/integration-cli/cli" "github.com/docker/docker/pkg/jsonmessage" "github.com/go-check/check" - "github.com/gotestyourself/gotestyourself/icmd" + "gotest.tools/icmd" ) // This used to work, it test a log of PageSize-1 (gh#4851) diff --git a/integration-cli/docker_cli_network_unix_test.go b/integration-cli/docker_cli_network_unix_test.go index 1087d0045dad0..95f7ccfff07b8 100644 --- a/integration-cli/docker_cli_network_unix_test.go +++ b/integration-cli/docker_cli_network_unix_test.go @@ -27,9 +27,9 @@ import ( remoteipam "github.com/docker/libnetwork/ipams/remote/api" "github.com/docker/libnetwork/netlabel" "github.com/go-check/check" - "github.com/gotestyourself/gotestyourself/icmd" "github.com/vishvananda/netlink" "golang.org/x/sys/unix" + "gotest.tools/icmd" ) const dummyNetworkDriver = "dummy-network-driver" diff --git a/integration-cli/docker_cli_proxy_test.go b/integration-cli/docker_cli_proxy_test.go index bdb4772592925..52159aa9c538e 100644 --- a/integration-cli/docker_cli_proxy_test.go +++ b/integration-cli/docker_cli_proxy_test.go @@ -6,7 +6,7 @@ import ( "github.com/docker/docker/integration-cli/checker" "github.com/go-check/check" - "github.com/gotestyourself/gotestyourself/icmd" + "gotest.tools/icmd" ) func (s *DockerSuite) TestCLIProxyDisableProxyUnixSock(c *check.C) { diff --git a/integration-cli/docker_cli_prune_unix_test.go b/integration-cli/docker_cli_prune_unix_test.go index 259b48676644e..d60420b591481 100644 --- a/integration-cli/docker_cli_prune_unix_test.go +++ b/integration-cli/docker_cli_prune_unix_test.go @@ -15,7 +15,7 @@ import ( "github.com/docker/docker/integration-cli/cli/build" "github.com/docker/docker/integration-cli/daemon" "github.com/go-check/check" - "github.com/gotestyourself/gotestyourself/icmd" + "gotest.tools/icmd" ) func pruneNetworkAndVerify(c *check.C, 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 771c9d70d5d80..a975bc35424af 100644 --- a/integration-cli/docker_cli_ps_test.go +++ b/integration-cli/docker_cli_ps_test.go @@ -13,7 +13,7 @@ import ( "github.com/docker/docker/integration-cli/cli/build" "github.com/docker/docker/pkg/stringid" "github.com/go-check/check" - "github.com/gotestyourself/gotestyourself/icmd" + "gotest.tools/icmd" ) func (s *DockerSuite) TestPsListContainersBase(c *check.C) { diff --git a/integration-cli/docker_cli_pull_local_test.go b/integration-cli/docker_cli_pull_local_test.go index 31afdfb539602..33d4ae5e7c612 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/docker/integration-cli/checker" "github.com/docker/docker/integration-cli/cli/build" "github.com/go-check/check" - "github.com/gotestyourself/gotestyourself/icmd" "github.com/opencontainers/go-digest" + "gotest.tools/icmd" ) // testPullImageWithAliases pulls a specific image tag and verifies that any aliases (i.e., other diff --git a/integration-cli/docker_cli_push_test.go b/integration-cli/docker_cli_push_test.go index 382260a5c75b6..01ad829192b19 100644 --- a/integration-cli/docker_cli_push_test.go +++ b/integration-cli/docker_cli_push_test.go @@ -14,7 +14,7 @@ import ( "github.com/docker/docker/integration-cli/checker" "github.com/docker/docker/integration-cli/cli/build" "github.com/go-check/check" - "github.com/gotestyourself/gotestyourself/icmd" + "gotest.tools/icmd" ) // Pushing an image to a private registry. diff --git a/integration-cli/docker_cli_rmi_test.go b/integration-cli/docker_cli_rmi_test.go index aedfa13a814e9..662285682327d 100644 --- a/integration-cli/docker_cli_rmi_test.go +++ b/integration-cli/docker_cli_rmi_test.go @@ -10,7 +10,7 @@ import ( "github.com/docker/docker/integration-cli/cli/build" "github.com/docker/docker/pkg/stringid" "github.com/go-check/check" - "github.com/gotestyourself/gotestyourself/icmd" + "gotest.tools/icmd" ) func (s *DockerSuite) TestRmiWithContainerFails(c *check.C) { diff --git a/integration-cli/docker_cli_run_test.go b/integration-cli/docker_cli_run_test.go index 7e0efdc08f64a..aaaa7174d3bfb 100644 --- a/integration-cli/docker_cli_run_test.go +++ b/integration-cli/docker_cli_run_test.go @@ -36,7 +36,7 @@ import ( "github.com/docker/libnetwork/resolvconf" "github.com/docker/libnetwork/types" "github.com/go-check/check" - "github.com/gotestyourself/gotestyourself/icmd" + "gotest.tools/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 70acbb37f3db7..3444d22bfd953 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/parsers" "github.com/docker/docker/pkg/sysinfo" "github.com/go-check/check" - "github.com/gotestyourself/gotestyourself/icmd" "github.com/kr/pty" + "gotest.tools/icmd" ) // #6509 diff --git a/integration-cli/docker_cli_save_load_test.go b/integration-cli/docker_cli_save_load_test.go index d370b6cc5ef0b..688eac684ea83 100644 --- a/integration-cli/docker_cli_save_load_test.go +++ b/integration-cli/docker_cli_save_load_test.go @@ -18,8 +18,8 @@ import ( "github.com/docker/docker/integration-cli/checker" "github.com/docker/docker/integration-cli/cli/build" "github.com/go-check/check" - "github.com/gotestyourself/gotestyourself/icmd" "github.com/opencontainers/go-digest" + "gotest.tools/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 fcbfd7e62752f..da520e41c0cb6 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/docker/docker/integration-cli/checker" "github.com/docker/docker/integration-cli/cli/build" "github.com/go-check/check" - "github.com/gotestyourself/gotestyourself/icmd" "github.com/kr/pty" + "gotest.tools/icmd" ) // save a repo and try to load it using stdout diff --git a/integration-cli/docker_cli_service_health_test.go b/integration-cli/docker_cli_service_health_test.go index ac525d08ea849..ae9e7868bb2cd 100644 --- a/integration-cli/docker_cli_service_health_test.go +++ b/integration-cli/docker_cli_service_health_test.go @@ -12,7 +12,7 @@ import ( "github.com/docker/docker/integration-cli/cli" "github.com/docker/docker/integration-cli/cli/build" "github.com/go-check/check" - "github.com/gotestyourself/gotestyourself/icmd" + "gotest.tools/icmd" ) // 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 c26a7455a51a2..ba337491b1440 100644 --- a/integration-cli/docker_cli_service_logs_test.go +++ b/integration-cli/docker_cli_service_logs_test.go @@ -13,7 +13,7 @@ import ( "github.com/docker/docker/integration-cli/checker" "github.com/docker/docker/integration-cli/daemon" "github.com/go-check/check" - "github.com/gotestyourself/gotestyourself/icmd" + "gotest.tools/icmd" ) type logMessage struct { diff --git a/integration-cli/docker_cli_start_test.go b/integration-cli/docker_cli_start_test.go index 98f7beaea90e3..cbe917bf4f805 100644 --- a/integration-cli/docker_cli_start_test.go +++ b/integration-cli/docker_cli_start_test.go @@ -8,7 +8,7 @@ import ( "github.com/docker/docker/integration-cli/checker" "github.com/docker/docker/integration-cli/cli" "github.com/go-check/check" - "github.com/gotestyourself/gotestyourself/icmd" + "gotest.tools/icmd" ) // Regression test for https://github.com/docker/docker/issues/7843 diff --git a/integration-cli/docker_cli_swarm_test.go b/integration-cli/docker_cli_swarm_test.go index 94013d82b39f5..057c0d94c88dc 100644 --- a/integration-cli/docker_cli_swarm_test.go +++ b/integration-cli/docker_cli_swarm_test.go @@ -27,9 +27,9 @@ import ( remoteipam "github.com/docker/libnetwork/ipams/remote/api" "github.com/docker/swarmkit/ca/keyutils" "github.com/go-check/check" - "github.com/gotestyourself/gotestyourself/fs" - "github.com/gotestyourself/gotestyourself/icmd" "github.com/vishvananda/netlink" + "gotest.tools/fs" + "gotest.tools/icmd" ) func (s *DockerSwarmSuite) TestSwarmUpdate(c *check.C) { diff --git a/integration-cli/docker_cli_top_test.go b/integration-cli/docker_cli_top_test.go index b8924d3b50623..50744b0111187 100644 --- a/integration-cli/docker_cli_top_test.go +++ b/integration-cli/docker_cli_top_test.go @@ -5,7 +5,7 @@ import ( "github.com/docker/docker/integration-cli/checker" "github.com/go-check/check" - "github.com/gotestyourself/gotestyourself/icmd" + "gotest.tools/icmd" ) func (s *DockerSuite) TestTopMultipleArgs(c *check.C) { diff --git a/integration-cli/docker_cli_volume_test.go b/integration-cli/docker_cli_volume_test.go index ad1e96577c2b5..340bdfe254370 100644 --- a/integration-cli/docker_cli_volume_test.go +++ b/integration-cli/docker_cli_volume_test.go @@ -16,7 +16,7 @@ import ( "github.com/docker/docker/integration-cli/checker" "github.com/docker/docker/integration-cli/cli/build" "github.com/go-check/check" - "github.com/gotestyourself/gotestyourself/icmd" + "gotest.tools/icmd" ) func (s *DockerSuite) TestVolumeCLICreate(c *check.C) { diff --git a/integration-cli/docker_cli_wait_test.go b/integration-cli/docker_cli_wait_test.go index e8047042d002e..669e54f1ae095 100644 --- a/integration-cli/docker_cli_wait_test.go +++ b/integration-cli/docker_cli_wait_test.go @@ -8,7 +8,7 @@ import ( "github.com/docker/docker/integration-cli/checker" "github.com/go-check/check" - "github.com/gotestyourself/gotestyourself/icmd" + "gotest.tools/icmd" ) // non-blocking wait with 0 exit code diff --git a/integration-cli/docker_utils_test.go b/integration-cli/docker_utils_test.go index 19fdcff19a134..1c05bf5d04ac4 100644 --- a/integration-cli/docker_utils_test.go +++ b/integration-cli/docker_utils_test.go @@ -21,7 +21,7 @@ import ( "github.com/docker/docker/integration-cli/daemon" "github.com/docker/docker/internal/test/request" "github.com/go-check/check" - "github.com/gotestyourself/gotestyourself/icmd" + "gotest.tools/icmd" ) // Deprecated diff --git a/integration-cli/requirements_test.go b/integration-cli/requirements_test.go index e6038edb186cd..28be59cd2ca8b 100644 --- a/integration-cli/requirements_test.go +++ b/integration-cli/requirements_test.go @@ -60,7 +60,7 @@ func OnlyDefaultNetworks() bool { return true } -// Deprecated: use skip.IfCondition(t, !testEnv.DaemonInfo.ExperimentalBuild) +// Deprecated: use skip.If(t, !testEnv.DaemonInfo.ExperimentalBuild) func ExperimentalDaemon() bool { return testEnv.DaemonInfo.ExperimentalBuild } diff --git a/integration-cli/utils_test.go b/integration-cli/utils_test.go index 33913c3922096..fd083681f266b 100644 --- a/integration-cli/utils_test.go +++ b/integration-cli/utils_test.go @@ -9,8 +9,8 @@ import ( "github.com/docker/docker/internal/testutil" "github.com/go-check/check" - "github.com/gotestyourself/gotestyourself/icmd" "github.com/pkg/errors" + "gotest.tools/icmd" ) func getPrefixAndSlashFromDaemonPlatform() (prefix, slash string) { @@ -21,7 +21,7 @@ func getPrefixAndSlashFromDaemonPlatform() (prefix, slash string) { } // TODO: update code to call cmd.RunCmd directly, and remove this function -// Deprecated: use gotestyourself/gotestyourself/icmd +// Deprecated: use gotest.tools/icmd func runCommandWithOutput(execCmd *exec.Cmd) (string, int, error) { result := icmd.RunCmd(transformCmd(execCmd)) return result.Combined(), result.ExitCode, result.Error diff --git a/integration/build/build_session_test.go b/integration/build/build_session_test.go index c2f93629440f0..dde4b427b4974 100644 --- a/integration/build/build_session_test.go +++ b/integration/build/build_session_test.go @@ -10,12 +10,12 @@ import ( dclient "github.com/docker/docker/client" "github.com/docker/docker/internal/test/fakecontext" "github.com/docker/docker/internal/test/request" - "github.com/gotestyourself/gotestyourself/assert" - is "github.com/gotestyourself/gotestyourself/assert/cmp" - "github.com/gotestyourself/gotestyourself/skip" "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" ) func TestBuildWithSession(t *testing.T) { diff --git a/integration/build/build_squash_test.go b/integration/build/build_squash_test.go index 9110604e4fd69..4cd282a976030 100644 --- a/integration/build/build_squash_test.go +++ b/integration/build/build_squash_test.go @@ -12,9 +12,9 @@ import ( "github.com/docker/docker/integration/internal/container" "github.com/docker/docker/internal/test/fakecontext" "github.com/docker/docker/pkg/stdcopy" - "github.com/gotestyourself/gotestyourself/assert" - is "github.com/gotestyourself/gotestyourself/assert/cmp" - "github.com/gotestyourself/gotestyourself/skip" + "gotest.tools/assert" + is "gotest.tools/assert/cmp" + "gotest.tools/skip" ) func TestBuildSquashParent(t *testing.T) { diff --git a/integration/build/build_test.go b/integration/build/build_test.go index ee9631d3ff4a4..25c5e635bdfdf 100644 --- a/integration/build/build_test.go +++ b/integration/build/build_test.go @@ -16,9 +16,9 @@ import ( "github.com/docker/docker/internal/test/fakecontext" "github.com/docker/docker/internal/test/request" "github.com/docker/docker/pkg/jsonmessage" - "github.com/gotestyourself/gotestyourself/assert" - is "github.com/gotestyourself/gotestyourself/assert/cmp" - "github.com/gotestyourself/gotestyourself/skip" + "gotest.tools/assert" + is "gotest.tools/assert/cmp" + "gotest.tools/skip" ) func TestBuildWithRemoveAndForceRemove(t *testing.T) { @@ -385,7 +385,7 @@ COPY bar /` // docker/for-linux#135 // #35641 func TestBuildMultiStageLayerLeak(t *testing.T) { - skip.IfCondition(t, versions.LessThan(testEnv.DaemonAPIVersion(), "1.37"), "broken in earlier versions") + skip.If(t, versions.LessThan(testEnv.DaemonAPIVersion(), "1.37"), "broken in earlier versions") ctx := context.TODO() defer setupTest(t)() diff --git a/integration/config/config_test.go b/integration/config/config_test.go index 1c002423eabd0..3cbca23899d11 100644 --- a/integration/config/config_test.go +++ b/integration/config/config_test.go @@ -14,9 +14,9 @@ import ( "github.com/docker/docker/client" "github.com/docker/docker/integration/internal/swarm" "github.com/docker/docker/pkg/stdcopy" - "github.com/gotestyourself/gotestyourself/assert" - is "github.com/gotestyourself/gotestyourself/assert/cmp" - "github.com/gotestyourself/gotestyourself/skip" + "gotest.tools/assert" + is "gotest.tools/assert/cmp" + "gotest.tools/skip" ) func TestConfigList(t *testing.T) { diff --git a/integration/container/copy_test.go b/integration/container/copy_test.go index 6794f9855523d..241b719eb70e3 100644 --- a/integration/container/copy_test.go +++ b/integration/container/copy_test.go @@ -8,9 +8,9 @@ import ( "github.com/docker/docker/api/types" "github.com/docker/docker/client" "github.com/docker/docker/integration/internal/container" - "github.com/gotestyourself/gotestyourself/assert" - is "github.com/gotestyourself/gotestyourself/assert/cmp" - "github.com/gotestyourself/gotestyourself/skip" + "gotest.tools/assert" + is "gotest.tools/assert/cmp" + "gotest.tools/skip" ) func TestCopyFromContainerPathDoesNotExist(t *testing.T) { diff --git a/integration/container/create_test.go b/integration/container/create_test.go index 9c466448903a0..f94eb4a3fb8e9 100644 --- a/integration/container/create_test.go +++ b/integration/container/create_test.go @@ -14,10 +14,10 @@ import ( ctr "github.com/docker/docker/integration/internal/container" "github.com/docker/docker/internal/test/request" "github.com/docker/docker/oci" - "github.com/gotestyourself/gotestyourself/assert" - is "github.com/gotestyourself/gotestyourself/assert/cmp" - "github.com/gotestyourself/gotestyourself/poll" - "github.com/gotestyourself/gotestyourself/skip" + "gotest.tools/assert" + is "gotest.tools/assert/cmp" + "gotest.tools/poll" + "gotest.tools/skip" ) func TestCreateFailsWhenIdentifierDoesNotExist(t *testing.T) { diff --git a/integration/container/daemon_linux_test.go b/integration/container/daemon_linux_test.go index df6aa683abac6..bc5c5076b8e65 100644 --- a/integration/container/daemon_linux_test.go +++ b/integration/container/daemon_linux_test.go @@ -11,9 +11,9 @@ import ( "github.com/docker/docker/api/types" "github.com/docker/docker/integration/internal/container" "github.com/docker/docker/internal/test/daemon" - "github.com/gotestyourself/gotestyourself/assert" - "github.com/gotestyourself/gotestyourself/skip" "golang.org/x/sys/unix" + "gotest.tools/assert" + "gotest.tools/skip" ) // This is a regression test for #36145 diff --git a/integration/container/diff_test.go b/integration/container/diff_test.go index fee58391e9903..b4219c3627e94 100644 --- a/integration/container/diff_test.go +++ b/integration/container/diff_test.go @@ -9,8 +9,8 @@ import ( "github.com/docker/docker/integration/internal/container" "github.com/docker/docker/internal/test/request" "github.com/docker/docker/pkg/archive" - "github.com/gotestyourself/gotestyourself/assert" - "github.com/gotestyourself/gotestyourself/poll" + "gotest.tools/assert" + "gotest.tools/poll" ) func TestDiff(t *testing.T) { diff --git a/integration/container/exec_test.go b/integration/container/exec_test.go index e1750d9414382..85f9e0591571e 100644 --- a/integration/container/exec_test.go +++ b/integration/container/exec_test.go @@ -10,9 +10,9 @@ import ( "github.com/docker/docker/api/types/versions" "github.com/docker/docker/integration/internal/container" "github.com/docker/docker/internal/test/request" - "github.com/gotestyourself/gotestyourself/assert" - is "github.com/gotestyourself/gotestyourself/assert/cmp" - "github.com/gotestyourself/gotestyourself/skip" + "gotest.tools/assert" + is "gotest.tools/assert/cmp" + "gotest.tools/skip" ) func TestExec(t *testing.T) { diff --git a/integration/container/export_test.go b/integration/container/export_test.go index dbeea341cdd2c..7a9ed0aa99fbd 100644 --- a/integration/container/export_test.go +++ b/integration/container/export_test.go @@ -12,10 +12,10 @@ import ( "github.com/docker/docker/internal/test/daemon" "github.com/docker/docker/internal/test/request" "github.com/docker/docker/pkg/jsonmessage" - "github.com/gotestyourself/gotestyourself/assert" - is "github.com/gotestyourself/gotestyourself/assert/cmp" - "github.com/gotestyourself/gotestyourself/poll" - "github.com/gotestyourself/gotestyourself/skip" + "gotest.tools/assert" + is "gotest.tools/assert/cmp" + "gotest.tools/poll" + "gotest.tools/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 e13885002d31f..7cc196e46d740 100644 --- a/integration/container/health_test.go +++ b/integration/container/health_test.go @@ -10,7 +10,7 @@ import ( "github.com/docker/docker/client" "github.com/docker/docker/integration/internal/container" "github.com/docker/docker/internal/test/request" - "github.com/gotestyourself/gotestyourself/poll" + "gotest.tools/poll" ) // TestHealthCheckWorkdir verifies that health-checks inherit the containers' diff --git a/integration/container/inspect_test.go b/integration/container/inspect_test.go index 8ed590443355d..d034c536500e6 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/internal/test/request" - "github.com/gotestyourself/gotestyourself/assert" - is "github.com/gotestyourself/gotestyourself/assert/cmp" - "github.com/gotestyourself/gotestyourself/poll" - "github.com/gotestyourself/gotestyourself/skip" + "gotest.tools/assert" + is "gotest.tools/assert/cmp" + "gotest.tools/poll" + "gotest.tools/skip" ) func TestInspectCpusetInConfigPre120(t *testing.T) { diff --git a/integration/container/kill_test.go b/integration/container/kill_test.go index 8cef5bb897acd..12a9083cf3a63 100644 --- a/integration/container/kill_test.go +++ b/integration/container/kill_test.go @@ -9,10 +9,10 @@ import ( "github.com/docker/docker/client" "github.com/docker/docker/integration/internal/container" "github.com/docker/docker/internal/test/request" - "github.com/gotestyourself/gotestyourself/assert" - is "github.com/gotestyourself/gotestyourself/assert/cmp" - "github.com/gotestyourself/gotestyourself/poll" - "github.com/gotestyourself/gotestyourself/skip" + "gotest.tools/assert" + is "gotest.tools/assert/cmp" + "gotest.tools/poll" + "gotest.tools/skip" ) func TestKillContainerInvalidSignal(t *testing.T) { diff --git a/integration/container/links_linux_test.go b/integration/container/links_linux_test.go index 9baa32728dd9c..f9f3cbe5eddf8 100644 --- a/integration/container/links_linux_test.go +++ b/integration/container/links_linux_test.go @@ -10,9 +10,9 @@ import ( "github.com/docker/docker/api/types/filters" "github.com/docker/docker/integration/internal/container" "github.com/docker/docker/internal/test/request" - "github.com/gotestyourself/gotestyourself/assert" - is "github.com/gotestyourself/gotestyourself/assert/cmp" - "github.com/gotestyourself/gotestyourself/skip" + "gotest.tools/assert" + is "gotest.tools/assert/cmp" + "gotest.tools/skip" ) func TestLinksEtcHostsContentMatch(t *testing.T) { diff --git a/integration/container/logs_test.go b/integration/container/logs_test.go index 80e3d9a6c6a29..68fbe13a73709 100644 --- a/integration/container/logs_test.go +++ b/integration/container/logs_test.go @@ -9,15 +9,15 @@ import ( "github.com/docker/docker/integration/internal/container" "github.com/docker/docker/internal/test/request" "github.com/docker/docker/pkg/stdcopy" - "github.com/gotestyourself/gotestyourself/assert" - "github.com/gotestyourself/gotestyourself/skip" + "gotest.tools/assert" + "gotest.tools/skip" ) // Regression test for #35370 // Makes sure that when following we don't get an EOF error when there are no logs func TestLogsFollowTailEmpty(t *testing.T) { // FIXME(vdemeester) fails on a e2e run on linux... - skip.IfCondition(t, testEnv.IsRemoteDaemon()) + skip.If(t, testEnv.IsRemoteDaemon()) defer setupTest(t)() client := request.NewAPIClient(t) ctx := context.Background() diff --git a/integration/container/mounts_linux_test.go b/integration/container/mounts_linux_test.go index 884eebb1b4f35..a0a8836c5171b 100644 --- a/integration/container/mounts_linux_test.go +++ b/integration/container/mounts_linux_test.go @@ -13,10 +13,10 @@ import ( "github.com/docker/docker/client" "github.com/docker/docker/internal/test/request" "github.com/docker/docker/pkg/system" - "github.com/gotestyourself/gotestyourself/assert" - is "github.com/gotestyourself/gotestyourself/assert/cmp" - "github.com/gotestyourself/gotestyourself/fs" - "github.com/gotestyourself/gotestyourself/skip" + "gotest.tools/assert" + is "gotest.tools/assert/cmp" + "gotest.tools/fs" + "gotest.tools/skip" ) func TestContainerNetworkMountsNoChown(t *testing.T) { diff --git a/integration/container/nat_test.go b/integration/container/nat_test.go index 12541b6a0a8ed..0dbed897dbd77 100644 --- a/integration/container/nat_test.go +++ b/integration/container/nat_test.go @@ -15,10 +15,10 @@ import ( "github.com/docker/docker/integration/internal/container" "github.com/docker/docker/internal/test/request" "github.com/docker/go-connections/nat" - "github.com/gotestyourself/gotestyourself/assert" - is "github.com/gotestyourself/gotestyourself/assert/cmp" - "github.com/gotestyourself/gotestyourself/poll" - "github.com/gotestyourself/gotestyourself/skip" + "gotest.tools/assert" + is "gotest.tools/assert/cmp" + "gotest.tools/poll" + "gotest.tools/skip" ) func TestNetworkNat(t *testing.T) { diff --git a/integration/container/pause_test.go b/integration/container/pause_test.go index 8f856bcb3c6f4..8dd2d784b70c2 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/internal/test/request" - "github.com/gotestyourself/gotestyourself/assert" - is "github.com/gotestyourself/gotestyourself/assert/cmp" - "github.com/gotestyourself/gotestyourself/poll" - "github.com/gotestyourself/gotestyourself/skip" + "gotest.tools/assert" + is "gotest.tools/assert/cmp" + "gotest.tools/poll" + "gotest.tools/skip" ) func TestPause(t *testing.T) { diff --git a/integration/container/ps_test.go b/integration/container/ps_test.go index 1080cd2f572cc..4ae07043ab9a0 100644 --- a/integration/container/ps_test.go +++ b/integration/container/ps_test.go @@ -8,8 +8,8 @@ import ( "github.com/docker/docker/api/types/filters" "github.com/docker/docker/integration/internal/container" "github.com/docker/docker/internal/test/request" - "github.com/gotestyourself/gotestyourself/assert" - is "github.com/gotestyourself/gotestyourself/assert/cmp" + "gotest.tools/assert" + is "gotest.tools/assert/cmp" ) func TestPsFilter(t *testing.T) { diff --git a/integration/container/remove_test.go b/integration/container/remove_test.go index 185f90cc00d95..5de13f22adcef 100644 --- a/integration/container/remove_test.go +++ b/integration/container/remove_test.go @@ -10,11 +10,11 @@ import ( "github.com/docker/docker/api/types/filters" "github.com/docker/docker/integration/internal/container" "github.com/docker/docker/internal/test/request" - "github.com/gotestyourself/gotestyourself/assert" - is "github.com/gotestyourself/gotestyourself/assert/cmp" - "github.com/gotestyourself/gotestyourself/fs" - "github.com/gotestyourself/gotestyourself/poll" - "github.com/gotestyourself/gotestyourself/skip" + "gotest.tools/assert" + is "gotest.tools/assert/cmp" + "gotest.tools/fs" + "gotest.tools/poll" + "gotest.tools/skip" ) func getPrefixAndSlashFromDaemonPlatform() (prefix, slash string) { diff --git a/integration/container/rename_test.go b/integration/container/rename_test.go index fd270052a5d8e..c3f46e10c2d01 100644 --- a/integration/container/rename_test.go +++ b/integration/container/rename_test.go @@ -12,10 +12,10 @@ import ( "github.com/docker/docker/integration/internal/container" "github.com/docker/docker/internal/test/request" "github.com/docker/docker/pkg/stringid" - "github.com/gotestyourself/gotestyourself/assert" - is "github.com/gotestyourself/gotestyourself/assert/cmp" - "github.com/gotestyourself/gotestyourself/poll" - "github.com/gotestyourself/gotestyourself/skip" + "gotest.tools/assert" + is "gotest.tools/assert/cmp" + "gotest.tools/poll" + "gotest.tools/skip" ) // This test simulates the scenario mentioned in #31392: diff --git a/integration/container/resize_test.go b/integration/container/resize_test.go index c6c4e81751917..5961af0a4729c 100644 --- a/integration/container/resize_test.go +++ b/integration/container/resize_test.go @@ -11,10 +11,10 @@ import ( "github.com/docker/docker/integration/internal/container" "github.com/docker/docker/internal/test/request" req "github.com/docker/docker/internal/test/request" - "github.com/gotestyourself/gotestyourself/assert" - is "github.com/gotestyourself/gotestyourself/assert/cmp" - "github.com/gotestyourself/gotestyourself/poll" - "github.com/gotestyourself/gotestyourself/skip" + "gotest.tools/assert" + is "gotest.tools/assert/cmp" + "gotest.tools/poll" + "gotest.tools/skip" ) func TestResize(t *testing.T) { diff --git a/integration/container/restart_test.go b/integration/container/restart_test.go index c63faba3a7433..69007218f1a4c 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/internal/test/daemon" - "github.com/gotestyourself/gotestyourself/assert" - "github.com/gotestyourself/gotestyourself/skip" + "gotest.tools/assert" + "gotest.tools/skip" ) func TestDaemonRestartKillContainers(t *testing.T) { diff --git a/integration/container/stats_test.go b/integration/container/stats_test.go index dbececa0e5c84..6493a30573e21 100644 --- a/integration/container/stats_test.go +++ b/integration/container/stats_test.go @@ -10,10 +10,10 @@ import ( "github.com/docker/docker/api/types" "github.com/docker/docker/integration/internal/container" "github.com/docker/docker/internal/test/request" - "github.com/gotestyourself/gotestyourself/assert" - is "github.com/gotestyourself/gotestyourself/assert/cmp" - "github.com/gotestyourself/gotestyourself/poll" - "github.com/gotestyourself/gotestyourself/skip" + "gotest.tools/assert" + is "gotest.tools/assert/cmp" + "gotest.tools/poll" + "gotest.tools/skip" ) func TestStats(t *testing.T) { diff --git a/integration/container/stop_test.go b/integration/container/stop_test.go index 2932ae0bf924b..7a2fa20188a6c 100644 --- a/integration/container/stop_test.go +++ b/integration/container/stop_test.go @@ -11,10 +11,10 @@ import ( "github.com/docker/docker/api/types" "github.com/docker/docker/integration/internal/container" "github.com/docker/docker/internal/test/request" - "github.com/gotestyourself/gotestyourself/assert" - "github.com/gotestyourself/gotestyourself/icmd" - "github.com/gotestyourself/gotestyourself/poll" - "github.com/gotestyourself/gotestyourself/skip" + "gotest.tools/assert" + "gotest.tools/icmd" + "gotest.tools/poll" + "gotest.tools/skip" ) func TestStopContainerWithRestartPolicyAlways(t *testing.T) { diff --git a/integration/container/update_linux_test.go b/integration/container/update_linux_test.go index 6e4fb637ff95e..0e410a14616ab 100644 --- a/integration/container/update_linux_test.go +++ b/integration/container/update_linux_test.go @@ -10,10 +10,10 @@ import ( containertypes "github.com/docker/docker/api/types/container" "github.com/docker/docker/integration/internal/container" "github.com/docker/docker/internal/test/request" - "github.com/gotestyourself/gotestyourself/assert" - is "github.com/gotestyourself/gotestyourself/assert/cmp" - "github.com/gotestyourself/gotestyourself/poll" - "github.com/gotestyourself/gotestyourself/skip" + "gotest.tools/assert" + is "gotest.tools/assert/cmp" + "gotest.tools/poll" + "gotest.tools/skip" ) func TestUpdateMemory(t *testing.T) { diff --git a/integration/container/update_test.go b/integration/container/update_test.go index 2ac122aea7188..0e32184d27f10 100644 --- a/integration/container/update_test.go +++ b/integration/container/update_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/internal/test/request" - "github.com/gotestyourself/gotestyourself/assert" - is "github.com/gotestyourself/gotestyourself/assert/cmp" - "github.com/gotestyourself/gotestyourself/poll" + "gotest.tools/assert" + is "gotest.tools/assert/cmp" + "gotest.tools/poll" ) func TestUpdateRestartPolicy(t *testing.T) { diff --git a/integration/image/commit_test.go b/integration/image/commit_test.go index eb0b4e6b5d684..4555391262ec4 100644 --- a/integration/image/commit_test.go +++ b/integration/image/commit_test.go @@ -8,9 +8,9 @@ import ( "github.com/docker/docker/api/types/versions" "github.com/docker/docker/integration/internal/container" "github.com/docker/docker/internal/test/request" - "github.com/gotestyourself/gotestyourself/assert" - is "github.com/gotestyourself/gotestyourself/assert/cmp" - "github.com/gotestyourself/gotestyourself/skip" + "gotest.tools/assert" + is "gotest.tools/assert/cmp" + "gotest.tools/skip" ) func TestCommitInheritsEnv(t *testing.T) { diff --git a/integration/image/remove_test.go b/integration/image/remove_test.go index 172c27f54dfa9..4f9122a5e37b4 100644 --- a/integration/image/remove_test.go +++ b/integration/image/remove_test.go @@ -7,8 +7,8 @@ import ( "github.com/docker/docker/api/types" "github.com/docker/docker/integration/internal/container" "github.com/docker/docker/internal/test/request" - "github.com/gotestyourself/gotestyourself/assert" - is "github.com/gotestyourself/gotestyourself/assert/cmp" + "gotest.tools/assert" + is "gotest.tools/assert/cmp" ) func TestRemoveImageOrphaning(t *testing.T) { diff --git a/integration/image/tag_test.go b/integration/image/tag_test.go index 06431cd8a29b6..55c3ff7b2b0b2 100644 --- a/integration/image/tag_test.go +++ b/integration/image/tag_test.go @@ -7,8 +7,8 @@ import ( "github.com/docker/docker/internal/test/request" "github.com/docker/docker/internal/testutil" - "github.com/gotestyourself/gotestyourself/assert" - is "github.com/gotestyourself/gotestyourself/assert/cmp" + "gotest.tools/assert" + is "gotest.tools/assert/cmp" ) // 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 0c76571769bbd..489e07154a1de 100644 --- a/integration/internal/container/container.go +++ b/integration/internal/container/container.go @@ -8,7 +8,7 @@ import ( "github.com/docker/docker/api/types/container" "github.com/docker/docker/api/types/network" "github.com/docker/docker/client" - "github.com/gotestyourself/gotestyourself/assert" + "gotest.tools/assert" ) // TestContainerConfig holds container configuration struct that diff --git a/integration/internal/container/states.go b/integration/internal/container/states.go index 1ee73e01a6b72..088407deb84eb 100644 --- a/integration/internal/container/states.go +++ b/integration/internal/container/states.go @@ -5,7 +5,7 @@ import ( "strings" "github.com/docker/docker/client" - "github.com/gotestyourself/gotestyourself/poll" + "gotest.tools/poll" ) // IsStopped verifies the container is in stopped state. diff --git a/integration/internal/network/network.go b/integration/internal/network/network.go index b9550362f0083..9c13114f92e2e 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" - "github.com/gotestyourself/gotestyourself/assert" + "gotest.tools/assert" ) func createNetwork(ctx context.Context, client client.APIClient, name string, ops ...func(*types.NetworkCreate)) (string, error) { diff --git a/integration/internal/requirement/requirement.go b/integration/internal/requirement/requirement.go index cd498ab87d71e..004383bd055d5 100644 --- a/integration/internal/requirement/requirement.go +++ b/integration/internal/requirement/requirement.go @@ -7,7 +7,7 @@ import ( "time" "github.com/docker/docker/pkg/parsers/kernel" - "github.com/gotestyourself/gotestyourself/icmd" + "gotest.tools/icmd" ) // HasHubConnectivity checks to see if https://hub.docker.com is diff --git a/integration/internal/swarm/service.go b/integration/internal/swarm/service.go index 5567ad6ede9e1..d8b16224fb61e 100644 --- a/integration/internal/swarm/service.go +++ b/integration/internal/swarm/service.go @@ -11,9 +11,9 @@ import ( swarmtypes "github.com/docker/docker/api/types/swarm" "github.com/docker/docker/internal/test/daemon" "github.com/docker/docker/internal/test/environment" - "github.com/gotestyourself/gotestyourself/assert" - "github.com/gotestyourself/gotestyourself/poll" - "github.com/gotestyourself/gotestyourself/skip" + "gotest.tools/assert" + "gotest.tools/poll" + "gotest.tools/skip" ) // ServicePoll tweaks the pollSettings for `service` diff --git a/integration/network/delete_test.go b/integration/network/delete_test.go index 83d00bbdf14f6..c2684ae2479ae 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" "github.com/docker/docker/integration/internal/network" "github.com/docker/docker/internal/test/request" - "github.com/gotestyourself/gotestyourself/assert" - is "github.com/gotestyourself/gotestyourself/assert/cmp" - "github.com/gotestyourself/gotestyourself/skip" + "gotest.tools/assert" + is "gotest.tools/assert/cmp" + "gotest.tools/skip" ) func containsNetwork(nws []types.NetworkResource, networkID string) bool { diff --git a/integration/network/helpers.go b/integration/network/helpers.go index df609dd4104f7..c0d70a168e785 100644 --- a/integration/network/helpers.go +++ b/integration/network/helpers.go @@ -8,8 +8,8 @@ import ( "github.com/docker/docker/api/types" "github.com/docker/docker/client" "github.com/docker/docker/pkg/parsers/kernel" - "github.com/gotestyourself/gotestyourself/assert/cmp" - "github.com/gotestyourself/gotestyourself/icmd" + "gotest.tools/assert/cmp" + "gotest.tools/icmd" ) // CreateMasterDummy creates a dummy network interface diff --git a/integration/network/inspect_test.go b/integration/network/inspect_test.go index 052642f9808e6..659ca2973582c 100644 --- a/integration/network/inspect_test.go +++ b/integration/network/inspect_test.go @@ -10,8 +10,8 @@ import ( swarmtypes "github.com/docker/docker/api/types/swarm" "github.com/docker/docker/client" "github.com/docker/docker/integration/internal/swarm" - "github.com/gotestyourself/gotestyourself/assert" - "github.com/gotestyourself/gotestyourself/poll" + "gotest.tools/assert" + "gotest.tools/poll" ) const defaultSwarmPort = 2477 diff --git a/integration/network/ipvlan/ipvlan_test.go b/integration/network/ipvlan/ipvlan_test.go index 001565eefd46d..190c695a6b0b2 100644 --- a/integration/network/ipvlan/ipvlan_test.go +++ b/integration/network/ipvlan/ipvlan_test.go @@ -12,8 +12,8 @@ import ( "github.com/docker/docker/integration/internal/container" n "github.com/docker/docker/integration/network" "github.com/docker/docker/internal/test/daemon" - "github.com/gotestyourself/gotestyourself/assert" - "github.com/gotestyourself/gotestyourself/skip" + "gotest.tools/assert" + "gotest.tools/skip" ) func TestDockerNetworkIpvlanPersistance(t *testing.T) { diff --git a/integration/network/macvlan/macvlan_test.go b/integration/network/macvlan/macvlan_test.go index 7d9acd813eb6b..14dfce92cb6da 100644 --- a/integration/network/macvlan/macvlan_test.go +++ b/integration/network/macvlan/macvlan_test.go @@ -12,8 +12,8 @@ import ( net "github.com/docker/docker/integration/internal/network" n "github.com/docker/docker/integration/network" "github.com/docker/docker/internal/test/daemon" - "github.com/gotestyourself/gotestyourself/assert" - "github.com/gotestyourself/gotestyourself/skip" + "gotest.tools/assert" + "gotest.tools/skip" ) func TestDockerNetworkMacvlanPersistance(t *testing.T) { diff --git a/integration/network/service_test.go b/integration/network/service_test.go index 77ef870911acb..a15b0384c73a7 100644 --- a/integration/network/service_test.go +++ b/integration/network/service_test.go @@ -11,10 +11,10 @@ import ( "github.com/docker/docker/client" "github.com/docker/docker/integration/internal/swarm" "github.com/docker/docker/internal/test/daemon" - "github.com/gotestyourself/gotestyourself/assert" - "github.com/gotestyourself/gotestyourself/icmd" - "github.com/gotestyourself/gotestyourself/poll" - "github.com/gotestyourself/gotestyourself/skip" + "gotest.tools/assert" + "gotest.tools/icmd" + "gotest.tools/poll" + "gotest.tools/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 5585d93024c77..105affc1af077 100644 --- a/integration/plugin/authz/authz_plugin_test.go +++ b/integration/plugin/authz/authz_plugin_test.go @@ -25,8 +25,8 @@ import ( "github.com/docker/docker/internal/test/environment" "github.com/docker/docker/pkg/archive" "github.com/docker/docker/pkg/authorization" - "github.com/gotestyourself/gotestyourself/assert" - "github.com/gotestyourself/gotestyourself/skip" + "gotest.tools/assert" + "gotest.tools/skip" ) const ( @@ -211,7 +211,7 @@ func TestAuthZPluginDenyResponse(t *testing.T) { // TestAuthZPluginAllowEventStream verifies event stream propagates // correctly after request pass through by the authorization plugin func TestAuthZPluginAllowEventStream(t *testing.T) { - skip.IfCondition(t, testEnv.DaemonInfo.OSType != "linux") + skip.If(t, testEnv.DaemonInfo.OSType != "linux") defer setupTestV1(t)() ctrl.reqRes.Allow = true diff --git a/integration/plugin/authz/authz_plugin_v2_test.go b/integration/plugin/authz/authz_plugin_v2_test.go index 93e36d76b9179..5ebaca41c626a 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" - "github.com/gotestyourself/gotestyourself/assert" - "github.com/gotestyourself/gotestyourself/skip" + "gotest.tools/assert" + "gotest.tools/skip" ) var ( @@ -29,8 +29,8 @@ var ( ) func setupTestV2(t *testing.T) func() { - skip.IfCondition(t, testEnv.DaemonInfo.OSType != "linux") - skip.IfCondition(t, !requirement.HasHubConnectivity(t)) + skip.If(t, testEnv.DaemonInfo.OSType != "linux") + skip.If(t, !requirement.HasHubConnectivity(t)) teardown := setupTest(t) @@ -40,7 +40,7 @@ func setupTestV2(t *testing.T) func() { } func TestAuthZPluginV2AllowNonVolumeRequest(t *testing.T) { - skip.IfCondition(t, os.Getenv("DOCKER_ENGINE_GOARCH") != "amd64") + skip.If(t, os.Getenv("DOCKER_ENGINE_GOARCH") != "amd64") defer setupTestV2(t)() client, err := d.NewClient() @@ -64,7 +64,7 @@ func TestAuthZPluginV2AllowNonVolumeRequest(t *testing.T) { } func TestAuthZPluginV2Disable(t *testing.T) { - skip.IfCondition(t, os.Getenv("DOCKER_ENGINE_GOARCH") != "amd64") + skip.If(t, os.Getenv("DOCKER_ENGINE_GOARCH") != "amd64") defer setupTestV2(t)() client, err := d.NewClient() @@ -91,7 +91,7 @@ func TestAuthZPluginV2Disable(t *testing.T) { } func TestAuthZPluginV2RejectVolumeRequests(t *testing.T) { - skip.IfCondition(t, os.Getenv("DOCKER_ENGINE_GOARCH") != "amd64") + skip.If(t, os.Getenv("DOCKER_ENGINE_GOARCH") != "amd64") defer setupTestV2(t)() client, err := d.NewClient() @@ -127,7 +127,7 @@ func TestAuthZPluginV2RejectVolumeRequests(t *testing.T) { } func TestAuthZPluginV2BadManifestFailsDaemonStart(t *testing.T) { - skip.IfCondition(t, os.Getenv("DOCKER_ENGINE_GOARCH") != "amd64") + skip.If(t, os.Getenv("DOCKER_ENGINE_GOARCH") != "amd64") defer setupTestV2(t)() client, err := d.NewClient() diff --git a/integration/plugin/authz/main_test.go b/integration/plugin/authz/main_test.go index 54bf259e95ff1..75555dc96fc3f 100644 --- a/integration/plugin/authz/main_test.go +++ b/integration/plugin/authz/main_test.go @@ -16,7 +16,7 @@ import ( "github.com/docker/docker/internal/test/environment" "github.com/docker/docker/pkg/authorization" "github.com/docker/docker/pkg/plugins" - "github.com/gotestyourself/gotestyourself/skip" + "gotest.tools/skip" ) var ( diff --git a/integration/plugin/graphdriver/external_test.go b/integration/plugin/graphdriver/external_test.go index 11e24aec70338..3596056a84f5f 100644 --- a/integration/plugin/graphdriver/external_test.go +++ b/integration/plugin/graphdriver/external_test.go @@ -22,9 +22,9 @@ import ( "github.com/docker/docker/internal/test/daemon" "github.com/docker/docker/pkg/archive" "github.com/docker/docker/pkg/plugins" - "github.com/gotestyourself/gotestyourself/assert" - is "github.com/gotestyourself/gotestyourself/assert/cmp" - "github.com/gotestyourself/gotestyourself/skip" + "gotest.tools/assert" + is "gotest.tools/assert/cmp" + "gotest.tools/skip" ) type graphEventsCounter struct { diff --git a/integration/plugin/logging/logging_test.go b/integration/plugin/logging/logging_test.go index 1b6f2962bb4df..3921fa6e6985c 100644 --- a/integration/plugin/logging/logging_test.go +++ b/integration/plugin/logging/logging_test.go @@ -11,8 +11,8 @@ import ( "github.com/docker/docker/api/types" "github.com/docker/docker/integration/internal/container" "github.com/docker/docker/internal/test/daemon" - "github.com/gotestyourself/gotestyourself/assert" - "github.com/gotestyourself/gotestyourself/skip" + "gotest.tools/assert" + "gotest.tools/skip" ) func TestContinueAfterPluginCrash(t *testing.T) { diff --git a/integration/plugin/logging/validation_test.go b/integration/plugin/logging/validation_test.go index b0398cc6ab90b..0d9b15efbfe4a 100644 --- a/integration/plugin/logging/validation_test.go +++ b/integration/plugin/logging/validation_test.go @@ -6,8 +6,8 @@ import ( "github.com/docker/docker/api/types" "github.com/docker/docker/internal/test/daemon" - "github.com/gotestyourself/gotestyourself/assert" - "github.com/gotestyourself/gotestyourself/skip" + "gotest.tools/assert" + "gotest.tools/skip" ) // Regression test for #35553 diff --git a/integration/plugin/volumes/mounts_test.go b/integration/plugin/volumes/mounts_test.go index 97e822279759b..4b422ee5c39f5 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/internal/test/daemon" "github.com/docker/docker/internal/test/fixtures/plugin" - "github.com/gotestyourself/gotestyourself/assert" - "github.com/gotestyourself/gotestyourself/skip" + "gotest.tools/assert" + "gotest.tools/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 939dad60de2ad..ecc3108f65774 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" - "github.com/gotestyourself/gotestyourself/assert" - is "github.com/gotestyourself/gotestyourself/assert/cmp" - "github.com/gotestyourself/gotestyourself/skip" + "gotest.tools/assert" + is "gotest.tools/assert/cmp" + "gotest.tools/skip" ) func TestSecretInspect(t *testing.T) { diff --git a/integration/service/create_test.go b/integration/service/create_test.go index a2225696a26ce..cc5ef9956fbdd 100644 --- a/integration/service/create_test.go +++ b/integration/service/create_test.go @@ -13,9 +13,9 @@ import ( "github.com/docker/docker/client" "github.com/docker/docker/integration/internal/swarm" "github.com/docker/docker/internal/test/daemon" - "github.com/gotestyourself/gotestyourself/assert" - is "github.com/gotestyourself/gotestyourself/assert/cmp" - "github.com/gotestyourself/gotestyourself/poll" + "gotest.tools/assert" + is "gotest.tools/assert/cmp" + "gotest.tools/poll" ) func TestServiceCreateInit(t *testing.T) { diff --git a/integration/service/inspect_test.go b/integration/service/inspect_test.go index 7492a4fc021d6..daeabcfe1294c 100644 --- a/integration/service/inspect_test.go +++ b/integration/service/inspect_test.go @@ -12,10 +12,10 @@ import ( "github.com/docker/docker/client" "github.com/docker/docker/integration/internal/swarm" "github.com/google/go-cmp/cmp" - "github.com/gotestyourself/gotestyourself/assert" - is "github.com/gotestyourself/gotestyourself/assert/cmp" - "github.com/gotestyourself/gotestyourself/poll" - "github.com/gotestyourself/gotestyourself/skip" + "gotest.tools/assert" + is "gotest.tools/assert/cmp" + "gotest.tools/poll" + "gotest.tools/skip" ) func TestInspect(t *testing.T) { @@ -54,7 +54,7 @@ func TestInspect(t *testing.T) { assert.Check(t, is.DeepEqual(service, expected, cmpServiceOpts())) } -// TODO: use helpers from gotestyourself/assert/opt when available +// TODO: use helpers from gotest.tools/assert/opt when available func cmpServiceOpts() cmp.Option { const threshold = 20 * time.Second diff --git a/integration/service/network_test.go b/integration/service/network_test.go index d69aeb91f6cff..4ebbd972a8e37 100644 --- a/integration/service/network_test.go +++ b/integration/service/network_test.go @@ -8,8 +8,8 @@ import ( "github.com/docker/docker/api/types/network" "github.com/docker/docker/integration/internal/container" "github.com/docker/docker/integration/internal/swarm" - "github.com/gotestyourself/gotestyourself/assert" - is "github.com/gotestyourself/gotestyourself/assert/cmp" + "gotest.tools/assert" + is "gotest.tools/assert/cmp" ) func TestDockerNetworkConnectAlias(t *testing.T) { diff --git a/integration/service/plugin_test.go b/integration/service/plugin_test.go index 29a0398323166..6c61825220d25 100644 --- a/integration/service/plugin_test.go +++ b/integration/service/plugin_test.go @@ -15,9 +15,9 @@ import ( "github.com/docker/docker/internal/test/daemon" "github.com/docker/docker/internal/test/fixtures/plugin" "github.com/docker/docker/internal/test/registry" - "github.com/gotestyourself/gotestyourself/assert" - "github.com/gotestyourself/gotestyourself/poll" - "github.com/gotestyourself/gotestyourself/skip" + "gotest.tools/assert" + "gotest.tools/poll" + "gotest.tools/skip" ) func TestServicePlugin(t *testing.T) { diff --git a/integration/session/session_test.go b/integration/session/session_test.go index 893682fabaaa3..67a3773abdb96 100644 --- a/integration/session/session_test.go +++ b/integration/session/session_test.go @@ -5,9 +5,9 @@ import ( "testing" req "github.com/docker/docker/internal/test/request" - "github.com/gotestyourself/gotestyourself/assert" - is "github.com/gotestyourself/gotestyourself/assert/cmp" - "github.com/gotestyourself/gotestyourself/skip" + "gotest.tools/assert" + is "gotest.tools/assert/cmp" + "gotest.tools/skip" ) func TestSessionCreate(t *testing.T) { diff --git a/integration/system/cgroupdriver_systemd_test.go b/integration/system/cgroupdriver_systemd_test.go index 0b4e7eeeeb1cb..449c83fdab6e7 100644 --- a/integration/system/cgroupdriver_systemd_test.go +++ b/integration/system/cgroupdriver_systemd_test.go @@ -9,7 +9,7 @@ import ( "github.com/docker/docker/integration/internal/container" "github.com/docker/docker/internal/test/daemon" - "github.com/gotestyourself/gotestyourself/assert" + "gotest.tools/assert" ) // 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 b1966fe6cef05..6e86f4ad95654 100644 --- a/integration/system/event_test.go +++ b/integration/system/event_test.go @@ -18,9 +18,9 @@ import ( "github.com/docker/docker/internal/test/request" req "github.com/docker/docker/internal/test/request" "github.com/docker/docker/pkg/jsonmessage" - "github.com/gotestyourself/gotestyourself/assert" - is "github.com/gotestyourself/gotestyourself/assert/cmp" - "github.com/gotestyourself/gotestyourself/skip" + "gotest.tools/assert" + is "gotest.tools/assert/cmp" + "gotest.tools/skip" ) func TestEventsExecDie(t *testing.T) { diff --git a/integration/system/info_linux_test.go b/integration/system/info_linux_test.go index 15bd69fdf6117..50fa9874b4f93 100644 --- a/integration/system/info_linux_test.go +++ b/integration/system/info_linux_test.go @@ -9,8 +9,8 @@ import ( "github.com/docker/docker/internal/test/request" req "github.com/docker/docker/internal/test/request" - "github.com/gotestyourself/gotestyourself/assert" - is "github.com/gotestyourself/gotestyourself/assert/cmp" + "gotest.tools/assert" + is "gotest.tools/assert/cmp" ) func TestInfoBinaryCommits(t *testing.T) { diff --git a/integration/system/info_test.go b/integration/system/info_test.go index 0906eea336325..2a05dfbb74993 100644 --- a/integration/system/info_test.go +++ b/integration/system/info_test.go @@ -6,8 +6,8 @@ import ( "testing" "github.com/docker/docker/internal/test/request" - "github.com/gotestyourself/gotestyourself/assert" - is "github.com/gotestyourself/gotestyourself/assert/cmp" + "gotest.tools/assert" + is "gotest.tools/assert/cmp" ) func TestInfoAPI(t *testing.T) { diff --git a/integration/system/login_test.go b/integration/system/login_test.go index 5d512ca343205..ad1a8756dc173 100644 --- a/integration/system/login_test.go +++ b/integration/system/login_test.go @@ -7,14 +7,14 @@ import ( "github.com/docker/docker/api/types" "github.com/docker/docker/integration/internal/requirement" "github.com/docker/docker/internal/test/request" - "github.com/gotestyourself/gotestyourself/assert" - is "github.com/gotestyourself/gotestyourself/assert/cmp" - "github.com/gotestyourself/gotestyourself/skip" + "gotest.tools/assert" + is "gotest.tools/assert/cmp" + "gotest.tools/skip" ) // Test case for GitHub 22244 func TestLoginFailsWithBadCredentials(t *testing.T) { - skip.IfCondition(t, !requirement.HasHubConnectivity(t)) + skip.If(t, !requirement.HasHubConnectivity(t)) client := request.NewAPIClient(t) diff --git a/integration/system/version_test.go b/integration/system/version_test.go index 24618053604b4..8904c09b26c6f 100644 --- a/integration/system/version_test.go +++ b/integration/system/version_test.go @@ -5,8 +5,8 @@ import ( "testing" "github.com/docker/docker/internal/test/request" - "github.com/gotestyourself/gotestyourself/assert" - is "github.com/gotestyourself/gotestyourself/assert/cmp" + "gotest.tools/assert" + is "gotest.tools/assert/cmp" ) func TestVersion(t *testing.T) { diff --git a/integration/volume/volume_test.go b/integration/volume/volume_test.go index 4acc6e8b1ae99..ce42bb3040b87 100644 --- a/integration/volume/volume_test.go +++ b/integration/volume/volume_test.go @@ -13,9 +13,9 @@ import ( "github.com/docker/docker/integration/internal/container" "github.com/docker/docker/internal/test/request" "github.com/google/go-cmp/cmp/cmpopts" - "github.com/gotestyourself/gotestyourself/assert" - is "github.com/gotestyourself/gotestyourself/assert/cmp" - "github.com/gotestyourself/gotestyourself/skip" + "gotest.tools/assert" + is "gotest.tools/assert/cmp" + "gotest.tools/skip" ) func TestVolumesCreateAndList(t *testing.T) { diff --git a/internal/test/daemon/config.go b/internal/test/daemon/config.go index c57010db90bf4..ce99222b37eac 100644 --- a/internal/test/daemon/config.go +++ b/internal/test/daemon/config.go @@ -6,7 +6,7 @@ import ( "github.com/docker/docker/api/types" "github.com/docker/docker/api/types/swarm" "github.com/docker/docker/internal/test" - "github.com/gotestyourself/gotestyourself/assert" + "gotest.tools/assert" ) // ConfigConstructor defines a swarm config constructor diff --git a/internal/test/daemon/container.go b/internal/test/daemon/container.go index 6a0ced9447279..3aa69e195cdc9 100644 --- a/internal/test/daemon/container.go +++ b/internal/test/daemon/container.go @@ -5,7 +5,7 @@ import ( "github.com/docker/docker/api/types" "github.com/docker/docker/internal/test" - "github.com/gotestyourself/gotestyourself/assert" + "gotest.tools/assert" ) // ActiveContainers returns the list of ids of the currently running containers diff --git a/internal/test/daemon/daemon.go b/internal/test/daemon/daemon.go index a0d7ed4855f22..98f1ee1b08b0d 100644 --- a/internal/test/daemon/daemon.go +++ b/internal/test/daemon/daemon.go @@ -23,8 +23,8 @@ import ( "github.com/docker/docker/pkg/stringid" "github.com/docker/go-connections/sockets" "github.com/docker/go-connections/tlsconfig" - "github.com/gotestyourself/gotestyourself/assert" "github.com/pkg/errors" + "gotest.tools/assert" ) type testingT interface { diff --git a/internal/test/daemon/node.go b/internal/test/daemon/node.go index 5015c75eb1d7e..d9263a7f29dc8 100644 --- a/internal/test/daemon/node.go +++ b/internal/test/daemon/node.go @@ -8,7 +8,7 @@ import ( "github.com/docker/docker/api/types" "github.com/docker/docker/api/types/swarm" "github.com/docker/docker/internal/test" - "github.com/gotestyourself/gotestyourself/assert" + "gotest.tools/assert" ) // NodeConstructor defines a swarm node constructor diff --git a/internal/test/daemon/plugin.go b/internal/test/daemon/plugin.go index 9a7cc345ea74a..63bbeed219327 100644 --- a/internal/test/daemon/plugin.go +++ b/internal/test/daemon/plugin.go @@ -5,7 +5,7 @@ import ( "github.com/docker/docker/api/types" "github.com/docker/docker/client" - "github.com/gotestyourself/gotestyourself/poll" + "gotest.tools/poll" ) // PluginIsRunning provides a poller to check if the specified plugin is running diff --git a/internal/test/daemon/secret.go b/internal/test/daemon/secret.go index 615489bfd0a51..f3db7a42601da 100644 --- a/internal/test/daemon/secret.go +++ b/internal/test/daemon/secret.go @@ -6,7 +6,7 @@ import ( "github.com/docker/docker/api/types" "github.com/docker/docker/api/types/swarm" "github.com/docker/docker/internal/test" - "github.com/gotestyourself/gotestyourself/assert" + "gotest.tools/assert" ) // SecretConstructor defines a swarm secret constructor diff --git a/internal/test/daemon/service.go b/internal/test/daemon/service.go index 77614d0daafc1..0f88ca786b32d 100644 --- a/internal/test/daemon/service.go +++ b/internal/test/daemon/service.go @@ -8,7 +8,7 @@ import ( "github.com/docker/docker/api/types/filters" "github.com/docker/docker/api/types/swarm" "github.com/docker/docker/internal/test" - "github.com/gotestyourself/gotestyourself/assert" + "gotest.tools/assert" ) // ServiceConstructor defines a swarm service constructor function diff --git a/internal/test/daemon/swarm.go b/internal/test/daemon/swarm.go index 3e803eeeb87a2..e8e8b945dee3d 100644 --- a/internal/test/daemon/swarm.go +++ b/internal/test/daemon/swarm.go @@ -6,8 +6,8 @@ import ( "github.com/docker/docker/api/types/swarm" "github.com/docker/docker/internal/test" - "github.com/gotestyourself/gotestyourself/assert" "github.com/pkg/errors" + "gotest.tools/assert" ) const ( diff --git a/internal/test/environment/clean.go b/internal/test/environment/clean.go index e92006fc46cf0..93dee593f2817 100644 --- a/internal/test/environment/clean.go +++ b/internal/test/environment/clean.go @@ -9,7 +9,7 @@ import ( "github.com/docker/docker/api/types/filters" "github.com/docker/docker/client" "github.com/docker/docker/internal/test" - "github.com/gotestyourself/gotestyourself/assert" + "gotest.tools/assert" ) type testingT interface { diff --git a/internal/test/environment/protect.go b/internal/test/environment/protect.go index 6d57dedb1ccde..b5b27d2dd4f4c 100644 --- a/internal/test/environment/protect.go +++ b/internal/test/environment/protect.go @@ -7,7 +7,7 @@ import ( "github.com/docker/docker/api/types/filters" dclient "github.com/docker/docker/client" "github.com/docker/docker/internal/test" - "github.com/gotestyourself/gotestyourself/assert" + "gotest.tools/assert" ) var frozenImages = []string{"busybox:latest", "busybox:glibc", "hello-world:frozen", "debian:jessie"} diff --git a/internal/test/fakegit/fakegit.go b/internal/test/fakegit/fakegit.go index 59f4bcb056017..605d1baaa8337 100644 --- a/internal/test/fakegit/fakegit.go +++ b/internal/test/fakegit/fakegit.go @@ -12,7 +12,7 @@ import ( "github.com/docker/docker/internal/test" "github.com/docker/docker/internal/test/fakecontext" "github.com/docker/docker/internal/test/fakestorage" - "github.com/gotestyourself/gotestyourself/assert" + "gotest.tools/assert" ) type testingT interface { diff --git a/internal/test/fakestorage/fixtures.go b/internal/test/fakestorage/fixtures.go index a694834f7d895..ad8f76314338a 100644 --- a/internal/test/fakestorage/fixtures.go +++ b/internal/test/fakestorage/fixtures.go @@ -12,7 +12,7 @@ import ( "github.com/docker/docker/api/types" "github.com/docker/docker/internal/test" "github.com/docker/docker/pkg/archive" - "github.com/gotestyourself/gotestyourself/assert" + "gotest.tools/assert" ) var ensureHTTPServerOnce sync.Once diff --git a/internal/test/fakestorage/storage.go b/internal/test/fakestorage/storage.go index adce3512c12f8..b091cbc3f1c85 100644 --- a/internal/test/fakestorage/storage.go +++ b/internal/test/fakestorage/storage.go @@ -20,7 +20,7 @@ import ( "github.com/docker/docker/internal/test/request" "github.com/docker/docker/internal/testutil" "github.com/docker/go-connections/nat" - "github.com/gotestyourself/gotestyourself/assert" + "gotest.tools/assert" ) var testEnv *environment.Execution diff --git a/internal/test/registry/registry.go b/internal/test/registry/registry.go index 2e89c32e57d6d..b6128d3ba4d3c 100644 --- a/internal/test/registry/registry.go +++ b/internal/test/registry/registry.go @@ -10,8 +10,8 @@ import ( "time" "github.com/docker/docker/internal/test" - "github.com/gotestyourself/gotestyourself/assert" "github.com/opencontainers/go-digest" + "gotest.tools/assert" ) const ( diff --git a/internal/test/request/request.go b/internal/test/request/request.go index 00450d94a2229..1986d370f152f 100644 --- a/internal/test/request/request.go +++ b/internal/test/request/request.go @@ -20,8 +20,8 @@ import ( "github.com/docker/docker/pkg/ioutils" "github.com/docker/go-connections/sockets" "github.com/docker/go-connections/tlsconfig" - "github.com/gotestyourself/gotestyourself/assert" "github.com/pkg/errors" + "gotest.tools/assert" ) // NewAPIClient returns a docker API client configured from environment variables diff --git a/internal/testutil/stringutils_test.go b/internal/testutil/stringutils_test.go index 1dd09af95f359..753aac966dc2e 100644 --- a/internal/testutil/stringutils_test.go +++ b/internal/testutil/stringutils_test.go @@ -3,8 +3,8 @@ package testutil // import "github.com/docker/docker/internal/testutil" import ( "testing" - "github.com/gotestyourself/gotestyourself/assert" - is "github.com/gotestyourself/gotestyourself/assert/cmp" + "gotest.tools/assert" + is "gotest.tools/assert/cmp" ) func testLengthHelper(generator func(int) string, t *testing.T) { diff --git a/libcontainerd/queue_test.go b/libcontainerd/queue_test.go index df5332c128b34..e13afca89a25a 100644 --- a/libcontainerd/queue_test.go +++ b/libcontainerd/queue_test.go @@ -4,7 +4,7 @@ import ( "testing" "time" - "github.com/gotestyourself/gotestyourself/assert" + "gotest.tools/assert" ) func TestSerialization(t *testing.T) { diff --git a/opts/quotedstring_test.go b/opts/quotedstring_test.go index 21e6e4c85ae6e..89fed6cfa6ac3 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" - "github.com/gotestyourself/gotestyourself/assert" - is "github.com/gotestyourself/gotestyourself/assert/cmp" + "gotest.tools/assert" + is "gotest.tools/assert/cmp" ) func TestQuotedStringSetWithQuotes(t *testing.T) { diff --git a/pkg/archive/archive_linux_test.go b/pkg/archive/archive_linux_test.go index b06cabecb330a..9422269dffe71 100644 --- a/pkg/archive/archive_linux_test.go +++ b/pkg/archive/archive_linux_test.go @@ -8,9 +8,9 @@ import ( "testing" "github.com/docker/docker/pkg/system" - "github.com/gotestyourself/gotestyourself/assert" - "github.com/gotestyourself/gotestyourself/skip" "golang.org/x/sys/unix" + "gotest.tools/assert" + "gotest.tools/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 d801f2724a17f..9f06af9969c95 100644 --- a/pkg/archive/archive_test.go +++ b/pkg/archive/archive_test.go @@ -18,9 +18,9 @@ import ( "github.com/docker/docker/pkg/idtools" "github.com/docker/docker/pkg/ioutils" - "github.com/gotestyourself/gotestyourself/assert" - is "github.com/gotestyourself/gotestyourself/assert/cmp" - "github.com/gotestyourself/gotestyourself/skip" + "gotest.tools/assert" + is "gotest.tools/assert/cmp" + "gotest.tools/skip" ) var tmp string diff --git a/pkg/archive/archive_unix_test.go b/pkg/archive/archive_unix_test.go index 034490b5731fa..808878d0948a4 100644 --- a/pkg/archive/archive_unix_test.go +++ b/pkg/archive/archive_unix_test.go @@ -13,10 +13,10 @@ import ( "testing" "github.com/docker/docker/pkg/system" - "github.com/gotestyourself/gotestyourself/assert" - is "github.com/gotestyourself/gotestyourself/assert/cmp" - "github.com/gotestyourself/gotestyourself/skip" "golang.org/x/sys/unix" + "gotest.tools/assert" + is "gotest.tools/assert/cmp" + "gotest.tools/skip" ) func TestCanonicalTarNameForPath(t *testing.T) { diff --git a/pkg/archive/changes_test.go b/pkg/archive/changes_test.go index 83ad5be605ef3..f2527cd93650f 100644 --- a/pkg/archive/changes_test.go +++ b/pkg/archive/changes_test.go @@ -11,8 +11,8 @@ import ( "time" "github.com/docker/docker/pkg/system" - "github.com/gotestyourself/gotestyourself/assert" - "github.com/gotestyourself/gotestyourself/skip" + "gotest.tools/assert" + "gotest.tools/skip" ) func max(x, y int) int { diff --git a/pkg/archive/copy_unix_test.go b/pkg/archive/copy_unix_test.go index 08b1702cf1c25..739ad0e3eff4e 100644 --- a/pkg/archive/copy_unix_test.go +++ b/pkg/archive/copy_unix_test.go @@ -16,7 +16,7 @@ import ( "strings" "testing" - "github.com/gotestyourself/gotestyourself/assert" + "gotest.tools/assert" ) func removeAllPaths(paths ...string) { diff --git a/pkg/archive/wrap_test.go b/pkg/archive/wrap_test.go index 979536777ff35..1faa7aed75393 100644 --- a/pkg/archive/wrap_test.go +++ b/pkg/archive/wrap_test.go @@ -6,7 +6,7 @@ import ( "io" "testing" - "github.com/gotestyourself/gotestyourself/assert" + "gotest.tools/assert" ) func TestGenerateEmptyFile(t *testing.T) { diff --git a/pkg/authorization/api_test.go b/pkg/authorization/api_test.go index 84964d2c5e866..ff364fd0bcfd0 100644 --- a/pkg/authorization/api_test.go +++ b/pkg/authorization/api_test.go @@ -11,8 +11,8 @@ import ( "testing" "time" - "github.com/gotestyourself/gotestyourself/assert" - is "github.com/gotestyourself/gotestyourself/assert/cmp" + "gotest.tools/assert" + is "gotest.tools/assert/cmp" ) func TestPeerCertificateMarshalJSON(t *testing.T) { diff --git a/pkg/authorization/middleware_test.go b/pkg/authorization/middleware_test.go index e32e4bf4279d7..6afafe082d3ba 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" - "github.com/gotestyourself/gotestyourself/assert" + "gotest.tools/assert" ) func TestMiddleware(t *testing.T) { diff --git a/pkg/authorization/middleware_unix_test.go b/pkg/authorization/middleware_unix_test.go index 6d1a4284602b9..450e7fbbb7375 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" - "github.com/gotestyourself/gotestyourself/assert" - is "github.com/gotestyourself/gotestyourself/assert/cmp" + "gotest.tools/assert" + is "gotest.tools/assert/cmp" ) func TestMiddlewareWrapHandler(t *testing.T) { diff --git a/pkg/chrootarchive/archive_test.go b/pkg/chrootarchive/archive_test.go index 3851d7224e5b8..5911a36158bf6 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" - "github.com/gotestyourself/gotestyourself/skip" + "gotest.tools/skip" ) func init() { diff --git a/pkg/fileutils/fileutils_test.go b/pkg/fileutils/fileutils_test.go index b167538d5a121..4b5f129a50afd 100644 --- a/pkg/fileutils/fileutils_test.go +++ b/pkg/fileutils/fileutils_test.go @@ -10,8 +10,8 @@ import ( "strings" "testing" - "github.com/gotestyourself/gotestyourself/assert" - is "github.com/gotestyourself/gotestyourself/assert/cmp" + "gotest.tools/assert" + is "gotest.tools/assert/cmp" ) // CopyFile with invalid src diff --git a/pkg/idtools/idtools_unix_test.go b/pkg/idtools/idtools_unix_test.go index 7d8c9715e238a..608000a66b207 100644 --- a/pkg/idtools/idtools_unix_test.go +++ b/pkg/idtools/idtools_unix_test.go @@ -10,10 +10,10 @@ import ( "path/filepath" "testing" - "github.com/gotestyourself/gotestyourself/assert" - is "github.com/gotestyourself/gotestyourself/assert/cmp" - "github.com/gotestyourself/gotestyourself/skip" "golang.org/x/sys/unix" + "gotest.tools/assert" + is "gotest.tools/assert/cmp" + "gotest.tools/skip" ) const ( diff --git a/pkg/ioutils/readers_test.go b/pkg/ioutils/readers_test.go index e424054aa76c9..e645c78d83b1c 100644 --- a/pkg/ioutils/readers_test.go +++ b/pkg/ioutils/readers_test.go @@ -8,8 +8,8 @@ import ( "testing" "time" - "github.com/gotestyourself/gotestyourself/assert" - is "github.com/gotestyourself/gotestyourself/assert/cmp" + "gotest.tools/assert" + is "gotest.tools/assert/cmp" ) // Implement io.Reader diff --git a/pkg/jsonmessage/jsonmessage_test.go b/pkg/jsonmessage/jsonmessage_test.go index f9ead207cab46..223d9c7f5a821 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" - "github.com/gotestyourself/gotestyourself/assert" - is "github.com/gotestyourself/gotestyourself/assert/cmp" + "gotest.tools/assert" + is "gotest.tools/assert/cmp" ) func TestError(t *testing.T) { diff --git a/pkg/mount/mountinfo_linux_test.go b/pkg/mount/mountinfo_linux_test.go index f8acb9eeae702..64411ccaef1df 100644 --- a/pkg/mount/mountinfo_linux_test.go +++ b/pkg/mount/mountinfo_linux_test.go @@ -6,7 +6,7 @@ import ( "bytes" "testing" - "github.com/gotestyourself/gotestyourself/assert" + "gotest.tools/assert" ) const ( diff --git a/pkg/plugins/client_test.go b/pkg/plugins/client_test.go index d420010f1a1a5..c3a4892272cd0 100644 --- a/pkg/plugins/client_test.go +++ b/pkg/plugins/client_test.go @@ -14,9 +14,9 @@ import ( "github.com/docker/docker/pkg/plugins/transport" "github.com/docker/go-connections/tlsconfig" - "github.com/gotestyourself/gotestyourself/assert" - is "github.com/gotestyourself/gotestyourself/assert/cmp" "github.com/pkg/errors" + "gotest.tools/assert" + is "gotest.tools/assert/cmp" ) var ( diff --git a/pkg/plugins/discovery_unix_test.go b/pkg/plugins/discovery_unix_test.go index 2c718d8beedad..b4aefc83e488a 100644 --- a/pkg/plugins/discovery_unix_test.go +++ b/pkg/plugins/discovery_unix_test.go @@ -11,7 +11,7 @@ import ( "reflect" "testing" - "github.com/gotestyourself/gotestyourself/assert" + "gotest.tools/assert" ) func TestLocalSocket(t *testing.T) { diff --git a/pkg/plugins/plugin_test.go b/pkg/plugins/plugin_test.go index ca8d5984007cd..ce98078f87c17 100644 --- a/pkg/plugins/plugin_test.go +++ b/pkg/plugins/plugin_test.go @@ -14,8 +14,8 @@ import ( "github.com/docker/docker/pkg/plugins/transport" "github.com/docker/go-connections/tlsconfig" - "github.com/gotestyourself/gotestyourself/assert" "github.com/pkg/errors" + "gotest.tools/assert" ) const ( diff --git a/pkg/plugins/transport/http_test.go b/pkg/plugins/transport/http_test.go index 081f60424d68f..78ab23724b88d 100644 --- a/pkg/plugins/transport/http_test.go +++ b/pkg/plugins/transport/http_test.go @@ -5,8 +5,8 @@ import ( "net/http" "testing" - "github.com/gotestyourself/gotestyourself/assert" - is "github.com/gotestyourself/gotestyourself/assert/cmp" + "gotest.tools/assert" + is "gotest.tools/assert/cmp" ) func TestHTTPTransport(t *testing.T) { diff --git a/pkg/pools/pools_test.go b/pkg/pools/pools_test.go index 76015169d42b2..7ff01ce3d5c85 100644 --- a/pkg/pools/pools_test.go +++ b/pkg/pools/pools_test.go @@ -7,8 +7,8 @@ import ( "strings" "testing" - "github.com/gotestyourself/gotestyourself/assert" - is "github.com/gotestyourself/gotestyourself/assert/cmp" + "gotest.tools/assert" + is "gotest.tools/assert/cmp" ) func TestBufioReaderPoolGetWithNoReaderShouldCreateOne(t *testing.T) { diff --git a/pkg/reexec/reexec_test.go b/pkg/reexec/reexec_test.go index 90aa01a390fd5..44675e7b6378b 100644 --- a/pkg/reexec/reexec_test.go +++ b/pkg/reexec/reexec_test.go @@ -5,7 +5,7 @@ import ( "os/exec" "testing" - "github.com/gotestyourself/gotestyourself/assert" + "gotest.tools/assert" ) func init() { diff --git a/pkg/signal/signal_linux_test.go b/pkg/signal/signal_linux_test.go index 71c577ed64aaa..9a021e2164319 100644 --- a/pkg/signal/signal_linux_test.go +++ b/pkg/signal/signal_linux_test.go @@ -8,8 +8,8 @@ import ( "testing" "time" - "github.com/gotestyourself/gotestyourself/assert" - is "github.com/gotestyourself/gotestyourself/assert/cmp" + "gotest.tools/assert" + is "gotest.tools/assert/cmp" ) func TestCatchAll(t *testing.T) { diff --git a/pkg/signal/signal_test.go b/pkg/signal/signal_test.go index bbf3736fc8c19..0bfcf6ce448dd 100644 --- a/pkg/signal/signal_test.go +++ b/pkg/signal/signal_test.go @@ -4,8 +4,8 @@ import ( "syscall" "testing" - "github.com/gotestyourself/gotestyourself/assert" - is "github.com/gotestyourself/gotestyourself/assert/cmp" + "gotest.tools/assert" + is "gotest.tools/assert/cmp" ) func TestParseSignal(t *testing.T) { diff --git a/pkg/signal/trap_linux_test.go b/pkg/signal/trap_linux_test.go index a3afe7a7b6895..14d1543117b15 100644 --- a/pkg/signal/trap_linux_test.go +++ b/pkg/signal/trap_linux_test.go @@ -10,8 +10,8 @@ import ( "syscall" "testing" - "github.com/gotestyourself/gotestyourself/assert" - is "github.com/gotestyourself/gotestyourself/assert/cmp" + "gotest.tools/assert" + is "gotest.tools/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 172d568bda0c9..4399a6509b444 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" - "github.com/gotestyourself/gotestyourself/assert" - is "github.com/gotestyourself/gotestyourself/assert/cmp" + "gotest.tools/assert" + is "gotest.tools/assert/cmp" ) func TestRawProgressFormatterFormatStatus(t *testing.T) { diff --git a/pkg/streamformatter/streamwriter_test.go b/pkg/streamformatter/streamwriter_test.go index b74d6fb2d3435..5b679f2cf4822 100644 --- a/pkg/streamformatter/streamwriter_test.go +++ b/pkg/streamformatter/streamwriter_test.go @@ -4,8 +4,8 @@ import ( "bytes" "testing" - "github.com/gotestyourself/gotestyourself/assert" - is "github.com/gotestyourself/gotestyourself/assert/cmp" + "gotest.tools/assert" + is "gotest.tools/assert/cmp" ) func TestStreamWriterStdout(t *testing.T) { diff --git a/pkg/sysinfo/sysinfo_linux_test.go b/pkg/sysinfo/sysinfo_linux_test.go index e8a12a35c9a44..13a07fbce93cf 100644 --- a/pkg/sysinfo/sysinfo_linux_test.go +++ b/pkg/sysinfo/sysinfo_linux_test.go @@ -7,8 +7,8 @@ import ( "path/filepath" "testing" - "github.com/gotestyourself/gotestyourself/assert" "golang.org/x/sys/unix" + "gotest.tools/assert" ) func TestReadProcBool(t *testing.T) { diff --git a/pkg/system/rm_test.go b/pkg/system/rm_test.go index 19dc42cba9496..0448aac619de1 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" - "github.com/gotestyourself/gotestyourself/skip" + "gotest.tools/skip" ) func TestEnsureRemoveAllNotExist(t *testing.T) { diff --git a/pkg/system/stat_unix_test.go b/pkg/system/stat_unix_test.go index fd68a9665652d..44e048f2a7230 100644 --- a/pkg/system/stat_unix_test.go +++ b/pkg/system/stat_unix_test.go @@ -7,7 +7,7 @@ import ( "syscall" "testing" - "github.com/gotestyourself/gotestyourself/assert" + "gotest.tools/assert" ) // TestFromStatT tests fromStatT for a tempfile diff --git a/pkg/tarsum/tarsum_test.go b/pkg/tarsum/tarsum_test.go index e1b38a6a1bc07..435b91c780648 100644 --- a/pkg/tarsum/tarsum_test.go +++ b/pkg/tarsum/tarsum_test.go @@ -17,8 +17,8 @@ import ( "strings" "testing" - "github.com/gotestyourself/gotestyourself/assert" - is "github.com/gotestyourself/gotestyourself/assert/cmp" + "gotest.tools/assert" + is "gotest.tools/assert/cmp" ) type testLayer struct { diff --git a/pkg/term/ascii_test.go b/pkg/term/ascii_test.go index 321d1b87de3ba..665ab1552ff04 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" - "github.com/gotestyourself/gotestyourself/assert" - is "github.com/gotestyourself/gotestyourself/assert/cmp" + "gotest.tools/assert" + is "gotest.tools/assert/cmp" ) func TestToBytes(t *testing.T) { diff --git a/pkg/term/proxy_test.go b/pkg/term/proxy_test.go index 72f53e58d15c1..df588fe15bb00 100644 --- a/pkg/term/proxy_test.go +++ b/pkg/term/proxy_test.go @@ -5,8 +5,8 @@ import ( "fmt" "testing" - "github.com/gotestyourself/gotestyourself/assert" - is "github.com/gotestyourself/gotestyourself/assert/cmp" + "gotest.tools/assert" + is "gotest.tools/assert/cmp" ) func TestEscapeProxyRead(t *testing.T) { diff --git a/pkg/term/term_linux_test.go b/pkg/term/term_linux_test.go index 4f1d67586f1ec..272395a10ea46 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" - "github.com/gotestyourself/gotestyourself/assert" + "gotest.tools/assert" ) // RequiresRoot skips tests that require root, unless the test.root flag has diff --git a/plugin/executor/containerd/containerd_test.go b/plugin/executor/containerd/containerd_test.go index d9185a05e1c54..e27063b1d81f9 100644 --- a/plugin/executor/containerd/containerd_test.go +++ b/plugin/executor/containerd/containerd_test.go @@ -9,9 +9,9 @@ import ( "time" "github.com/docker/docker/libcontainerd" - "github.com/gotestyourself/gotestyourself/assert" "github.com/opencontainers/runtime-spec/specs-go" "github.com/pkg/errors" + "gotest.tools/assert" ) func TestLifeCycle(t *testing.T) { diff --git a/plugin/manager_linux_test.go b/plugin/manager_linux_test.go index 740efd7a3ab56..fd8fa8523c23a 100644 --- a/plugin/manager_linux_test.go +++ b/plugin/manager_linux_test.go @@ -13,9 +13,9 @@ import ( "github.com/docker/docker/pkg/stringid" "github.com/docker/docker/pkg/system" "github.com/docker/docker/plugin/v2" - "github.com/gotestyourself/gotestyourself/skip" "github.com/opencontainers/runtime-spec/specs-go" "github.com/pkg/errors" + "gotest.tools/skip" ) func TestManagerWithPluginMounts(t *testing.T) { diff --git a/reference/store_test.go b/reference/store_test.go index 71f1d96e59e32..1ce674cbfbbd6 100644 --- a/reference/store_test.go +++ b/reference/store_test.go @@ -9,9 +9,9 @@ import ( "testing" "github.com/docker/distribution/reference" - "github.com/gotestyourself/gotestyourself/assert" - is "github.com/gotestyourself/gotestyourself/assert/cmp" "github.com/opencontainers/go-digest" + "gotest.tools/assert" + is "gotest.tools/assert/cmp" ) var ( diff --git a/registry/config_test.go b/registry/config_test.go index 2f9c9548eaf0b..30a257e325563 100644 --- a/registry/config_test.go +++ b/registry/config_test.go @@ -6,8 +6,8 @@ import ( "strings" "testing" - "github.com/gotestyourself/gotestyourself/assert" - is "github.com/gotestyourself/gotestyourself/assert/cmp" + "gotest.tools/assert" + is "gotest.tools/assert/cmp" ) func TestLoadAllowNondistributableArtifacts(t *testing.T) { diff --git a/registry/registry_test.go b/registry/registry_test.go index ec112523949c4..b7459471b3f64 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" - "github.com/gotestyourself/gotestyourself/assert" - "github.com/gotestyourself/gotestyourself/skip" + "gotest.tools/assert" + "gotest.tools/skip" ) var ( diff --git a/registry/resumable/resumablerequestreader_test.go b/registry/resumable/resumablerequestreader_test.go index bd3d55885fb00..c72c210e776e2 100644 --- a/registry/resumable/resumablerequestreader_test.go +++ b/registry/resumable/resumablerequestreader_test.go @@ -10,8 +10,8 @@ import ( "testing" "time" - "github.com/gotestyourself/gotestyourself/assert" - is "github.com/gotestyourself/gotestyourself/assert/cmp" + "gotest.tools/assert" + is "gotest.tools/assert/cmp" ) func TestResumableRequestHeaderSimpleErrors(t *testing.T) { diff --git a/registry/service_v1_test.go b/registry/service_v1_test.go index 590a653c3666b..11861f7c05296 100644 --- a/registry/service_v1_test.go +++ b/registry/service_v1_test.go @@ -4,7 +4,7 @@ import ( "os" "testing" - "github.com/gotestyourself/gotestyourself/skip" + "gotest.tools/skip" ) func TestLookupV1Endpoints(t *testing.T) { diff --git a/runconfig/config_test.go b/runconfig/config_test.go index 58e3a9f788474..67d386969f4da 100644 --- a/runconfig/config_test.go +++ b/runconfig/config_test.go @@ -12,8 +12,8 @@ import ( "github.com/docker/docker/api/types/container" networktypes "github.com/docker/docker/api/types/network" "github.com/docker/docker/api/types/strslice" - "github.com/gotestyourself/gotestyourself/assert" - is "github.com/gotestyourself/gotestyourself/assert/cmp" + "gotest.tools/assert" + is "gotest.tools/assert/cmp" ) type f struct { diff --git a/runconfig/hostconfig_test.go b/runconfig/hostconfig_test.go index d2482fbe7b87c..b04cbc6bc3e65 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" - "github.com/gotestyourself/gotestyourself/assert" - is "github.com/gotestyourself/gotestyourself/assert/cmp" + "gotest.tools/assert" + is "gotest.tools/assert/cmp" ) // TODO Windows: This will need addressing for a Windows daemon. diff --git a/vendor.conf b/vendor.conf index fec149eb814f2..3bd09b11a1115 100644 --- a/vendor.conf +++ b/vendor.conf @@ -18,7 +18,6 @@ golang.org/x/sys 37707fdb30a5b38865cfb95e5aab41707daec7fd github.com/docker/go-units 9e638d38cf6977a37a8ea0078f3ee75a7cdb2dd1 github.com/docker/go-connections 7beb39f0b969b075d1325fecb092faf27fd357b6 golang.org/x/text f72d8390a633d5dfb0cc84043294db9f6c935756 -github.com/pmezard/go-difflib v1.0.0 gotest.tools v2.1.0 github.com/google/go-cmp v0.2.0 diff --git a/volume/local/local_test.go b/volume/local/local_test.go index 541b8448aa0ab..4cb47ba045229 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" - "github.com/gotestyourself/gotestyourself/skip" + "gotest.tools/skip" ) func TestGetAddress(t *testing.T) { diff --git a/volume/service/db_test.go b/volume/service/db_test.go index 14ad87a514c3f..4cac9176b75d0 100644 --- a/volume/service/db_test.go +++ b/volume/service/db_test.go @@ -8,8 +8,8 @@ import ( "time" "github.com/boltdb/bolt" - "github.com/gotestyourself/gotestyourself/assert" - is "github.com/gotestyourself/gotestyourself/assert/cmp" + "gotest.tools/assert" + is "gotest.tools/assert/cmp" ) func TestSetGetMeta(t *testing.T) { diff --git a/volume/service/restore_test.go b/volume/service/restore_test.go index d3c6c9f92ced1..95420d9586a55 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" - "github.com/gotestyourself/gotestyourself/assert" + "gotest.tools/assert" ) func TestRestore(t *testing.T) { diff --git a/volume/service/service_linux_test.go b/volume/service/service_linux_test.go index 6c1f936b6abf8..ae70d7e2c5f99 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" - "github.com/gotestyourself/gotestyourself/assert" - is "github.com/gotestyourself/gotestyourself/assert/cmp" + "gotest.tools/assert" + is "gotest.tools/assert/cmp" ) func TestLocalVolumeSize(t *testing.T) { diff --git a/volume/service/service_test.go b/volume/service/service_test.go index 3c4130eab5677..870d19f8a0abe 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" - "github.com/gotestyourself/gotestyourself/assert" - is "github.com/gotestyourself/gotestyourself/assert/cmp" + "gotest.tools/assert" + is "gotest.tools/assert/cmp" ) func TestServiceCreate(t *testing.T) { diff --git a/volume/service/store_test.go b/volume/service/store_test.go index b6b0829952223..53345f318bb51 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" - "github.com/gotestyourself/gotestyourself/assert" - is "github.com/gotestyourself/gotestyourself/assert/cmp" + "gotest.tools/assert" + is "gotest.tools/assert/cmp" ) func TestCreate(t *testing.T) {