db414a96f3
It is better to use the same code to start/stop nailgun for all functional test jobs. fuel-web tox.ini provides envs to start and stop nailgun and we'd better use them before running fuelclient functional tests. Change-Id: Ic385d37a1dced4a19bb6068562cb590d4f1db7bb
82 lines
2.3 KiB
INI
82 lines
2.3 KiB
INI
[tox]
|
|
minversion = 2.1
|
|
skipsdist = True
|
|
envlist = py27,pep8,functional,cleanup
|
|
|
|
[base]
|
|
ARTS = {env:ARTS:test_run}
|
|
|
|
[common]
|
|
changedir={toxinidir}/nailgun
|
|
setenv =
|
|
NAILGUN_DB={env:TEST_NAILGUN_DB:nailgun}
|
|
NAILGUN_DB_USER={env:NAILGUN_DB_USER:nailgun}
|
|
NAILGUN_DB_USERPW={env:NAILGUN_DB_USERPW:nailgun}
|
|
NAILGUN_DB_PREPARE={env:NAILGUN_DB_PREPARE:no}
|
|
|
|
FUEL_WEB_CLONE={env:FUEL_WEB_CLONE:yes}
|
|
FUEL_WEB_REPO={env:FUEL_WEB_REPO:https://github.com/openstack/fuel-web.git}
|
|
FUEL_WEB_COMMIT={env:FUEL_COMMIT:master}
|
|
FUEL_WEB_ROOT={env:FUEL_WEB_ROOT:/tmp/fuel_web}
|
|
FUEL_WEB_FETCH_REPO={env:FUEL_WEB_FETCH_REPO:}
|
|
FUEL_WEB_FETCH_REFSPEC={env:FUEL_WEB_FETCH_REFSPEC:}
|
|
|
|
NAILGUN_PORT={env:NAILGUN_PORT:8000}
|
|
NAILGUN_ROOT={env:FUEL_WEB_ROOT}/nailgun
|
|
FUELCLIENT_CUSTOM_SETTINGS={[base]ARTS}/fuelclient_custom_settings.yaml
|
|
|
|
[testenv]
|
|
usedevelop = True
|
|
whitelist_externals = bash
|
|
python
|
|
setenv = VIRTUAL_ENV={envdir}
|
|
{[common]setenv}
|
|
passenv = http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY
|
|
deps = -r{toxinidir}/requirements.txt
|
|
-r{toxinidir}/test-requirements.txt
|
|
commands =
|
|
ostestr --serial {posargs}
|
|
|
|
[testenv:functional]
|
|
setenv = VIRTUAL_ENV={envdir}
|
|
{[common]setenv}
|
|
OS_TEST_PATH={toxinidir}/fuelclient/tests/functional
|
|
commands =
|
|
bash -c "{toxinidir}/tools/env.sh prepare_fuel_web_repo"
|
|
bash -c "{toxinidir}/tools/env.sh prepare_nailgun"
|
|
bash -c "{toxinidir}/tools/env.sh prepare_fuelclient"
|
|
ostestr --serial {posargs}
|
|
|
|
[testenv:cleanup]
|
|
commands =
|
|
bash -c "{toxinidir}/tools/env.sh cleanup_nailgun"
|
|
bash -c "{toxinidir}/tools/env.sh cleanup_fuel_web_repo"
|
|
bash -c "{toxinidir}/tools/env.sh cleanup_fuelclient"
|
|
bash -c "find {toxinidir} -name \"*.pyc\" -delete"
|
|
|
|
[testenv:pep8]
|
|
commands =
|
|
flake8 {posargs:fuelclient}
|
|
|
|
[testenv:cover]
|
|
commands =
|
|
python setup.py test --coverage --testr-args '{posargs}'
|
|
|
|
[testenv:venv]
|
|
commands = {posargs:}
|
|
|
|
[testenv:devenv]
|
|
envdir = devenv
|
|
usedevelop = True
|
|
|
|
[flake8]
|
|
# TODO(atykhonov): H405 must be removed when old CLI is removed
|
|
ignore = H405
|
|
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
|