diff --git a/archive/issues_test.go b/archive/issues_test.go index af2418d275df..9d54c7cad6a7 100644 --- a/archive/issues_test.go +++ b/archive/issues_test.go @@ -26,7 +26,7 @@ import ( "testing" "github.com/containerd/containerd/archive/compression" - "github.com/containerd/containerd/testutil" + "github.com/containerd/containerd/pkg/testutil" ) // TestPrefixHeaderReadable tests that files that could be created with the diff --git a/client_test.go b/client_test.go index 842b1a47524a..e726a54a7f69 100644 --- a/client_test.go +++ b/client_test.go @@ -33,9 +33,9 @@ import ( "github.com/containerd/containerd/images" "github.com/containerd/containerd/log" "github.com/containerd/containerd/namespaces" + "github.com/containerd/containerd/pkg/testutil" "github.com/containerd/containerd/platforms" "github.com/containerd/containerd/sys" - "github.com/containerd/containerd/testutil" "github.com/sirupsen/logrus" ) diff --git a/content/local/store_test.go b/content/local/store_test.go index b9ed2e270c94..c78e64cc0b9e 100644 --- a/content/local/store_test.go +++ b/content/local/store_test.go @@ -36,7 +36,7 @@ import ( "github.com/containerd/containerd/content" "github.com/containerd/containerd/content/testsuite" - "github.com/containerd/containerd/testutil" + "github.com/containerd/containerd/pkg/testutil" "github.com/gotestyourself/gotestyourself/assert" "github.com/opencontainers/go-digest" ) diff --git a/content/testsuite/testsuite.go b/content/testsuite/testsuite.go index 65865d451302..86bdde6b2b7c 100644 --- a/content/testsuite/testsuite.go +++ b/content/testsuite/testsuite.go @@ -30,7 +30,7 @@ import ( "time" "github.com/containerd/containerd/content" - "github.com/containerd/containerd/testutil" + "github.com/containerd/containerd/pkg/testutil" "github.com/gotestyourself/gotestyourself/assert" digest "github.com/opencontainers/go-digest" "github.com/pkg/errors" diff --git a/daemon_config_linux_test.go b/daemon_config_linux_test.go index cbb6454a0231..d3241f990b36 100644 --- a/daemon_config_linux_test.go +++ b/daemon_config_linux_test.go @@ -29,8 +29,8 @@ import ( "time" "github.com/containerd/containerd/oci" + "github.com/containerd/containerd/pkg/testutil" "github.com/containerd/containerd/server" - "github.com/containerd/containerd/testutil" ) // the following nolint is for shutting up gometalinter on non-linux. diff --git a/metadata/snapshot_test.go b/metadata/snapshot_test.go index e7bedbd5537a..f464acd10bbc 100644 --- a/metadata/snapshot_test.go +++ b/metadata/snapshot_test.go @@ -24,10 +24,10 @@ import ( "testing" "github.com/boltdb/bolt" + "github.com/containerd/containerd/pkg/testutil" "github.com/containerd/containerd/snapshots" "github.com/containerd/containerd/snapshots/native" "github.com/containerd/containerd/snapshots/testsuite" - "github.com/containerd/containerd/testutil" ) func newTestSnapshotter(ctx context.Context, root string) (snapshots.Snapshotter, func() error, error) { diff --git a/mount/lookup_test/lookup_linux_test.go b/mount/lookup_test/lookup_linux_test.go index 7d7db2223713..4a0b5e691d73 100644 --- a/mount/lookup_test/lookup_linux_test.go +++ b/mount/lookup_test/lookup_linux_test.go @@ -19,7 +19,7 @@ // FIXME: we can't put this test to the mount package: // import cycle not allowed in test // package github.com/containerd/containerd/mount (test) -// imports github.com/containerd/containerd/testutil +// imports github.com/containerd/containerd/pkg/testutil // imports github.com/containerd/containerd/mount // // NOTE: we can't have this as lookup_test (compilation fails) @@ -35,7 +35,7 @@ import ( "testing" "github.com/containerd/containerd/mount" - "github.com/containerd/containerd/testutil" + "github.com/containerd/containerd/pkg/testutil" "github.com/gotestyourself/gotestyourself/assert" ) diff --git a/testutil/helpers.go b/pkg/testutil/helpers.go similarity index 100% rename from testutil/helpers.go rename to pkg/testutil/helpers.go diff --git a/testutil/helpers_unix.go b/pkg/testutil/helpers_unix.go similarity index 100% rename from testutil/helpers_unix.go rename to pkg/testutil/helpers_unix.go diff --git a/testutil/helpers_windows.go b/pkg/testutil/helpers_windows.go similarity index 100% rename from testutil/helpers_windows.go rename to pkg/testutil/helpers_windows.go diff --git a/testutil/loopback_linux.go b/pkg/testutil/loopback_linux.go similarity index 100% rename from testutil/loopback_linux.go rename to pkg/testutil/loopback_linux.go diff --git a/testutil/mount_linux.go b/pkg/testutil/mount_linux.go similarity index 100% rename from testutil/mount_linux.go rename to pkg/testutil/mount_linux.go diff --git a/testutil/mount_other.go b/pkg/testutil/mount_other.go similarity index 100% rename from testutil/mount_other.go rename to pkg/testutil/mount_other.go diff --git a/snapshots/btrfs/btrfs_test.go b/snapshots/btrfs/btrfs_test.go index 12374efee05f..02b357bc1021 100644 --- a/snapshots/btrfs/btrfs_test.go +++ b/snapshots/btrfs/btrfs_test.go @@ -28,9 +28,9 @@ import ( "testing" "github.com/containerd/containerd/mount" + "github.com/containerd/containerd/pkg/testutil" "github.com/containerd/containerd/snapshots" "github.com/containerd/containerd/snapshots/testsuite" - "github.com/containerd/containerd/testutil" "github.com/pkg/errors" "golang.org/x/sys/unix" ) diff --git a/snapshots/native/native_test.go b/snapshots/native/native_test.go index b49072fd1252..79e02637d332 100644 --- a/snapshots/native/native_test.go +++ b/snapshots/native/native_test.go @@ -21,9 +21,9 @@ import ( "runtime" "testing" + "github.com/containerd/containerd/pkg/testutil" "github.com/containerd/containerd/snapshots" "github.com/containerd/containerd/snapshots/testsuite" - "github.com/containerd/containerd/testutil" ) func newSnapshotter(ctx context.Context, root string) (snapshots.Snapshotter, func() error, error) { diff --git a/snapshots/overlay/check_test.go b/snapshots/overlay/check_test.go index 2f83939dcdcc..d394b952295a 100644 --- a/snapshots/overlay/check_test.go +++ b/snapshots/overlay/check_test.go @@ -24,7 +24,7 @@ import ( "os/exec" "testing" - "github.com/containerd/containerd/testutil" + "github.com/containerd/containerd/pkg/testutil" ) func testOverlaySupported(t testing.TB, expected bool, mkfs ...string) { diff --git a/snapshots/overlay/overlay_test.go b/snapshots/overlay/overlay_test.go index 67149b15e78b..17f555d55a8b 100644 --- a/snapshots/overlay/overlay_test.go +++ b/snapshots/overlay/overlay_test.go @@ -28,10 +28,10 @@ import ( "testing" "github.com/containerd/containerd/mount" + "github.com/containerd/containerd/pkg/testutil" "github.com/containerd/containerd/snapshots" "github.com/containerd/containerd/snapshots/storage" "github.com/containerd/containerd/snapshots/testsuite" - "github.com/containerd/containerd/testutil" ) func newSnapshotter(ctx context.Context, root string) (snapshots.Snapshotter, func() error, error) { diff --git a/snapshots/storage/bolt_test.go b/snapshots/storage/bolt_test.go index 3f5768d31689..838f7aa9faff 100644 --- a/snapshots/storage/bolt_test.go +++ b/snapshots/storage/bolt_test.go @@ -22,7 +22,7 @@ import ( // Does not require root but flag must be defined for snapshot tests - _ "github.com/containerd/containerd/testutil" + _ "github.com/containerd/containerd/pkg/testutil" ) func TestMetastore(t *testing.T) { diff --git a/snapshots/testsuite/testsuite.go b/snapshots/testsuite/testsuite.go index 65ea93a07f19..2c6f208619b5 100644 --- a/snapshots/testsuite/testsuite.go +++ b/snapshots/testsuite/testsuite.go @@ -29,8 +29,8 @@ import ( "github.com/containerd/containerd/errdefs" "github.com/containerd/containerd/mount" "github.com/containerd/containerd/namespaces" + "github.com/containerd/containerd/pkg/testutil" "github.com/containerd/containerd/snapshots" - "github.com/containerd/containerd/testutil" "github.com/containerd/continuity/fs/fstest" "github.com/gotestyourself/gotestyourself/assert" is "github.com/gotestyourself/gotestyourself/assert/cmp"