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
|
@ -27,8 +27,10 @@ def get_tags(namespace_name, repo_name):
|
|||
if repository_ref is None:
|
||||
abort(404)
|
||||
|
||||
# TODO(jschorr): Change this to normalize manifest lists back to their legacy image
|
||||
# (if applicable).
|
||||
tags = registry_model.list_repository_tags(repository_ref, include_legacy_images=True)
|
||||
tag_map = {tag.name: tag.legacy_image.docker_image_id for tag in tags}
|
||||
tag_map = {tag.name: tag.legacy_image.docker_image_id for tag in tags if tag.legacy_image}
|
||||
return jsonify(tag_map)
|
||||
|
||||
abort(403)
|
||||
|
|
|
@ -278,6 +278,7 @@ def _write_manifest(namespace_name, repo_name, tag_name, manifest_impl):
|
|||
if repository_ref is None:
|
||||
raise NameUnknown()
|
||||
|
||||
# Create the manifest(s) and retarget the tag to point to it.
|
||||
manifest, tag = registry_model.create_manifest_and_retarget_tag(repository_ref, manifest_impl,
|
||||
tag_name, storage)
|
||||
if manifest is None:
|
||||
|
|
Reference in a new issue