Fix the tests for registry v2 changes.
This commit is contained in:
parent
0dc0f23c5e
commit
b998eca8e5
3 changed files with 14 additions and 4 deletions
|
@ -383,7 +383,11 @@ def get_image_ancestry(namespace, repository, image_id, headers):
|
|||
if not permission.can() and not model.repository.repository_is_public(namespace, repository):
|
||||
abort(403)
|
||||
|
||||
image = model.image.get_image_by_id(namespace, repository, image_id)
|
||||
try:
|
||||
image = model.image.get_image_by_id(namespace, repository, image_id)
|
||||
except model.InvalidImageException:
|
||||
abort(404, 'Image %(image_id)s not found', issue='unknown-image', image_id=image_id)
|
||||
|
||||
parents = model.image.get_parent_images(namespace, repository, image)
|
||||
|
||||
ancestry_docker_ids = [image.docker_image_id]
|
||||
|
|
Reference in a new issue