summaryrefslogtreecommitdiff
path: root/distribution/manifest_test.go
diff options
context:
space:
mode:
authorSebastiaan van Stijn <github@gone.nl>2023-04-08 19:30:33 +0200
committerSebastiaan van Stijn <github@gone.nl>2023-04-08 19:30:33 +0200
commit81e62af94ac59cf56aa6f988e04f5238e0f69ad1 (patch)
treebfebbdf0b74129c0e50145fde2de28dfba97370d /distribution/manifest_test.go
parentdd3b71d17c614f837c4bba18baed9fa2cb31f1a4 (diff)
downloaddocker-81e62af94ac59cf56aa6f988e04f5238e0f69ad1.tar.gz
use consistent alias for containerd's errdefs package
The signatures of functions in containerd's errdefs packages are very similar to those in our own, and it's easy to accidentally use the wrong package. This patch uses a consistent alias for all occurrences of this import. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Diffstat (limited to 'distribution/manifest_test.go')
-rw-r--r--distribution/manifest_test.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/distribution/manifest_test.go b/distribution/manifest_test.go
index 8a816c4043..e5410b1724 100644
--- a/distribution/manifest_test.go
+++ b/distribution/manifest_test.go
@@ -10,7 +10,7 @@ import (
"github.com/containerd/containerd/content"
"github.com/containerd/containerd/content/local"
- "github.com/containerd/containerd/errdefs"
+ cerrdefs "github.com/containerd/containerd/errdefs"
"github.com/containerd/containerd/remotes"
"github.com/docker/distribution"
"github.com/docker/distribution/manifest/manifestlist"
@@ -188,7 +188,7 @@ func TestManifestStore(t *testing.T) {
checkIngest := func(t *testing.T, cs content.Store, desc specs.Descriptor) {
ingestKey := remotes.MakeRefKey(ctx, desc)
_, err := cs.Status(ctx, ingestKey)
- assert.Check(t, errdefs.IsNotFound(err), err)
+ assert.Check(t, cerrdefs.IsNotFound(err), err)
}
t.Run("no remote or local", func(t *testing.T) {
@@ -323,7 +323,7 @@ func TestManifestStore(t *testing.T) {
_, err = cs.Info(ctx, desc.Digest)
// Nothing here since we couldn't persist
- assert.Check(t, errdefs.IsNotFound(err), err)
+ assert.Check(t, cerrdefs.IsNotFound(err), err)
})
t.Run("error on commit", func(t *testing.T) {
@@ -342,7 +342,7 @@ func TestManifestStore(t *testing.T) {
_, err = cs.Info(ctx, desc.Digest)
// Nothing here since we couldn't persist
- assert.Check(t, errdefs.IsNotFound(err), err)
+ assert.Check(t, cerrdefs.IsNotFound(err), err)
})
})
}