fuel-web/tox.ini
Vladimir Kozhukalov 0eef4668ab Fix python-jobs
The thing is that nailgun tests require postgresql backend to
be available. So, we need to prepare it before running tests.
Fortunately, all unit tests are run on nodes where postgresql
is installed.

Change-Id: Idc14409d2b2d3473d0e3ef9d3e70bda57a331b11
2015-10-20 15:32:21 +03:00

58 lines
1.7 KiB
INI

[tox]
minversion = 1.6
skipsdist = True
setupdir = {toxinidir}/nailgun
envlist = py26,py27,py34,pep8
[testenv]
usedevelop = True
install_command = pip install --allow-external -U {opts} {packages}
whitelist_externals = bash
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
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}
[tox:jenkins]
downloadcache = ~/cache/pip
[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}
[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