Add tests for manifest lists and fix some issues encountered while testing
This commit is contained in:
parent
9994f0ae61
commit
7a794e29c0
9 changed files with 311 additions and 98 deletions
|
@ -98,7 +98,7 @@ def get_legacy_images_for_tags(tags):
|
|||
.where(ManifestLegacyImage.manifest << [tag.manifest_id for tag in tags]))
|
||||
|
||||
by_manifest = {mli.manifest_id: mli.image for mli in query}
|
||||
return {tag.id: by_manifest[tag.manifest_id] for tag in tags}
|
||||
return {tag.id: by_manifest[tag.manifest_id] for tag in tags if tag.manifest_id in by_manifest}
|
||||
|
||||
|
||||
def find_matching_tag(repository_id, tag_names, tag_kinds=None):
|
||||
|
|
|
@ -217,9 +217,6 @@ class OCIModel(SharedModel, RegistryDataInterface):
|
|||
return (None, None)
|
||||
|
||||
legacy_image = oci.shared.get_legacy_image_for_manifest(created_manifest.manifest)
|
||||
if legacy_image is None:
|
||||
return (None, None)
|
||||
|
||||
li = LegacyImage.for_image(legacy_image)
|
||||
wrapped_manifest = Manifest.for_manifest(created_manifest.manifest, li)
|
||||
|
||||
|
|
Reference in a new issue