e9db59d3b3
Creates api-ref test env Add basic v2/zones API documentation Change-Id: I1783234c59319fdcb13b0df90f662253e822bab3 Depends-On: I0e615d36a2e5a8fa0d83f20bdcc2c33ad868ebd5
145 lines
5.0 KiB
INI
145 lines
5.0 KiB
INI
[tox]
|
|
minversion = 1.6
|
|
envlist = py34,py27,flake8
|
|
skipsdist = True
|
|
|
|
[testenv]
|
|
usedevelop = True
|
|
install_command = pip install -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt?h=master} {opts} {packages}
|
|
deps = -r{toxinidir}/requirements.txt
|
|
-r{toxinidir}/test-requirements.txt
|
|
setenv =
|
|
PYTHONDONTWRITEBYTECODE=1
|
|
whitelist_externals = sh
|
|
find
|
|
rm
|
|
commands =
|
|
find . -type f -name "*.pyc" -delete
|
|
sh tools/pretty_tox.sh '{posargs}'
|
|
passenv = http_proxy
|
|
HTTP_PROXY
|
|
https_proxy
|
|
HTTPS_PROXY
|
|
no_proxy
|
|
NO_PROXY
|
|
OS_DEBUG
|
|
OS_LOG_CAPTURE
|
|
OS_STDERR_CAPTURE
|
|
OS_STDOUT_CAPTURE
|
|
|
|
[testenv:py34]
|
|
commands =
|
|
ostestr --blacklist_file=tests-py3.txt
|
|
|
|
[testenv:docs]
|
|
commands = rm -rf doc/build
|
|
sphinx-build -E -W -b html doc/source doc/build/html
|
|
|
|
[testenv:cover]
|
|
# NOTE(kiall): this target does not use constraints because upstream infra does
|
|
# not yet support it. Once that's fixed, we can drop the
|
|
# install_command.
|
|
install_command = pip install {opts} {packages}
|
|
commands = python setup.py testr --coverage --testr-args='{posargs}'
|
|
|
|
[testenv:bandit]
|
|
deps = -r{toxinidir}/test-requirements.txt
|
|
commands = bandit -r designate -n5 -x tests -t \
|
|
B111,B505,B504,B503,B502,B501,B604,B605,B001,B601,B602,B701,B609,B702,\
|
|
B608,B506,B312,B310,B411,B109,B108,B103,B102,B309,B308,B302,B307,B306
|
|
|
|
[testenv:debug]
|
|
commands = oslo_debug_helper {posargs}
|
|
|
|
[testenv:flake8]
|
|
deps = -r{toxinidir}/test-requirements.txt
|
|
commands = sh tools/pretty_flake8.sh
|
|
{[testenv:bandit]commands}
|
|
|
|
[testenv:pep8]
|
|
deps = -r{toxinidir}/test-requirements.txt
|
|
basepython = python2.7
|
|
commands = sh tools/pretty_flake8.sh
|
|
{[testenv:bandit]commands}
|
|
|
|
[testenv:bashate]
|
|
deps = bashate
|
|
whitelist_externals = bash
|
|
commands = bash -c "find {toxinidir}/devstack \
|
|
-not \( -type d -name .?\* -prune \) \
|
|
-not \( -type d -name doc -prune \) \
|
|
-type f \
|
|
-not -name \*~ \
|
|
-not -name \*.md \
|
|
\( \
|
|
-name \*.sh -or \
|
|
-name \*rc -or \
|
|
-name functions\* -or \
|
|
-wholename \*/lib/\* \
|
|
\) \
|
|
-print0 | xargs -0 bashate -v"
|
|
|
|
[testenv:pip-check-reqs]
|
|
# do not install test-requirements as that will pollute the virtualenv for
|
|
# determining missing packages
|
|
# this also means that pip-missing-reqs must be installed separately, outside
|
|
# of the requirements.txt files
|
|
deps = pip-check-reqs
|
|
-r{toxinidir}/requirements.txt
|
|
commands=pip-missing-reqs -d --ignore-file=designate/tests/* designate
|
|
|
|
[testenv:functional]
|
|
usedevelop = False
|
|
setenv = VIRTUAL_ENV={envdir}
|
|
OS_TEST_PATH=functionaltests/
|
|
passenv = TEMPEST_CONFIG
|
|
OS_STDOUT_CAPTURE
|
|
OS_STDERR_CAPTURE
|
|
OS_LOG_CAPTURE
|
|
OS_DEBUG
|
|
|
|
[testenv:api-ref]
|
|
# This environment is called from CI scripts to test and publish
|
|
# the API Ref to developer.openstack.org.
|
|
# NOTE(sdague): this target does not use constraints because
|
|
# upstream infra does not yet support it. Once that's fixed, we can
|
|
# drop the install_command.
|
|
#
|
|
# we do not used -W here because we are doing some slightly tricky
|
|
# things to build a single page document, and as such, we are ok
|
|
# ignoring the duplicate stanzas warning.
|
|
commands =
|
|
rm -rf api-ref/build
|
|
sphinx-build -E -b html -d api-ref/build/doctrees api-ref/source api-ref/build/html
|
|
|
|
[testenv:releasenotes]
|
|
# NOTE(kiall): this target does not use constraints because upstream infra does
|
|
# not yet support it. Once that's fixed, we can drop the
|
|
# install_command.
|
|
install_command = pip install {opts} {packages}
|
|
commands = sphinx-build -a -E -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
|
|
|
|
[testenv:venv]
|
|
# NOTE(kiall): this target does not use constraints because upstream infra does
|
|
# not yet support it. Once that's fixed, we can drop the
|
|
# install_command.
|
|
install_command = pip install {opts} {packages}
|
|
commands = {posargs}
|
|
|
|
[flake8]
|
|
# ignored flake8 codes:
|
|
# H302 import only modules
|
|
# H306 imports not in alphabetical order
|
|
# H402 one line docstring needs punctuation
|
|
# H404 multi line docstring should start with a summary
|
|
# H405 multi line docstring summary not separated with an empty line
|
|
# H904 Wrap long lines in parentheses instead of a backslash
|
|
# E126 continuation line over-indented for hanging indent
|
|
# E128 continuation line under-indented for visual indent
|
|
|
|
ignore = H302,H306,H402,H404,H405,H904,E126,E128
|
|
exclude = .venv,.git,.tox,dist,doc,*openstack/common*,*openstack/deprecated*,*lib/python*,*egg,build,tools,.ropeproject
|
|
|
|
[hacking]
|
|
local-check-factory = designate.hacking.checks.factory
|