Upgrade oras cli (#1021)

* chore: upgrade oras cli

Signed-off-by: Petu Eusebiu <peusebiu@cisco.com>

* fix(oci references): referrers API should not return 404 if repo exists

Signed-off-by: Petu Eusebiu <peusebiu@cisco.com>
This commit is contained in:
peusebiu
2022-11-28 20:43:53 +02:00
committed by GitHub
parent 1d97d1e796
commit c82748ab39
6 changed files with 54 additions and 21 deletions
-8
View File
@@ -548,8 +548,6 @@ func GetReferrers(imgStore ImageStore, repo string, gdigest godigest.Digest, art
return nilIndex, err
}
found := false
result := []ispec.Descriptor{}
for _, manifest := range index.Manifests {
@@ -617,12 +615,6 @@ func GetReferrers(imgStore ImageStore, repo string, gdigest godigest.Digest, art
Annotations: art.Annotations,
})
}
found = true
}
if !found {
return nilIndex, zerr.ErrManifestNotFound
}
index = ispec.Index{
+1 -1
View File
@@ -299,7 +299,7 @@ func TestGetReferrersErrors(t *testing.T) {
}
_, err = storage.GetReferrers(imgStore, "zot-test", validDigest, artifactType, log.With().Caller().Logger())
So(err, ShouldNotBeNil)
So(err, ShouldBeNil)
})
})
}