use BRANCH_NAME for naming test databases (#31337)
This commit is contained in:
parent
c9d3c55260
commit
f76a6a84e8
|
@ -12,6 +12,11 @@ PROJECT_NAME = 'authentic2-multitenant'
|
|||
with patch.object(builtin, 'file', mock_open(read_data='xxx')):
|
||||
execfile(os.environ['DEBIAN_CONFIG_COMMON'])
|
||||
|
||||
BRANCH_NAME = os.environ.get("BRANCH_NAME", "").replace('/', '-')
|
||||
DATABASES['default']['TEST'] = {
|
||||
'NAME': DATABASES['default']['NAME'] + '-%s' % BRANCH_NAME,
|
||||
}
|
||||
|
||||
# Avoid conflic with real tenants
|
||||
# that might exist in /var/lib/authentic2_multitenant/tenants
|
||||
TENANT_BASE = '/that/path/does/not/exist'
|
||||
|
|
|
@ -11,6 +11,11 @@ PROJECT_NAME = 'multipublik'
|
|||
with patch.object(builtin, 'file', mock_open(read_data='xxx')):
|
||||
execfile(os.path.join(os.path.dirname(__file__), '../debian/debian_config_common.py'))
|
||||
|
||||
BRANCH_NAME = os.environ.get("BRANCH_NAME", "").replace('/', '-')
|
||||
DATABASES['default']['TEST'] = {
|
||||
'NAME': DATABASES['default']['NAME'] + '-%s' % BRANCH_NAME,
|
||||
}
|
||||
|
||||
CACHES = {
|
||||
'default': {
|
||||
'BACKEND': 'hobo.multitenant.cache.TenantCache',
|
||||
|
|
|
@ -43,6 +43,11 @@ TEMPLATES = [
|
|||
with patch.object(builtin, 'file', mock_open(read_data='xxx')):
|
||||
execfile(os.path.join(os.path.dirname(__file__), '../debian/debian_config_common.py'))
|
||||
|
||||
BRANCH_NAME = os.environ.get("BRANCH_NAME", "").replace('/', '-')
|
||||
DATABASES['default']['TEST'] = {
|
||||
'NAME': DATABASES['default']['NAME'] + '-%s' % BRANCH_NAME,
|
||||
}
|
||||
|
||||
TENANT_APPS = ('django.contrib.auth', 'django.contrib.sessions', 'django.contrib.contenttypes',
|
||||
'hobo.agent.common', 'mellon')
|
||||
|
||||
|
|
|
@ -14,6 +14,11 @@ PROJECT_NAME = 'passerelle'
|
|||
with patch.object(builtin, 'file', mock_open(read_data='xxx')):
|
||||
execfile(os.environ['DEBIAN_CONFIG_COMMON'])
|
||||
|
||||
BRANCH_NAME = os.environ.get("BRANCH_NAME", "").replace('/', '-')
|
||||
DATABASES['default']['TEST'] = {
|
||||
'NAME': DATABASES['default']['NAME'] + '-%s' % BRANCH_NAME,
|
||||
}
|
||||
|
||||
# Avoid conflic with real tenants
|
||||
# that might exist in /var/lib/passerelle/tenants
|
||||
TENANT_BASE = '/that/path/does/not/exist'
|
||||
|
|
Loading…
Reference in New Issue