Statistics
| Branch: | Tag: | Revision:

root / snf-common / synnefo / settings / test.py @ d6a92fa0

History | View | Annotate | Download (1.3 kB)

1
import os
2
os.environ['SYNNEFO_SETTINGS_DIR'] = '/etc/synnefo-test-settings'
3

    
4
from synnefo.settings import *
5

    
6
DEBUG = False
7
TEST = True
8

    
9
DATABASES = {
10
    'default': {
11
        'ENGINE': 'django.db.backends.sqlite3',
12
        'NAME': '/tmp/synnefo_test_db.sqlite',
13
    }
14
}
15

    
16
LOGGING_SETUP['handlers']['console']['level'] = \
17
    os.environ.get('SYNNEFO_TESTS_LOGGING_LEVEL', 'WARNING')
18

    
19
LOGIN_URL = 'http://host:port/'
20

    
21

    
22
SOUTH_TESTS_MIGRATE = bool(int(os.environ.get('SOUTH_TESTS_MIGRATE', True)))
23
SNF_TEST_USE_POSTGRES = bool(int(os.environ.get('SNF_TEST_USE_POSTGRES',
24
                                                False)))
25

    
26
# override default database
27
if SNF_TEST_USE_POSTGRES:
28
    DATABASES['default'] = {
29
        'ENGINE': 'django.db.backends.postgresql_psycopg2',
30
        'NAME': 'pithos',
31
        'TEST_NAME': 'test_pithos',
32
        'USER': 'postgres',
33
        'PORT': '5432',
34
    }
35

    
36
ASTAKOS_IM_MODULES = ['local', 'shibboleth']
37

    
38
CYCLADES_PROXY_USER_SERVICES = False
39
PITHOS_PROXY_USER_SERVICES = False
40

    
41
ASTAKOS_BASE_URL = 'http://accounts.example.synnefo.org/astakos/'
42
COMPUTE_BASE_URL = 'http://compute.example.synnefo.org/cyclades/'
43
PITHOS_BASE_URL = 'http://storage.example.synnefo.org/pithos/'
44

    
45
CLOUDBAR_LOCATION = '/static/im/cloudbar/'
46
CLOUDBAR_SERVICES_URL = '/ui/get_services'
47
CLOUDBAR_MENU_URL = '/ui/get_menu'