Add unit tests and a stronger restriction on the revert API call

This commit is contained in:
Joseph Schorr 2015-04-19 15:43:16 -04:00
parent e16657ed0e
commit d1e2d072ea
3 changed files with 55 additions and 8 deletions

View file

@ -177,7 +177,7 @@ class RevertTag(RepositoryParamResource):
# Revert the tag back to the previous image.
image_id = request.get_json()['image']
model.revert_tag(namespace, repository, tag, image_id)
model.revert_tag(tag_image.repository, tag, image_id)
model.garbage_collect_repository(namespace, repository)
# Log the reversion.