Add tests for manifest lists and fix some issues encountered while testing

This commit is contained in:
Joseph Schorr 2018-11-13 19:05:45 +02:00
parent 9994f0ae61
commit 7a794e29c0
9 changed files with 311 additions and 98 deletions

View file

@ -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)