Add registry app repository failure test
This commit is contained in:
parent
ca7a0f14d8
commit
dcb970b783
2 changed files with 33 additions and 1 deletions
|
@ -77,6 +77,11 @@ class RepositoryList(ApiResource):
|
|||
'type': 'string',
|
||||
'description': 'Markdown encoded description for the repository',
|
||||
},
|
||||
'kind': {
|
||||
'type': 'string',
|
||||
'description': 'The kind of repository',
|
||||
'enum': ['image', 'application'],
|
||||
}
|
||||
},
|
||||
},
|
||||
}
|
||||
|
@ -111,7 +116,9 @@ class RepositoryList(ApiResource):
|
|||
if not REPOSITORY_NAME_REGEX.match(repository_name):
|
||||
raise InvalidRequest('Invalid repository name')
|
||||
|
||||
repo = model.repository.create_repository(namespace_name, repository_name, owner, visibility)
|
||||
kind = req.get('kind', 'image')
|
||||
repo = model.repository.create_repository(namespace_name, repository_name, owner, visibility,
|
||||
repo_kind=kind)
|
||||
repo.description = req['description']
|
||||
repo.save()
|
||||
|
||||
|
|
Reference in a new issue