Merge branch 'ldapper'
Conflicts: Dockerfile app.py data/database.py endpoints/index.py test/data/test.db
This commit is contained in:
commit
f6726bd0a4
25 changed files with 1157 additions and 94 deletions
|
@ -148,7 +148,7 @@ def setup_database_for_testing(testcase):
|
|||
|
||||
# Sanity check to make sure we're not killing our prod db
|
||||
db = model.db
|
||||
if not isinstance(model.db, SqliteDatabase):
|
||||
if not isinstance(model.db.obj, SqliteDatabase):
|
||||
raise RuntimeError('Attempted to wipe production database!')
|
||||
|
||||
global db_initialized_for_testing
|
||||
|
@ -181,6 +181,7 @@ def initialize_database():
|
|||
Visibility.create(name='private')
|
||||
LoginService.create(name='github')
|
||||
LoginService.create(name='quayrobot')
|
||||
LoginService.create(name='ldap')
|
||||
|
||||
BuildTriggerService.create(name='github')
|
||||
|
||||
|
@ -241,7 +242,7 @@ def wipe_database():
|
|||
|
||||
# Sanity check to make sure we're not killing our prod db
|
||||
db = model.db
|
||||
if not isinstance(model.db, SqliteDatabase):
|
||||
if not isinstance(model.db.obj, SqliteDatabase):
|
||||
raise RuntimeError('Attempted to wipe production database!')
|
||||
|
||||
drop_model_tables(all_models, fail_silently=True)
|
||||
|
|
Reference in a new issue