diff --git a/core/content/testsuite/testsuite.go b/core/content/testsuite/testsuite.go index 6d728ef11..c93a62c77 100644 --- a/core/content/testsuite/testsuite.go +++ b/core/content/testsuite/testsuite.go @@ -29,8 +29,8 @@ import ( "time" "github.com/containerd/containerd/v2/core/content" + "github.com/containerd/containerd/v2/internal/testutil" "github.com/containerd/containerd/v2/pkg/errdefs" - "github.com/containerd/containerd/v2/pkg/testutil" "github.com/containerd/log/logtest" "github.com/opencontainers/go-digest" ocispec "github.com/opencontainers/image-spec/specs-go/v1" diff --git a/core/metadata/snapshot_test.go b/core/metadata/snapshot_test.go index ce99a7baa..261dc35ed 100644 --- a/core/metadata/snapshot_test.go +++ b/core/metadata/snapshot_test.go @@ -30,10 +30,10 @@ import ( "github.com/containerd/containerd/v2/core/mount" "github.com/containerd/containerd/v2/core/snapshots" "github.com/containerd/containerd/v2/core/snapshots/testsuite" + "github.com/containerd/containerd/v2/internal/testutil" "github.com/containerd/containerd/v2/pkg/errdefs" "github.com/containerd/containerd/v2/pkg/filters" "github.com/containerd/containerd/v2/pkg/namespaces" - "github.com/containerd/containerd/v2/pkg/testutil" "github.com/containerd/containerd/v2/plugins/snapshots/native" bolt "go.etcd.io/bbolt" ) diff --git a/core/snapshots/storage/bolt_test.go b/core/snapshots/storage/bolt_test.go index afef0f14a..4fe26b075 100644 --- a/core/snapshots/storage/bolt_test.go +++ b/core/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/v2/pkg/testutil" + _ "github.com/containerd/containerd/v2/internal/testutil" ) func TestMetastore(t *testing.T) { diff --git a/core/snapshots/testsuite/testsuite.go b/core/snapshots/testsuite/testsuite.go index 54570c5d9..1495a0a6f 100644 --- a/core/snapshots/testsuite/testsuite.go +++ b/core/snapshots/testsuite/testsuite.go @@ -31,9 +31,9 @@ import ( "github.com/containerd/containerd/v2/core/mount" "github.com/containerd/containerd/v2/core/snapshots" "github.com/containerd/containerd/v2/internal/randutil" + "github.com/containerd/containerd/v2/internal/testutil" "github.com/containerd/containerd/v2/pkg/errdefs" "github.com/containerd/containerd/v2/pkg/namespaces" - "github.com/containerd/containerd/v2/pkg/testutil" "github.com/containerd/continuity/fs/fstest" "github.com/containerd/log/logtest" "github.com/stretchr/testify/assert" diff --git a/integration/client/client_test.go b/integration/client/client_test.go index 8fcec91a2..5b29a0a3e 100644 --- a/integration/client/client_test.go +++ b/integration/client/client_test.go @@ -37,9 +37,9 @@ import ( "github.com/containerd/containerd/v2/core/leases" "github.com/containerd/containerd/v2/defaults" imagelist "github.com/containerd/containerd/v2/integration/images" + "github.com/containerd/containerd/v2/internal/testutil" "github.com/containerd/containerd/v2/pkg/errdefs" "github.com/containerd/containerd/v2/pkg/namespaces" - "github.com/containerd/containerd/v2/pkg/testutil" "github.com/containerd/containerd/v2/platforms" "github.com/containerd/log" ) diff --git a/integration/client/restart_monitor_test.go b/integration/client/restart_monitor_test.go index d8e1092dc..a7c52a573 100644 --- a/integration/client/restart_monitor_test.go +++ b/integration/client/restart_monitor_test.go @@ -34,8 +34,8 @@ import ( eventtypes "github.com/containerd/containerd/v2/api/events" . "github.com/containerd/containerd/v2/client" srvconfig "github.com/containerd/containerd/v2/cmd/containerd/server/config" + "github.com/containerd/containerd/v2/internal/testutil" "github.com/containerd/containerd/v2/pkg/oci" - "github.com/containerd/containerd/v2/pkg/testutil" "github.com/containerd/containerd/v2/runtime/restart" "github.com/containerd/typeurl/v2" "github.com/stretchr/testify/require" diff --git a/pkg/testutil/helpers.go b/internal/testutil/helpers.go similarity index 100% rename from pkg/testutil/helpers.go rename to internal/testutil/helpers.go diff --git a/pkg/testutil/helpers_unix.go b/internal/testutil/helpers_unix.go similarity index 100% rename from pkg/testutil/helpers_unix.go rename to internal/testutil/helpers_unix.go diff --git a/pkg/testutil/helpers_windows.go b/internal/testutil/helpers_windows.go similarity index 100% rename from pkg/testutil/helpers_windows.go rename to internal/testutil/helpers_windows.go diff --git a/pkg/archive/issues_test.go b/pkg/archive/issues_test.go index e2a469ba6..c526a3c3b 100644 --- a/pkg/archive/issues_test.go +++ b/pkg/archive/issues_test.go @@ -24,8 +24,8 @@ import ( "strings" "testing" + "github.com/containerd/containerd/v2/internal/testutil" "github.com/containerd/containerd/v2/pkg/archive/compression" - "github.com/containerd/containerd/v2/pkg/testutil" ) // TestPrefixHeaderReadable tests that files that could be created with the diff --git a/pkg/archive/tar_linux_test.go b/pkg/archive/tar_linux_test.go index c5e0b5af7..495e19bee 100644 --- a/pkg/archive/tar_linux_test.go +++ b/pkg/archive/tar_linux_test.go @@ -26,7 +26,7 @@ import ( "testing" "github.com/containerd/containerd/v2/core/mount" - "github.com/containerd/containerd/v2/pkg/testutil" + "github.com/containerd/containerd/v2/internal/testutil" "github.com/containerd/containerd/v2/plugins/snapshots/overlay/overlayutils" "github.com/containerd/continuity/fs" "github.com/containerd/continuity/fs/fstest" diff --git a/pkg/archive/tar_test.go b/pkg/archive/tar_test.go index 5f322675b..3e677d03e 100644 --- a/pkg/archive/tar_test.go +++ b/pkg/archive/tar_test.go @@ -33,8 +33,8 @@ import ( "testing" "time" + "github.com/containerd/containerd/v2/internal/testutil" "github.com/containerd/containerd/v2/pkg/archive/tartest" - "github.com/containerd/containerd/v2/pkg/testutil" "github.com/containerd/continuity/fs" "github.com/containerd/continuity/fs/fstest" "github.com/opencontainers/go-digest" diff --git a/pkg/oci/spec_opts_linux_test.go b/pkg/oci/spec_opts_linux_test.go index 9299fa180..d6890e785 100644 --- a/pkg/oci/spec_opts_linux_test.go +++ b/pkg/oci/spec_opts_linux_test.go @@ -24,8 +24,8 @@ import ( "testing" "github.com/containerd/containerd/v2/core/containers" + "github.com/containerd/containerd/v2/internal/testutil" "github.com/containerd/containerd/v2/pkg/cap" - "github.com/containerd/containerd/v2/pkg/testutil" "github.com/containerd/continuity/fs/fstest" specs "github.com/opencontainers/runtime-spec/specs-go" "github.com/stretchr/testify/assert" diff --git a/pkg/oci/spec_test.go b/pkg/oci/spec_test.go index 5e0a48986..418cafdff 100644 --- a/pkg/oci/spec_test.go +++ b/pkg/oci/spec_test.go @@ -24,8 +24,8 @@ import ( "github.com/opencontainers/runtime-spec/specs-go" "github.com/containerd/containerd/v2/core/containers" + "github.com/containerd/containerd/v2/internal/testutil" "github.com/containerd/containerd/v2/pkg/namespaces" - "github.com/containerd/containerd/v2/pkg/testutil" ) func TestGenerateSpec(t *testing.T) { diff --git a/plugins/content/local/store_test.go b/plugins/content/local/store_test.go index 73409df15..905d81bd0 100644 --- a/plugins/content/local/store_test.go +++ b/plugins/content/local/store_test.go @@ -35,8 +35,8 @@ import ( "github.com/containerd/containerd/v2/core/content" "github.com/containerd/containerd/v2/core/content/testsuite" "github.com/containerd/containerd/v2/internal/randutil" + "github.com/containerd/containerd/v2/internal/testutil" "github.com/containerd/containerd/v2/pkg/errdefs" - "github.com/containerd/containerd/v2/pkg/testutil" "github.com/opencontainers/go-digest" ocispec "github.com/opencontainers/image-spec/specs-go/v1" diff --git a/plugins/snapshots/blockfile/blockfile_test.go b/plugins/snapshots/blockfile/blockfile_test.go index 4fcf5c252..2adfd1639 100644 --- a/plugins/snapshots/blockfile/blockfile_test.go +++ b/plugins/snapshots/blockfile/blockfile_test.go @@ -22,7 +22,7 @@ import ( "github.com/containerd/containerd/v2/core/snapshots" "github.com/containerd/containerd/v2/core/snapshots/testsuite" - "github.com/containerd/containerd/v2/pkg/testutil" + "github.com/containerd/containerd/v2/internal/testutil" ) func newSnapshotter(t *testing.T) func(ctx context.Context, root string) (snapshots.Snapshotter, func() error, error) { diff --git a/plugins/snapshots/btrfs/btrfs_test.go b/plugins/snapshots/btrfs/btrfs_test.go index 8c80530fc..51c8d8f15 100644 --- a/plugins/snapshots/btrfs/btrfs_test.go +++ b/plugins/snapshots/btrfs/btrfs_test.go @@ -33,7 +33,7 @@ import ( "github.com/containerd/containerd/v2/core/mount" "github.com/containerd/containerd/v2/core/snapshots" "github.com/containerd/containerd/v2/core/snapshots/testsuite" - "github.com/containerd/containerd/v2/pkg/testutil" + "github.com/containerd/containerd/v2/internal/testutil" "github.com/containerd/continuity/testutil/loopback" "github.com/containerd/plugin" "golang.org/x/sys/unix" diff --git a/plugins/snapshots/devmapper/dmsetup/dmsetup_test.go b/plugins/snapshots/devmapper/dmsetup/dmsetup_test.go index 701147278..8c68a0744 100644 --- a/plugins/snapshots/devmapper/dmsetup/dmsetup_test.go +++ b/plugins/snapshots/devmapper/dmsetup/dmsetup_test.go @@ -24,7 +24,7 @@ import ( "testing" "github.com/containerd/containerd/v2/core/mount" - "github.com/containerd/containerd/v2/pkg/testutil" + "github.com/containerd/containerd/v2/internal/testutil" "github.com/docker/go-units" "github.com/stretchr/testify/assert" "golang.org/x/sys/unix" diff --git a/plugins/snapshots/devmapper/pool_device_test.go b/plugins/snapshots/devmapper/pool_device_test.go index 3c368a7e8..9649b00cf 100644 --- a/plugins/snapshots/devmapper/pool_device_test.go +++ b/plugins/snapshots/devmapper/pool_device_test.go @@ -28,7 +28,7 @@ import ( "time" "github.com/containerd/containerd/v2/core/mount" - "github.com/containerd/containerd/v2/pkg/testutil" + "github.com/containerd/containerd/v2/internal/testutil" "github.com/containerd/containerd/v2/plugins/snapshots/devmapper/dmsetup" "github.com/containerd/log" "github.com/docker/go-units" diff --git a/plugins/snapshots/devmapper/snapshotter_test.go b/plugins/snapshots/devmapper/snapshotter_test.go index fba424df2..fc5aec16c 100644 --- a/plugins/snapshots/devmapper/snapshotter_test.go +++ b/plugins/snapshots/devmapper/snapshotter_test.go @@ -32,8 +32,8 @@ import ( "github.com/containerd/containerd/v2/core/mount" "github.com/containerd/containerd/v2/core/snapshots" "github.com/containerd/containerd/v2/core/snapshots/testsuite" + "github.com/containerd/containerd/v2/internal/testutil" "github.com/containerd/containerd/v2/pkg/namespaces" - "github.com/containerd/containerd/v2/pkg/testutil" "github.com/containerd/containerd/v2/plugins/snapshots/devmapper/dmsetup" "github.com/containerd/log" ) diff --git a/plugins/snapshots/native/native_test.go b/plugins/snapshots/native/native_test.go index 1055cdbc9..6be5a5ba2 100644 --- a/plugins/snapshots/native/native_test.go +++ b/plugins/snapshots/native/native_test.go @@ -23,7 +23,7 @@ import ( "github.com/containerd/containerd/v2/core/snapshots" "github.com/containerd/containerd/v2/core/snapshots/testsuite" - "github.com/containerd/containerd/v2/pkg/testutil" + "github.com/containerd/containerd/v2/internal/testutil" ) func newSnapshotter(ctx context.Context, root string) (snapshots.Snapshotter, func() error, error) { diff --git a/plugins/snapshots/overlay/overlay_test.go b/plugins/snapshots/overlay/overlay_test.go index fa2f332a2..550f8a754 100644 --- a/plugins/snapshots/overlay/overlay_test.go +++ b/plugins/snapshots/overlay/overlay_test.go @@ -31,7 +31,7 @@ import ( "github.com/containerd/containerd/v2/core/snapshots" "github.com/containerd/containerd/v2/core/snapshots/storage" "github.com/containerd/containerd/v2/core/snapshots/testsuite" - "github.com/containerd/containerd/v2/pkg/testutil" + "github.com/containerd/containerd/v2/internal/testutil" "github.com/containerd/containerd/v2/plugins/snapshots/overlay/overlayutils" "github.com/opencontainers/runtime-spec/specs-go" ) diff --git a/plugins/snapshots/overlay/overlayutils/check_test.go b/plugins/snapshots/overlay/overlayutils/check_test.go index bb51376a3..db9bb463c 100644 --- a/plugins/snapshots/overlay/overlayutils/check_test.go +++ b/plugins/snapshots/overlay/overlayutils/check_test.go @@ -22,7 +22,7 @@ import ( "os/exec" "testing" - "github.com/containerd/containerd/v2/pkg/testutil" + "github.com/containerd/containerd/v2/internal/testutil" "github.com/containerd/continuity/testutil/loopback" ) diff --git a/plugins/snapshots/windows/windows_test.go b/plugins/snapshots/windows/windows_test.go index 457a72296..8a2f10117 100644 --- a/plugins/snapshots/windows/windows_test.go +++ b/plugins/snapshots/windows/windows_test.go @@ -25,7 +25,7 @@ import ( "github.com/containerd/containerd/v2/core/snapshots" "github.com/containerd/containerd/v2/core/snapshots/testsuite" - "github.com/containerd/containerd/v2/pkg/testutil" + "github.com/containerd/containerd/v2/internal/testutil" ) func newSnapshotter(ctx context.Context, root string) (snapshots.Snapshotter, func() error, error) { diff --git a/runtime/v2/bundle_linux_test.go b/runtime/v2/bundle_linux_test.go index c65cdbf91..377db1c5e 100644 --- a/runtime/v2/bundle_linux_test.go +++ b/runtime/v2/bundle_linux_test.go @@ -26,9 +26,9 @@ import ( "syscall" "testing" + "github.com/containerd/containerd/v2/internal/testutil" "github.com/containerd/containerd/v2/pkg/namespaces" "github.com/containerd/containerd/v2/pkg/oci" - "github.com/containerd/containerd/v2/pkg/testutil" "github.com/containerd/typeurl/v2" "github.com/opencontainers/runtime-spec/specs-go" "github.com/stretchr/testify/assert" diff --git a/runtime/v2/bundle_test.go b/runtime/v2/bundle_test.go index ea5d15462..096df28a7 100644 --- a/runtime/v2/bundle_test.go +++ b/runtime/v2/bundle_test.go @@ -19,5 +19,5 @@ package v2 import ( // When testutil is imported for one platform (bundle_linux_test.go) it // should be imported for all platforms. - _ "github.com/containerd/containerd/v2/pkg/testutil" + _ "github.com/containerd/containerd/v2/internal/testutil" )