Statistics
| Branch: | Tag: | Revision:

root / snf-common / synnefo / settings / test.py @ 65f480f5

History | View | Annotate | Download (1.8 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
        'TEST_NAME': '/tmp/synnefo_test_db.sqlite',
14
    }
15
}
16

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

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

    
22

    
23
SOUTH_TESTS_MIGRATE = bool(int(os.environ.get('SOUTH_TESTS_MIGRATE', True)))
24
SNF_TEST_USE_POSTGRES = bool(int(os.environ.get('SNF_TEST_USE_POSTGRES',
25
                                                False)))
26
SNF_TEST_PITHOS_UPDATE_MD5 = bool(int(os.environ.get(
27
    'SNF_TEST_PITHOS_UPDATE_MD5', False)))
28
SNF_TEST_PITHOS_SQLITE_MODULE = bool(int(os.environ.get(
29
    'SNF_TEST_PITHOS_SQLITE_MODULE', False)))
30

    
31

    
32
# override default database
33
if SNF_TEST_USE_POSTGRES:
34
    DATABASES['default'] = {
35
        'ENGINE': 'django.db.backends.postgresql_psycopg2',
36
        'NAME': 'synnefo_db',
37
        'TEST_NAME': 'test_synnefo_db',
38
        'USER': 'postgres',
39
        'PORT': '5432',
40
    }
41
elif SNF_TEST_PITHOS_SQLITE_MODULE:
42
    PITHOS_BACKEND_POOL_ENABLED = False
43
    PITHOS_BACKEND_DB_MODULE = 'pithos.backends.lib.sqlite'
44

    
45
if SNF_TEST_PITHOS_UPDATE_MD5:
46
    PITHOS_UPDATE_MD5 = True
47
else:
48
    PITHOS_UPDATE_MD5 = False
49

    
50

    
51
ASTAKOS_IM_MODULES = ['local', 'shibboleth']
52

    
53
CYCLADES_PROXY_USER_SERVICES = False
54
PITHOS_PROXY_USER_SERVICES = False
55

    
56
ASTAKOS_BASE_URL = 'http://accounts.example.synnefo.org/astakos/'
57
COMPUTE_BASE_URL = 'http://compute.example.synnefo.org/cyclades/'
58
PITHOS_BASE_URL = 'http://storage.example.synnefo.org/pithos/'
59

    
60
CLOUDBAR_LOCATION = '/static/im/cloudbar/'
61
CLOUDBAR_SERVICES_URL = '/ui/get_services'
62
CLOUDBAR_MENU_URL = '/ui/get_menu'