diff --git a/data/model/tag.py b/data/model/tag.py index 3af310853..a1c1ae24d 100644 --- a/data/model/tag.py +++ b/data/model/tag.py @@ -549,8 +549,8 @@ def restore_tag_to_image(repo_obj, tag_name, docker_image_id): return existing_image -def store_tag_manifest(namespace_name, repository_name, tag_name, manifest, leaf_layer_id=None, - reversion=False): +def store_tag_manifest_for_testing(namespace_name, repository_name, tag_name, manifest, + leaf_layer_id=None): """ Stores a tag manifest for a specific tag name in the database. Returns the TagManifest object, as well as a boolean indicating whether the TagManifest was created. """ @@ -559,8 +559,7 @@ def store_tag_manifest(namespace_name, repository_name, tag_name, manifest, leaf except Repository.DoesNotExist: raise DataModelException('Invalid repository %s/%s' % (namespace_name, repository_name)) - return store_tag_manifest_for_repo(repo.id, tag_name, manifest, leaf_layer_id=leaf_layer_id, - reversion=False) + return store_tag_manifest_for_repo(repo.id, tag_name, manifest, leaf_layer_id=leaf_layer_id) def store_tag_manifest_for_repo(repository_id, tag_name, manifest, leaf_layer_id=None, diff --git a/data/model/test/test_gc.py b/data/model/test/test_gc.py index aa77a82df..a1a450fea 100644 --- a/data/model/test/test_gc.py +++ b/data/model/test/test_gc.py @@ -72,8 +72,8 @@ def store_tag_manifest(namespace, repo_name, tag_name, image_id): pass manifest = builder.build(docker_v2_signing_key) - manifest_row, _ = model.tag.store_tag_manifest(namespace, repo_name, tag_name, manifest, - leaf_layer_id=image_id) + manifest_row, _ = model.tag.store_tag_manifest_for_testing(namespace, repo_name, tag_name, + manifest, leaf_layer_id=image_id) return manifest_row diff --git a/data/model/test/test_tag.py b/data/model/test/test_tag.py index bb5c9d28b..3cba8e01f 100644 --- a/data/model/test/test_tag.py +++ b/data/model/test/test_tag.py @@ -13,7 +13,7 @@ from data.database import (Image, RepositoryTag, ImageStorage, Repository, Manif from data.model.repository import create_repository from data.model.tag import (list_active_repo_tags, create_or_update_tag, delete_tag, get_matching_tags, _tag_alive, get_matching_tags_for_images, - change_tag_expiration, get_active_tag, store_tag_manifest) + change_tag_expiration, get_active_tag, store_tag_manifest_for_testing) from data.model.image import find_create_or_link_image from image.docker.schema1 import DockerSchema1ManifestBuilder from util.timedeltastring import convert_to_timedelta @@ -234,7 +234,7 @@ def test_store_tag_manifest(initialized_db): find_create_or_link_image(image_id, repo, 'devtable', {}, 'local_us') manifest = builder.build(docker_v2_signing_key) - tag_manifest, _ = store_tag_manifest('devtable', 'simple', 'sometag', manifest) + tag_manifest, _ = store_tag_manifest_for_testing('devtable', 'simple', 'sometag', manifest) # Ensure we have the new-model expected rows. mapping_row = TagManifestToManifest.get(tag_manifest=tag_manifest)