Fix the tests for registry v2 changes.

This commit is contained in:
Jake Moshenko 2015-08-24 11:58:43 -04:00
parent 0dc0f23c5e
commit b998eca8e5
3 changed files with 14 additions and 4 deletions

View file

@ -68,9 +68,15 @@ class TestGarbageCollection(unittest.TestCase):
if not image_id in image_map:
image_map[image_id] = self.createImage(image_id, repo, namespace)
v1_metadata = {
'id': image_id,
}
if parent is not None:
v1_metadata['parent'] = parent.docker_image_id
# Set the ancestors for the image.
parent = model.image.set_image_metadata(image_id, namespace, name, '', '', '',
parent=parent)
v1_metadata, parent=parent)
# Set the tag for the image.
model.tag.create_or_update_tag(namespace, name, tag_name, image_ids[-1])