octavia/tox.ini
Grant Murphy 61a9894527 Add bandit baseline to tox
Bandit baseline will check the last commit to see if
it introduced any new security problems.

Details of how bandit can be configured for the gate are
documented here:

https://wiki.openstack.org/wiki/Security/Projects/Bandit#Gate_Testing_with_Bandit

Change-Id: I791d897c4efe00bc4c0fd3b9d249e561eeb82acb
Partial-Bug: #1552002
2016-03-03 22:42:15 +00:00

78 lines
1.9 KiB
INI

[tox]
minversion = 1.6
envlist = docs,py34,py27,pep8,specs
skipsdist = True
[testenv]
usedevelop = True
setenv = VIRTUAL_ENV={envdir}
install_command = pip install -U {opts} {packages}
whitelist_externals = find
deps = -r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
-r{toxinidir}/doc-requirements.txt
commands =
find . -type f -name "*.pyc" -delete
python setup.py testr --slowest --testr-args='{posargs}'
[testenv:cover]
commands = python setup.py testr --coverage --testr-args='{posargs}'
[testenv:debug]
commands = oslo_debug_helper {posargs}
[testenv:debug-py27]
basepython = python2.7
commands = oslo_debug_helper {posargs}
[testenv:debug-py34]
basepython = python3.4
commands = oslo_debug_helper {posargs}
[testenv:pep8]
commands = flake8
doc8 specs doc/source octavia \
CONSTITUTION.rst HACKING.rst README.rst
[testenv:docs]
commands = python setup.py build_sphinx
[testenv:venv]
commands = {posargs}
[testenv:genconfig]
commands =
oslo-config-generator --output-file etc/octavia/octavia.conf.sample \
--namespace octavia \
--namespace oslo.db \
--namespace oslo.log \
--namespace oslo.messaging \
--namespace keystonemiddleware.auth_token
[testenv:specs]
commands =
find . -type f -name "*.pyc" -delete
python -m unittest specs-tests.test_titles
[testenv:bandit]
commands = bandit-baseline -r octavia -ll -ii
[flake8]
# Ignoring O321 because it's unnecessarily restricting use of json package.
# jsonutils version doesn't add additional value
ignore = O321
show-source = true
builtins = _
exclude = .venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,build
[hacking]
import_exceptions = octavia.i18n
local-check-factory = octavia.hacking.checks.factory
[doc8]
max-line-length = 79
[testenv:releasenotes]
commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html