Merge pull request #597 from coreos-inc/tag-validation

Update tag validation
This commit is contained in:
Silas Sewell 2015-10-05 21:10:55 -04:00
commit c6da322ec1
6 changed files with 40 additions and 5 deletions

View file

@ -2164,6 +2164,12 @@ class TestListAndDeleteTag(ApiTestCase):
self.assertEquals(staging_images, json['images'])
# Require a valid tag name.
self.putResponse(RepositoryTag,
params=dict(repository=ADMIN_ACCESS_USER + '/complex', tag='-fail'),
data=dict(image=staging_images[0]['id']),
expected_code=400)
# Add a new tag to the staging image.
self.putResponse(RepositoryTag,
params=dict(repository=ADMIN_ACCESS_USER + '/complex', tag='sometag'),