c67357173e
We do not need tox_install.sh, pip can handle constraints itself and install the project correctly. Thus update tox.ini and remove the now obsolete tools/tox_install.sh file. This follows https://review.openstack.org/#/c/508061 to remove tools/tox_install.sh. Change-Id: I11127d4cc7263ced57309952b71df1c7813f57d6
84 lines
2.5 KiB
INI
84 lines
2.5 KiB
INI
[tox]
|
|
minversion = 1.6
|
|
envlist = py35,py27,pypy,pep8
|
|
skipsdist = True
|
|
|
|
[testenv]
|
|
usedevelop = True
|
|
install_command = pip install {opts} {packages}
|
|
setenv =
|
|
VIRTUAL_ENV={envdir}
|
|
OS_TEST_PATH=./castellan/tests/unit
|
|
deps =
|
|
-c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt}
|
|
-r{toxinidir}/requirements.txt
|
|
-r{toxinidir}/test-requirements.txt
|
|
commands = python setup.py testr --slowest --testr-args='{posargs}'
|
|
|
|
[testenv:pep8]
|
|
commands =
|
|
flake8
|
|
bandit -r castellan -x tests -s B105,B106,B107,B607
|
|
|
|
[testenv:bandit]
|
|
# This command runs the bandit security linter against the castellan
|
|
# codebase minus the tests directory. Some tests are being excluded to
|
|
# reduce the number of positives before a team inspection, and to ensure a
|
|
# passing gate job for initial addition. The excluded tests are:
|
|
# B105-B107: hardcoded password checks - likely to generate false positives
|
|
# in a gate environment
|
|
# B607: start process with a partial path - this should be a project level
|
|
# decision
|
|
commands =
|
|
bandit -r castellan -x tests -s B105,B106,B107,B607
|
|
|
|
[testenv:venv]
|
|
commands = {posargs}
|
|
|
|
[testenv:debug]
|
|
commands = oslo_debug_helper {posargs}
|
|
|
|
[testenv:cover]
|
|
commands =
|
|
python setup.py testr --coverage --testr-args='{posargs}'
|
|
coverage report
|
|
|
|
[testenv:docs]
|
|
commands = python setup.py build_sphinx
|
|
|
|
[testenv:releasenotes]
|
|
commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
|
|
|
|
[testenv:functional]
|
|
usedevelop = True
|
|
install_command = pip install -U {opts} {packages}
|
|
setenv =
|
|
VIRTUAL_ENV={envdir}
|
|
OS_TEST_PATH=./castellan/tests/functional
|
|
commands = python setup.py testr --slowest --testr-args='{posargs}'
|
|
|
|
[testenv:functional-vault]
|
|
passenv = HOME
|
|
usedevelop = True
|
|
install_command = pip install -U {opts} {packages}
|
|
setenv =
|
|
VIRTUAL_ENV={envdir}
|
|
OS_TEST_PATH=./castellan/tests/functional
|
|
commands =
|
|
{toxinidir}/tools/setup-vault-env.sh pifpaf -e VAULT_TEST run vault -- python setup.py testr --slowest --testr-args='{posargs}'
|
|
|
|
[testenv:genconfig]
|
|
commands =
|
|
oslo-config-generator --config-file=etc/castellan/functional-config-generator.conf
|
|
oslo-config-generator --config-file=etc/castellan/sample-config-generator.conf
|
|
|
|
[flake8]
|
|
# [H106] Don't put vim configuration in source files.
|
|
# [H203] Use assertIs(Not)None to check for None.
|
|
show-source = True
|
|
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build
|
|
enable-extensions = H106,H203
|
|
|
|
[hacking]
|
|
import_exceptions = castellan.i18n
|