Add registry tests for pushing and pulling previously bad repo names
This commit is contained in:
parent
0db304e169
commit
b342111edb
2 changed files with 11 additions and 1 deletions
|
@ -785,6 +785,16 @@ class V2RegistryLoginMixin(object):
|
|||
|
||||
|
||||
class RegistryTestsMixin(object):
|
||||
def test_previously_bad_repo_name(self):
|
||||
bad_names = ['logs', 'build', 'tokens', 'foo.bar', 'foo-bar', 'foo_bar']
|
||||
|
||||
for name in bad_names:
|
||||
# Push a new repository with two layers.
|
||||
self.do_push('public', name, 'public', 'password')
|
||||
|
||||
# Pull the repository to verify.
|
||||
self.do_pull('public', name, 'public', 'password')
|
||||
|
||||
def test_application_repo(self):
|
||||
# Create an application repository via the API.
|
||||
self.conduct_api_login('devtable', 'password')
|
||||
|
|
|
@ -2241,7 +2241,7 @@ class TestGetRepository(ApiTestCase):
|
|||
def test_getrepo_badnames(self):
|
||||
self.login(ADMIN_ACCESS_USER)
|
||||
|
||||
bad_names = ['logs', 'build', 'tokens', 'foo-bar', 'foo_bar']
|
||||
bad_names = ['logs', 'build', 'tokens', 'foo.bar', 'foo-bar', 'foo_bar']
|
||||
|
||||
# For each bad name, create the repo.
|
||||
for bad_name in bad_names:
|
||||
|
|
Reference in a new issue