mirror of
https://github.com/project-zot/zot.git
synced 2026-06-16 20:38:08 +08:00
feat(retention): added image retention policies (#1866)
feat(metaDB): add more image statistics info Signed-off-by: Petu Eusebiu <peusebiu@cisco.com>
This commit is contained in:
@@ -877,7 +877,7 @@ func TestOnDemand(t *testing.T) {
|
||||
|
||||
return nil
|
||||
},
|
||||
SetRepoReferenceFn: func(repo, reference string, imageMeta mTypes.ImageMeta) error {
|
||||
SetRepoReferenceFn: func(ctx context.Context, repo, reference string, imageMeta mTypes.ImageMeta) error {
|
||||
if strings.HasPrefix(reference, "sha256-") &&
|
||||
(strings.HasSuffix(reference, remote.SignatureTagSuffix) ||
|
||||
strings.HasSuffix(reference, remote.SBOMTagSuffix)) ||
|
||||
@@ -1017,7 +1017,7 @@ func TestOnDemand(t *testing.T) {
|
||||
|
||||
// metadb fails for syncReferrersTag"
|
||||
dctlr.MetaDB = mocks.MetaDBMock{
|
||||
SetRepoReferenceFn: func(repo, reference string, imageMeta mTypes.ImageMeta) error {
|
||||
SetRepoReferenceFn: func(ctx context.Context, repo, reference string, imageMeta mTypes.ImageMeta) error {
|
||||
if imageMeta.Digest.String() == ociRefImage.ManifestDescriptor.Digest.String() {
|
||||
return sync.ErrTestError
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user