fuel-web/tox.ini
Igor Belikov 4d8a2f29bf Align nailgun docs building with OS-Infra
This is a first step in moving Nailgun API docs building and publishing
to upstream infra. To enable gate-fuel-web-docs job docs should be able
to be built with 'tox -evenv -- python setup.py build_sphinx' command and
html output should be available in doc/build/html directory.

Change-Id: I42eb69a4060f50c8ef99cef4d54577078c1c846c
2016-04-25 19:33:43 +03:00

101 lines
2.9 KiB
INI

[tox]
minversion = 1.6
skipsdist = True
setupdir = {toxinidir}/nailgun
envlist = py27,py34,pep8
[base]
ARTS = {env:ARTS:test_run}
TOOLS = {toxinidir}/nailgun/tools
[common]
changedir={toxinidir}/nailgun
setenv =
DB_ROOT={env:DB_ROOT:postgres}
DB_ROOTPW={env:DB_ROOTPW:insecure_slave}
DB_ROOTPGPASS={[base]ARTS}/pgpass
NAILGUN_DB={env:NAILGUN_DB:openstack_citest}
NAILGUN_DB_HOST={env:NAILGUN_DB_HOST:127.0.0.1}
NAILGUN_DB_PORT={env:NAILGUN_DB_PORT:5432}
NAILGUN_DB_USER={env:NAILGUN_DB_USER:openstack_citest}
NAILGUN_DB_USERPW={env:NAILGUN_DB_USERPW:openstack_citest}
NAILGUN_ROOT={toxinidir}/nailgun
NAILGUN_STATIC={env:NAILGUN_STATIC:static}
NAILGUN_TEMPLATES={env:NAILGUN_TEMPLATES:static}
NAILGUN_FIXTURE_FILES={env:NAILGUN_FIXTURE_FILES:}
NAILGUN_CONFIG={[base]ARTS}/test.yaml
NAILGUN_LOGS={[base]ARTS}
NAILGUN_PORT={env:NAILGUN_PORT:8000}
NAILGUN_START_MAX_WAIT_TIME=20
NAILGUN_CHECK_URL=/api/version
[testenv]
usedevelop = True
install_command = pip install --allow-external -U {opts} {packages}
whitelist_externals = bash
python
changedir={toxinidir}/nailgun
setenv = VIRTUAL_ENV={envdir}
{[common]setenv}
passenv = http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY
deps = -r{toxinidir}/nailgun/test-requirements.txt
commands =
bash -c "{[base]TOOLS}/env.sh prepare_nailgun_env"
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:cleanup]
usedevelop = False
setenv = VIRTUAL_ENV={envdir}
{[common]setenv}
deps =
commands =
bash -c "{[base]TOOLS}/env.sh cleanup_nailgun_database"
bash -c "{[base]TOOLS}/env.sh cleanup_nailgun_env"
[testenv:start]
setenv = VIRTUAL_ENV={envdir}
{[common]setenv}
deps = -r{toxinidir}/nailgun/requirements.txt
commands =
bash -c "{[base]TOOLS}/env.sh prepare_nailgun_env"
bash -c "{[base]TOOLS}/env.sh prepare_nailgun_database"
bash -c "{[base]TOOLS}/env.sh prepare_nailgun_server"
[testenv:stop]
usedevelop = False
setenv = VIRTUAL_ENV={envdir}
{[common]setenv}
deps =
commands =
bash -c "{[base]TOOLS}/env.sh cleanup_nailgun_server"
[testenv:cover]
setenv = NOSE_WITH_COVERAGE=1
[testenv:venv]
deps = -r{toxinidir}/nailgun/test-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