Fix issue accessing a null tagmanifest under a tag in a repository
This commit is contained in:
parent
cf8e71f1e8
commit
c34eacb4fa
4 changed files with 41 additions and 2 deletions
|
@ -121,6 +121,21 @@ def test_create_repository(repo_name, expected_status, client):
|
|||
assert model.repository.get_repository('devtable', repo_name).name == repo_name
|
||||
|
||||
|
||||
@pytest.mark.parametrize('has_tag_manifest', [
|
||||
True,
|
||||
False,
|
||||
])
|
||||
def test_get_repo(has_tag_manifest, client, initialized_db):
|
||||
with client_with_identity('devtable', client) as cl:
|
||||
if not has_tag_manifest:
|
||||
database.TagManifestLabel.delete().execute()
|
||||
database.TagManifest.delete().execute()
|
||||
|
||||
params = {'repository': 'devtable/simple'}
|
||||
response = conduct_api_call(cl, Repository, 'GET', params).json
|
||||
assert response['kind'] == 'image'
|
||||
|
||||
|
||||
def test_get_app_repo(client, initialized_db):
|
||||
with client_with_identity('devtable', client) as cl:
|
||||
devtable = model.user.get_user('devtable')
|
||||
|
|
Reference in a new issue