mirror of
https://github.com/project-zot/zot.git
synced 2026-06-17 21:17:58 +08:00
test: add more tests for GCing indexes referencing other indexes referencing manifests (#2716)
Looks like we didn't have many GC tests for retaining multiarch images. I added more data to the existing image retention tests, besides the new GC tests. Signed-off-by: Andrei Aaron <aaaron@luxoft.com>
This commit is contained in:
@@ -37,6 +37,14 @@ func (mi *MultiarchImage) DigestStr() string {
|
||||
return mi.Digest().String()
|
||||
}
|
||||
|
||||
func (mi *MultiarchImage) DescriptorRef() *ispec.Descriptor {
|
||||
return &ispec.Descriptor{
|
||||
MediaType: mi.IndexDescriptor.MediaType,
|
||||
Digest: mi.IndexDescriptor.Digest,
|
||||
Size: mi.IndexDescriptor.Size,
|
||||
}
|
||||
}
|
||||
|
||||
func (mi *MultiarchImage) DigestForAlgorithm(digestAlgorithm godigest.Algorithm) godigest.Digest {
|
||||
blob, err := json.Marshal(mi.Index)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user