-
Notifications
You must be signed in to change notification settings - Fork 51
/
integration_backend_config.py
40 lines (33 loc) · 1.1 KB
/
integration_backend_config.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# Copyright 2018-present Kensho Technologies, LLC.
from collections import namedtuple
from .. import test_backend
DEFAULT_ROOT_PASSWORD = u'root'
MSSQL_ROOT_PASSWORD = u'Root-secure1' # mssql has stricter root password restrictions
SQL_BACKENDS = {
test_backend.POSTGRES,
test_backend.MYSQL,
test_backend.MARIADB,
test_backend.MSSQL,
test_backend.SQLITE,
}
MATCH_BACKENDS = {
test_backend.ORIENTDB,
}
SQL_BACKEND_TO_CONNECTION_STRING = {
test_backend.POSTGRES:
u'postgresql://postgres:{password}@localhost:5432'.format(password=DEFAULT_ROOT_PASSWORD),
test_backend.MYSQL:
u'mysql://root:{password}@127.0.0.1:3306'.format(password=DEFAULT_ROOT_PASSWORD),
test_backend.MARIADB:
u'mysql://root:{password}@127.0.0.1:3307'.format(password=DEFAULT_ROOT_PASSWORD),
test_backend.MSSQL:
u'mssql+pymssql://SA:{password}@localhost:1433'.format(password=MSSQL_ROOT_PASSWORD),
test_backend.SQLITE:
u'sqlite:///:memory:',
}
SqlTestBackend = namedtuple('SqlTestBackend', (
'connection_string',
'engine',
'connection',
'transaction',
))