Fix support for multiple stack configurations and move most secrets into the quay-config project.
This commit is contained in:
parent
8e9faf6121
commit
265fa5070a
23 changed files with 148 additions and 655 deletions
30
test/testconfig.py
Normal file
30
test/testconfig.py
Normal file
|
@ -0,0 +1,30 @@
|
|||
from config import DefaultConfig
|
||||
from test.testlogs import TestBuildLogs
|
||||
|
||||
|
||||
class FakeTransaction(object):
|
||||
def __enter__(self):
|
||||
return self
|
||||
|
||||
def __exit__(self, exc_type, value, traceback):
|
||||
pass
|
||||
|
||||
|
||||
class TestConfig(DefaultConfig):
|
||||
TESTING = True
|
||||
|
||||
DB_NAME = ':memory:'
|
||||
DB_CONNECTION_ARGS = {}
|
||||
|
||||
@staticmethod
|
||||
def create_transaction(db):
|
||||
return FakeTransaction()
|
||||
|
||||
DB_TRANSACTION_FACTORY = create_transaction
|
||||
|
||||
STORAGE_TYPE = 'FakeStorage'
|
||||
|
||||
BUILDLOGS = TestBuildLogs('logs.quay.io', 'devtable', 'building',
|
||||
'deadbeef-dead-beef-dead-beefdeadbeef')
|
||||
|
||||
USERFILES_TYPE = 'FakeUserfiles'
|
Reference in a new issue