forked from TrueCloudLab/distribution
ignore path not found error when look up tags
Signed-off-by: Wenkai Yin <yinw@vmware.com>
This commit is contained in:
parent
1ba5b3b553
commit
005c6e0236
2 changed files with 6 additions and 2 deletions
|
@ -182,6 +182,10 @@ func (ts *tagStore) Lookup(ctx context.Context, desc distribution.Descriptor) ([
|
|||
tagLinkPath, err := pathFor(tagLinkPathSpec)
|
||||
tagDigest, err := ts.blobStore.readlink(ctx, tagLinkPath)
|
||||
if err != nil {
|
||||
switch err.(type) {
|
||||
case storagedriver.PathNotFoundError:
|
||||
continue
|
||||
}
|
||||
return nil, err
|
||||
}
|
||||
|
||||
|
|
|
@ -84,8 +84,8 @@ func TestTagStoreUnTag(t *testing.T) {
|
|||
desc := distribution.Descriptor{Digest: "sha256:bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb"}
|
||||
|
||||
err := tags.Untag(ctx, "latest")
|
||||
if err == nil {
|
||||
t.Errorf("Expected error untagging non-existant tag")
|
||||
if err != nil {
|
||||
t.Error(err)
|
||||
}
|
||||
|
||||
err = tags.Tag(ctx, "latest", desc)
|
||||
|
|
Loading…
Reference in a new issue