Flesh out some of the organization methods and fix the models.
This commit is contained in:
parent
ecc4ad6e0f
commit
4c0f987af3
5 changed files with 181 additions and 64 deletions
13
initdb.py
13
initdb.py
|
@ -148,6 +148,19 @@ if __name__ == '__main__':
|
|||
'Empty repository which is building.',
|
||||
False, [], (0, [], None))
|
||||
|
||||
|
||||
org = model.create_organization('devtableorg', 'quay@devtable.com',
|
||||
new_user_1)
|
||||
|
||||
org_repo = __generate_repository(org, 'orgrepo',
|
||||
'Repository owned by an org.', False,
|
||||
[], (4, [], ['latest', 'prod']))
|
||||
|
||||
reader_team = model.create_team('Readers', org)
|
||||
model.set_team_repo_permission(reader_team.name, org_repo.namespace,
|
||||
org_repo.name, 'read')
|
||||
model.add_user_to_team(new_user_2, reader_team)
|
||||
|
||||
token = model.create_access_token(building, 'write')
|
||||
tag = 'ci.devtable.com:5000/%s/%s' % (building.namespace, building.name)
|
||||
build = model.create_repository_build(building, token, '123-45-6789', tag)
|
||||
|
|
Reference in a new issue