Raise a 409 if we try to insert a tag twice at the same time

Also fixes handling of labels for existing manifests

Fixes #1775
This commit is contained in:
Joseph Schorr 2016-08-29 11:58:18 -04:00
parent 3f459523c4
commit 357005e33f
5 changed files with 36 additions and 12 deletions

View file

@ -1149,6 +1149,9 @@ class V2RegistryTests(V2RegistryPullMixin, V2RegistryPushMixin, RegistryTestsMix
(_, digest) = self.do_push('devtable', 'newrepo', 'devtable', 'password', images=images)
# Push again to verify no duplication.
(_, digest) = self.do_push('devtable', 'newrepo', 'devtable', 'password', images=images)
self.conduct_api_login('devtable', 'password')
labels = self.conduct('GET', '/api/v1/repository/devtable/newrepo/manifest/' + digest + '/labels').json()
self.assertEquals(3, len(labels['labels']))