Add test for bad repo names currently breaking quay
This commit is contained in:
parent
9ca41dec95
commit
e4d40e3289
1 changed files with 22 additions and 0 deletions
|
@ -767,6 +767,28 @@ class TestDeleteRepository(ApiTestCase):
|
|||
|
||||
class TestGetRepository(ApiTestCase):
|
||||
PUBLIC_REPO = PUBLIC_USER + '/publicrepo'
|
||||
|
||||
def test_getrepo_badnames(self):
|
||||
self.login(ADMIN_ACCESS_USER)
|
||||
|
||||
bad_names = ['logs', 'build', 'tokens']
|
||||
|
||||
# For each bad name, create the repo.
|
||||
for bad_name in bad_names:
|
||||
json = self.postJsonResponse('api.create_repo',
|
||||
data=dict(repository=bad_name,
|
||||
visibility='public',
|
||||
description=''))
|
||||
|
||||
# Make sure we can retrieve its information.
|
||||
json = self.getJsonResponse('api.get_repo',
|
||||
params=dict(repository=ADMIN_ACCESS_USER + '/' + bad_name))
|
||||
|
||||
self.assertEquals(ADMIN_ACCESS_USER, json['namespace'])
|
||||
self.assertEquals(bad_name, json['name'])
|
||||
self.assertEquals(True, json['is_public'])
|
||||
|
||||
|
||||
def test_getrepo_public_asguest(self):
|
||||
json = self.getJsonResponse('api.get_repo',
|
||||
params=dict(repository=self.PUBLIC_REPO))
|
||||
|
|
Reference in a new issue