Move testutils to pkg

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
Michael Crosby 2018-05-22 17:08:38 -04:00
parent 927517de36
commit 009ba4d797
19 changed files with 14 additions and 14 deletions

View File

@ -26,7 +26,7 @@ import (
"testing" "testing"
"github.com/containerd/containerd/archive/compression" "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 // TestPrefixHeaderReadable tests that files that could be created with the

View File

@ -33,9 +33,9 @@ import (
"github.com/containerd/containerd/images" "github.com/containerd/containerd/images"
"github.com/containerd/containerd/log" "github.com/containerd/containerd/log"
"github.com/containerd/containerd/namespaces" "github.com/containerd/containerd/namespaces"
"github.com/containerd/containerd/pkg/testutil"
"github.com/containerd/containerd/platforms" "github.com/containerd/containerd/platforms"
"github.com/containerd/containerd/sys" "github.com/containerd/containerd/sys"
"github.com/containerd/containerd/testutil"
"github.com/sirupsen/logrus" "github.com/sirupsen/logrus"
) )

View File

@ -36,7 +36,7 @@ import (
"github.com/containerd/containerd/content" "github.com/containerd/containerd/content"
"github.com/containerd/containerd/content/testsuite" "github.com/containerd/containerd/content/testsuite"
"github.com/containerd/containerd/testutil" "github.com/containerd/containerd/pkg/testutil"
"github.com/gotestyourself/gotestyourself/assert" "github.com/gotestyourself/gotestyourself/assert"
"github.com/opencontainers/go-digest" "github.com/opencontainers/go-digest"
) )

View File

@ -30,7 +30,7 @@ import (
"time" "time"
"github.com/containerd/containerd/content" "github.com/containerd/containerd/content"
"github.com/containerd/containerd/testutil" "github.com/containerd/containerd/pkg/testutil"
"github.com/gotestyourself/gotestyourself/assert" "github.com/gotestyourself/gotestyourself/assert"
digest "github.com/opencontainers/go-digest" digest "github.com/opencontainers/go-digest"
"github.com/pkg/errors" "github.com/pkg/errors"

View File

@ -29,8 +29,8 @@ import (
"time" "time"
"github.com/containerd/containerd/oci" "github.com/containerd/containerd/oci"
"github.com/containerd/containerd/pkg/testutil"
"github.com/containerd/containerd/server" "github.com/containerd/containerd/server"
"github.com/containerd/containerd/testutil"
) )
// the following nolint is for shutting up gometalinter on non-linux. // the following nolint is for shutting up gometalinter on non-linux.

View File

@ -24,10 +24,10 @@ import (
"testing" "testing"
"github.com/boltdb/bolt" "github.com/boltdb/bolt"
"github.com/containerd/containerd/pkg/testutil"
"github.com/containerd/containerd/snapshots" "github.com/containerd/containerd/snapshots"
"github.com/containerd/containerd/snapshots/native" "github.com/containerd/containerd/snapshots/native"
"github.com/containerd/containerd/snapshots/testsuite" "github.com/containerd/containerd/snapshots/testsuite"
"github.com/containerd/containerd/testutil"
) )
func newTestSnapshotter(ctx context.Context, root string) (snapshots.Snapshotter, func() error, error) { func newTestSnapshotter(ctx context.Context, root string) (snapshots.Snapshotter, func() error, error) {

View File

@ -19,7 +19,7 @@
// FIXME: we can't put this test to the mount package: // FIXME: we can't put this test to the mount package:
// import cycle not allowed in test // import cycle not allowed in test
// package github.com/containerd/containerd/mount (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 // imports github.com/containerd/containerd/mount
// //
// NOTE: we can't have this as lookup_test (compilation fails) // NOTE: we can't have this as lookup_test (compilation fails)
@ -35,7 +35,7 @@ import (
"testing" "testing"
"github.com/containerd/containerd/mount" "github.com/containerd/containerd/mount"
"github.com/containerd/containerd/testutil" "github.com/containerd/containerd/pkg/testutil"
"github.com/gotestyourself/gotestyourself/assert" "github.com/gotestyourself/gotestyourself/assert"
) )

View File

@ -28,9 +28,9 @@ import (
"testing" "testing"
"github.com/containerd/containerd/mount" "github.com/containerd/containerd/mount"
"github.com/containerd/containerd/pkg/testutil"
"github.com/containerd/containerd/snapshots" "github.com/containerd/containerd/snapshots"
"github.com/containerd/containerd/snapshots/testsuite" "github.com/containerd/containerd/snapshots/testsuite"
"github.com/containerd/containerd/testutil"
"github.com/pkg/errors" "github.com/pkg/errors"
"golang.org/x/sys/unix" "golang.org/x/sys/unix"
) )

View File

@ -21,9 +21,9 @@ import (
"runtime" "runtime"
"testing" "testing"
"github.com/containerd/containerd/pkg/testutil"
"github.com/containerd/containerd/snapshots" "github.com/containerd/containerd/snapshots"
"github.com/containerd/containerd/snapshots/testsuite" "github.com/containerd/containerd/snapshots/testsuite"
"github.com/containerd/containerd/testutil"
) )
func newSnapshotter(ctx context.Context, root string) (snapshots.Snapshotter, func() error, error) { func newSnapshotter(ctx context.Context, root string) (snapshots.Snapshotter, func() error, error) {

View File

@ -24,7 +24,7 @@ import (
"os/exec" "os/exec"
"testing" "testing"
"github.com/containerd/containerd/testutil" "github.com/containerd/containerd/pkg/testutil"
) )
func testOverlaySupported(t testing.TB, expected bool, mkfs ...string) { func testOverlaySupported(t testing.TB, expected bool, mkfs ...string) {

View File

@ -28,10 +28,10 @@ import (
"testing" "testing"
"github.com/containerd/containerd/mount" "github.com/containerd/containerd/mount"
"github.com/containerd/containerd/pkg/testutil"
"github.com/containerd/containerd/snapshots" "github.com/containerd/containerd/snapshots"
"github.com/containerd/containerd/snapshots/storage" "github.com/containerd/containerd/snapshots/storage"
"github.com/containerd/containerd/snapshots/testsuite" "github.com/containerd/containerd/snapshots/testsuite"
"github.com/containerd/containerd/testutil"
) )
func newSnapshotter(ctx context.Context, root string) (snapshots.Snapshotter, func() error, error) { func newSnapshotter(ctx context.Context, root string) (snapshots.Snapshotter, func() error, error) {

View File

@ -22,7 +22,7 @@ import (
// Does not require root but flag must be defined for snapshot tests // 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) { func TestMetastore(t *testing.T) {

View File

@ -29,8 +29,8 @@ import (
"github.com/containerd/containerd/errdefs" "github.com/containerd/containerd/errdefs"
"github.com/containerd/containerd/mount" "github.com/containerd/containerd/mount"
"github.com/containerd/containerd/namespaces" "github.com/containerd/containerd/namespaces"
"github.com/containerd/containerd/pkg/testutil"
"github.com/containerd/containerd/snapshots" "github.com/containerd/containerd/snapshots"
"github.com/containerd/containerd/testutil"
"github.com/containerd/continuity/fs/fstest" "github.com/containerd/continuity/fs/fstest"
"github.com/gotestyourself/gotestyourself/assert" "github.com/gotestyourself/gotestyourself/assert"
is "github.com/gotestyourself/gotestyourself/assert/cmp" is "github.com/gotestyourself/gotestyourself/assert/cmp"