parent
7cea696d83
commit
19fb8fcf7c
1 changed files with 23 additions and 0 deletions
|
@ -2333,6 +2333,29 @@ class TestRevertTag(ApiTestCase):
|
|||
|
||||
|
||||
class TestListAndDeleteTag(ApiTestCase):
|
||||
def test_invalid_tags(self):
|
||||
self.login(ADMIN_ACCESS_USER)
|
||||
|
||||
# List the images for staging.
|
||||
json = self.getJsonResponse(RepositoryTagImages,
|
||||
params=dict(repository=ADMIN_ACCESS_USER + '/complex',
|
||||
tag='staging'))
|
||||
|
||||
staging_images = json['images']
|
||||
|
||||
# Try to add some invalid tags.
|
||||
self.putResponse(RepositoryTag,
|
||||
params=dict(repository=ADMIN_ACCESS_USER + '/complex', tag='-fail'),
|
||||
data=dict(image=staging_images[0]['id']),
|
||||
expected_code=400)
|
||||
|
||||
self.putResponse(RepositoryTag,
|
||||
params=dict(repository=ADMIN_ACCESS_USER + '/complex', tag='北京'),
|
||||
data=dict(image=staging_images[0]['id']),
|
||||
expected_code=400)
|
||||
|
||||
|
||||
|
||||
def test_listdeletecreateandmovetag(self):
|
||||
self.login(ADMIN_ACCESS_USER)
|
||||
|
||||
|
|
Reference in a new issue