Update tests to use gotest.tools angel
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
This commit is contained in:
parent
3830180ce5
commit
832b05ae67
@ -32,8 +32,8 @@ import (
|
|||||||
|
|
||||||
"github.com/containerd/fifo"
|
"github.com/containerd/fifo"
|
||||||
"github.com/google/go-cmp/cmp/cmpopts"
|
"github.com/google/go-cmp/cmp/cmpopts"
|
||||||
"github.com/gotestyourself/gotestyourself/assert"
|
"gotest.tools/assert"
|
||||||
is "github.com/gotestyourself/gotestyourself/assert/cmp"
|
is "gotest.tools/assert/cmp"
|
||||||
)
|
)
|
||||||
|
|
||||||
func assertHasPrefix(t *testing.T, s, prefix string) {
|
func assertHasPrefix(t *testing.T, s, prefix string) {
|
||||||
|
@ -23,7 +23,7 @@ import (
|
|||||||
"path/filepath"
|
"path/filepath"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/gotestyourself/gotestyourself/assert"
|
"gotest.tools/assert"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestOpenFifos(t *testing.T) {
|
func TestOpenFifos(t *testing.T) {
|
||||||
|
@ -25,9 +25,9 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/containerd/containerd/errdefs"
|
"github.com/containerd/containerd/errdefs"
|
||||||
"github.com/gotestyourself/gotestyourself/assert"
|
|
||||||
is "github.com/gotestyourself/gotestyourself/assert/cmp"
|
|
||||||
"github.com/opencontainers/go-digest"
|
"github.com/opencontainers/go-digest"
|
||||||
|
"gotest.tools/assert"
|
||||||
|
is "gotest.tools/assert/cmp"
|
||||||
)
|
)
|
||||||
|
|
||||||
type copySource struct {
|
type copySource struct {
|
||||||
|
@ -37,9 +37,9 @@ 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/pkg/testutil"
|
"github.com/containerd/containerd/pkg/testutil"
|
||||||
"github.com/gotestyourself/gotestyourself/assert"
|
|
||||||
"github.com/opencontainers/go-digest"
|
"github.com/opencontainers/go-digest"
|
||||||
ocispec "github.com/opencontainers/image-spec/specs-go/v1"
|
ocispec "github.com/opencontainers/image-spec/specs-go/v1"
|
||||||
|
"gotest.tools/assert"
|
||||||
)
|
)
|
||||||
|
|
||||||
type memoryLabelStore struct {
|
type memoryLabelStore struct {
|
||||||
|
@ -31,10 +31,10 @@ import (
|
|||||||
|
|
||||||
"github.com/containerd/containerd/content"
|
"github.com/containerd/containerd/content"
|
||||||
"github.com/containerd/containerd/pkg/testutil"
|
"github.com/containerd/containerd/pkg/testutil"
|
||||||
"github.com/gotestyourself/gotestyourself/assert"
|
|
||||||
digest "github.com/opencontainers/go-digest"
|
digest "github.com/opencontainers/go-digest"
|
||||||
ocispec "github.com/opencontainers/image-spec/specs-go/v1"
|
ocispec "github.com/opencontainers/image-spec/specs-go/v1"
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
|
"gotest.tools/assert"
|
||||||
)
|
)
|
||||||
|
|
||||||
// ContentSuite runs a test suite on the content store given a factory function.
|
// ContentSuite runs a test suite on the content store given a factory function.
|
||||||
|
@ -23,7 +23,7 @@ import (
|
|||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/containerd/containerd/gc"
|
"github.com/containerd/containerd/gc"
|
||||||
"github.com/gotestyourself/gotestyourself/assert"
|
"gotest.tools/assert"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestPauseThreshold(t *testing.T) {
|
func TestPauseThreshold(t *testing.T) {
|
||||||
|
@ -19,9 +19,9 @@ package oci
|
|||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/gotestyourself/gotestyourself/assert"
|
|
||||||
"github.com/opencontainers/go-digest"
|
"github.com/opencontainers/go-digest"
|
||||||
ocispec "github.com/opencontainers/image-spec/specs-go/v1"
|
ocispec "github.com/opencontainers/image-spec/specs-go/v1"
|
||||||
|
"gotest.tools/assert"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestNormalizeImageRef(t *testing.T) {
|
func TestNormalizeImageRef(t *testing.T) {
|
||||||
|
@ -20,7 +20,7 @@ import (
|
|||||||
"context"
|
"context"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/gotestyourself/gotestyourself/assert"
|
"gotest.tools/assert"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestLoggerContext(t *testing.T) {
|
func TestLoggerContext(t *testing.T) {
|
||||||
|
@ -36,7 +36,7 @@ import (
|
|||||||
|
|
||||||
"github.com/containerd/containerd/mount"
|
"github.com/containerd/containerd/mount"
|
||||||
"github.com/containerd/containerd/pkg/testutil"
|
"github.com/containerd/containerd/pkg/testutil"
|
||||||
"github.com/gotestyourself/gotestyourself/assert"
|
"gotest.tools/assert"
|
||||||
)
|
)
|
||||||
|
|
||||||
func checkLookup(t *testing.T, fsType, mntPoint, dir string) {
|
func checkLookup(t *testing.T, fsType, mntPoint, dir string) {
|
||||||
|
@ -24,7 +24,7 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/containerd/containerd/mount"
|
"github.com/containerd/containerd/mount"
|
||||||
"github.com/gotestyourself/gotestyourself/assert"
|
"gotest.tools/assert"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Unmount unmounts a given mountPoint and sets t.Error if it fails
|
// Unmount unmounts a given mountPoint and sets t.Error if it fails
|
||||||
|
@ -20,7 +20,7 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/containerd/containerd/reference"
|
"github.com/containerd/containerd/reference"
|
||||||
"github.com/gotestyourself/gotestyourself/assert"
|
"gotest.tools/assert"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestRepositoryScope(t *testing.T) {
|
func TestRepositoryScope(t *testing.T) {
|
||||||
|
@ -20,8 +20,8 @@ import (
|
|||||||
"context"
|
"context"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/gotestyourself/gotestyourself/assert"
|
"gotest.tools/assert"
|
||||||
is "github.com/gotestyourself/gotestyourself/assert/cmp"
|
is "gotest.tools/assert/cmp"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestNewErrorsWithSamePathForRootAndState(t *testing.T) {
|
func TestNewErrorsWithSamePathForRootAndState(t *testing.T) {
|
||||||
|
@ -27,9 +27,9 @@ import (
|
|||||||
"github.com/containerd/containerd/errdefs"
|
"github.com/containerd/containerd/errdefs"
|
||||||
"github.com/containerd/containerd/snapshots"
|
"github.com/containerd/containerd/snapshots"
|
||||||
"github.com/google/go-cmp/cmp"
|
"github.com/google/go-cmp/cmp"
|
||||||
"github.com/gotestyourself/gotestyourself/assert"
|
|
||||||
is "github.com/gotestyourself/gotestyourself/assert/cmp"
|
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
|
"gotest.tools/assert"
|
||||||
|
is "gotest.tools/assert/cmp"
|
||||||
)
|
)
|
||||||
|
|
||||||
type testFunc func(context.Context, *testing.T, *MetaStore)
|
type testFunc func(context.Context, *testing.T, *MetaStore)
|
||||||
|
@ -32,8 +32,8 @@ import (
|
|||||||
"github.com/containerd/containerd/pkg/testutil"
|
"github.com/containerd/containerd/pkg/testutil"
|
||||||
"github.com/containerd/containerd/snapshots"
|
"github.com/containerd/containerd/snapshots"
|
||||||
"github.com/containerd/continuity/fs/fstest"
|
"github.com/containerd/continuity/fs/fstest"
|
||||||
"github.com/gotestyourself/gotestyourself/assert"
|
"gotest.tools/assert"
|
||||||
is "github.com/gotestyourself/gotestyourself/assert/cmp"
|
is "gotest.tools/assert/cmp"
|
||||||
)
|
)
|
||||||
|
|
||||||
// SnapshotterSuite runs a test suite on the snapshotter given a factory function.
|
// SnapshotterSuite runs a test suite on the snapshotter given a factory function.
|
||||||
|
@ -29,8 +29,8 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/gotestyourself/gotestyourself/assert"
|
"gotest.tools/assert"
|
||||||
is "github.com/gotestyourself/gotestyourself/assert/cmp"
|
is "gotest.tools/assert/cmp"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestSetPositiveOomScoreAdjustment(t *testing.T) {
|
func TestSetPositiveOomScoreAdjustment(t *testing.T) {
|
||||||
|
Loading…
Reference in New Issue
Block a user