forked from openstack-archive/fuel-web
-
Notifications
You must be signed in to change notification settings - Fork 6
/
tox.ini
65 lines (58 loc) · 2.32 KB
/
tox.ini
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
[tox]
minversion = 1.6
skipsdist = True
setupdir = {toxinidir}/nailgun
envlist = py27,py34,pep8
[testenv]
usedevelop = True
install_command = pip install --allow-external -U {opts} {packages}
whitelist_externals = bash
python
changedir={toxinidir}/nailgun
setenv = VIRTUAL_ENV={envdir}
NAILGUN_CONFIG={toxinidir}/nailgun/test.yaml
NAILGUN_LOGS={toxinidir}/nailgun
NAILGUN_STATIC={toxinidir}/nailgun/static
NAILGUN_TEMPLATES={toxinidir}/nailgun/static
NAILGUN_DB=openstack_citest
NAILGUN_DB_USER=openstack_citest
NAILGUN_DB_PW=openstack_citest
NAILGUN_DB_ROOT=postgres
NAILGUN_DB_ROOTPW=insecure_slave
NAILGUN_DB_ROOTPGPASS={toxinidir}/nailgun/pgpass
passenv = http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY
deps = -r{toxinidir}/nailgun/test-requirements.txt
commands =
bash "{toxinidir}/nailgun/tools/prepare_settings_yaml.sh"
bash "{toxinidir}/nailgun/tools/prepare_database.sh"
py.test -vv --cleandb --junit-xml {toxinidir}/nailgun/nailgun.xml -m 'not performance' -n 4 {posargs:nailgun/test}
py.test -vv --junit-xml {toxinidir}/nailgun/extensions.xml {posargs:nailgun/extensions}
[testenv:cover]
setenv = NOSE_WITH_COVERAGE=1
[testenv:venv]
deps = -r{toxinidir}/nailgun/requirements.txt
commands = {posargs:}
[testenv:pep8]
deps = hacking==0.10
usedevelop = False
commands =
flake8 {posargs:nailgun}
[testenv:runfakemode]
commands =
bash "{toxinidir}/nailgun/tools/prepare_settings_yaml.sh"
bash "{toxinidir}/nailgun/tools/prepare_database.sh"
python {toxinidir}/nailgun/manage.py syncdb
python {toxinidir}/nailgun/manage.py loaddefault
python {toxinidir}/nailgun/manage.py loaddata {toxinidir}/nailgun/nailgun/fixtures/sample_environment.json
python {toxinidir}/nailgun/manage.py run --config={toxinidir}/nailgun/test.yaml --fake-tasks --fake-tasks-tick-count=80 --fake-tasks-tick-interval=1 {posargs:--port 8000}
[flake8]
# NOTE(eli): H304 is "No relative imports" error, relative
# imports are required for extensions which can be moved
# from nailgun directory to different place
ignore = H234,H302,H802,H304
exclude = .venv,.git,.tox,dist,doc,*lib/python*,*egg,build,tools,__init__.py,docs
show-pep8 = True
show-source = True
count = True
[hacking]
import_exceptions = testtools.matchers