2012-01-31 18:45:53 +00:00
|
|
|
[tox]
|
2016-04-20 00:05:58 +00:00
|
|
|
minversion = 2.3.1
|
2013-09-24 00:26:26 +00:00
|
|
|
skipsdist = True
|
2019-02-28 04:59:06 +00:00
|
|
|
envlist = py37,py36,py27,pep8,api-ref,docs,genconfig,genpolicy,releasenotes
|
2012-01-31 18:45:53 +00:00
|
|
|
|
|
|
|
[testenv]
|
2013-09-24 00:26:26 +00:00
|
|
|
usedevelop = True
|
2018-09-10 05:55:40 +00:00
|
|
|
install_command = pip install {opts} {packages}
|
2012-02-28 08:46:14 +00:00
|
|
|
setenv = VIRTUAL_ENV={envdir}
|
2018-09-10 05:55:40 +00:00
|
|
|
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
|
2015-08-31 00:41:11 +00:00
|
|
|
.[ldap,memcache,mongodb]
|
2016-03-01 16:17:11 +00:00
|
|
|
commands =
|
|
|
|
find keystone -type f -name "*.pyc" -delete
|
2017-09-29 20:33:14 +00:00
|
|
|
stestr run {posargs}
|
2016-03-08 00:43:00 +00:00
|
|
|
whitelist_externals =
|
|
|
|
bash
|
|
|
|
find
|
2015-09-17 03:29:13 +00:00
|
|
|
passenv = http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY PBR_VERSION
|
2012-01-31 18:45:53 +00:00
|
|
|
|
2016-05-23 21:07:59 +00:00
|
|
|
[testenv:api-ref]
|
2018-06-06 20:06:00 +00:00
|
|
|
basepython = python3
|
2018-03-22 08:38:56 +00:00
|
|
|
deps = -r{toxinidir}/doc/requirements.txt
|
2016-05-23 21:07:59 +00:00
|
|
|
commands =
|
2018-03-22 08:38:56 +00:00
|
|
|
bash -c "rm -rf api-ref/build"
|
2016-05-23 21:07:59 +00:00
|
|
|
sphinx-build -W -b html -d api-ref/build/doctrees api-ref/source api-ref/build/html
|
|
|
|
|
2016-02-10 20:06:05 +00:00
|
|
|
[testenv:pep8]
|
2018-06-06 20:06:00 +00:00
|
|
|
basepython = python3
|
2016-01-08 09:09:28 +00:00
|
|
|
deps =
|
|
|
|
.[bandit]
|
|
|
|
{[testenv]deps}
|
2014-08-13 10:25:53 +00:00
|
|
|
commands =
|
2018-11-20 07:21:54 +00:00
|
|
|
flake8 --ignore=D100,D101,D102,D103,D104,E305,E402,E501,W503,W504,W605,E731
|
2016-02-10 20:06:05 +00:00
|
|
|
# Run bash8 during pep8 runs to ensure violations are caught by
|
2014-06-28 07:23:39 +00:00
|
|
|
# the check and gate queues
|
2016-08-08 23:51:24 +00:00
|
|
|
bashate devstack/plugin.sh
|
2016-01-08 09:09:28 +00:00
|
|
|
# Run security linter
|
2016-03-09 00:27:05 +00:00
|
|
|
bandit -r keystone -x tests
|
2012-01-31 18:45:53 +00:00
|
|
|
|
2016-02-17 22:00:33 +00:00
|
|
|
[testenv:bandit]
|
2018-06-06 20:06:00 +00:00
|
|
|
basepython = python3
|
2016-02-17 22:00:33 +00:00
|
|
|
# NOTE(browne): This is required for the integration test job of the bandit
|
|
|
|
# project. Please do not remove.
|
2018-09-10 05:55:40 +00:00
|
|
|
deps = -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt}
|
|
|
|
-r{toxinidir}/requirements.txt
|
|
|
|
.[bandit]
|
2016-03-09 00:27:05 +00:00
|
|
|
commands = bandit -r keystone -x tests
|
2016-02-17 22:00:33 +00:00
|
|
|
|
2012-02-28 08:46:14 +00:00
|
|
|
[testenv:cover]
|
2018-06-06 20:06:00 +00:00
|
|
|
basepython = python3
|
2016-04-17 16:37:04 +00:00
|
|
|
# Also do not run test_coverage_ext tests while gathering coverage as those
|
|
|
|
# tests conflict with coverage.
|
2017-09-15 15:50:56 +00:00
|
|
|
setenv =
|
|
|
|
{[testenv]setenv}
|
|
|
|
PYTHON=coverage run --source keystone --parallel-mode
|
2016-03-01 16:17:11 +00:00
|
|
|
commands =
|
|
|
|
find keystone -type f -name "*.pyc" -delete
|
2017-09-15 15:50:56 +00:00
|
|
|
stestr run {posargs}
|
|
|
|
coverage combine
|
|
|
|
coverage html -d cover
|
|
|
|
coverage xml -o cover/coverage.xml
|
2012-02-28 08:46:14 +00:00
|
|
|
|
2016-03-17 17:14:19 +00:00
|
|
|
[testenv:patch_cover]
|
2018-06-06 20:06:00 +00:00
|
|
|
basepython = python3
|
2016-03-17 17:14:19 +00:00
|
|
|
commands =
|
|
|
|
bash tools/cover.sh
|
|
|
|
|
2012-02-28 08:46:14 +00:00
|
|
|
[testenv:venv]
|
2018-06-06 20:06:00 +00:00
|
|
|
basepython = python3
|
2012-02-28 08:46:14 +00:00
|
|
|
commands = {posargs}
|
2012-12-22 21:36:34 +00:00
|
|
|
|
2013-10-31 17:29:38 +00:00
|
|
|
[testenv:debug]
|
2018-06-06 20:06:00 +00:00
|
|
|
basepython = python3
|
2016-03-01 16:17:11 +00:00
|
|
|
commands =
|
|
|
|
find keystone -type f -name "*.pyc" -delete
|
|
|
|
oslo_debug_helper {posargs}
|
2015-07-17 16:16:37 +00:00
|
|
|
passenv =
|
|
|
|
KSTEST_ADMIN_URL
|
|
|
|
KSTEST_ADMIN_USERNAME
|
|
|
|
KSTEST_ADMIN_PASSWORD
|
|
|
|
KSTEST_ADMIN_DOMAIN_ID
|
|
|
|
KSTEST_PUBLIC_URL
|
|
|
|
KSTEST_USER_USERNAME
|
|
|
|
KSTEST_USER_PASSWORD
|
|
|
|
KSTEST_USER_DOMAIN_ID
|
|
|
|
KSTEST_PROJECT_ID
|
2013-10-31 17:29:38 +00:00
|
|
|
|
2015-01-27 17:05:28 +00:00
|
|
|
[testenv:functional]
|
2018-11-06 11:54:32 +00:00
|
|
|
basepython = python3
|
2015-07-01 23:32:29 +00:00
|
|
|
deps = -r{toxinidir}/test-requirements.txt
|
2015-01-27 17:05:28 +00:00
|
|
|
setenv = OS_TEST_PATH=./keystone/tests/functional
|
2016-03-01 16:17:11 +00:00
|
|
|
commands =
|
|
|
|
find keystone -type f -name "*.pyc" -delete
|
2018-10-09 03:07:59 +00:00
|
|
|
stestr run {posargs}
|
2017-12-13 20:32:00 +00:00
|
|
|
stestr slowest
|
2015-07-17 16:16:37 +00:00
|
|
|
passenv =
|
|
|
|
KSTEST_ADMIN_URL
|
|
|
|
KSTEST_ADMIN_USERNAME
|
|
|
|
KSTEST_ADMIN_PASSWORD
|
|
|
|
KSTEST_ADMIN_DOMAIN_ID
|
|
|
|
KSTEST_PUBLIC_URL
|
|
|
|
KSTEST_USER_USERNAME
|
|
|
|
KSTEST_USER_PASSWORD
|
|
|
|
KSTEST_USER_DOMAIN_ID
|
|
|
|
KSTEST_PROJECT_ID
|
2015-01-27 17:05:28 +00:00
|
|
|
|
2013-05-11 18:48:00 +00:00
|
|
|
[flake8]
|
2015-11-25 00:08:14 +00:00
|
|
|
filename= *.py,keystone-manage
|
2013-05-11 18:48:00 +00:00
|
|
|
show-source = true
|
2017-07-17 05:39:19 +00:00
|
|
|
enable-extensions = H203,H904
|
2013-05-23 15:50:01 +00:00
|
|
|
|
2015-10-01 00:13:00 +00:00
|
|
|
# D100: Missing docstring in public module
|
|
|
|
# D101: Missing docstring in public class
|
|
|
|
# D102: Missing docstring in public method
|
|
|
|
# D103: Missing docstring in public function
|
|
|
|
# D104: Missing docstring in public package
|
2016-06-03 13:45:45 +00:00
|
|
|
# D203: 1 blank line required before class docstring (deprecated in pep257)
|
2018-11-20 07:21:54 +00:00
|
|
|
# TODO(wxy): Fix the pep8 issue.
|
|
|
|
# E402: module level import not at top of file
|
|
|
|
# W503: line break before binary operator
|
|
|
|
# E731: do not assign a lambda expression, use a def
|
|
|
|
ignore = D100,D101,D102,D103,D104,D203,E402,W503,E731
|
2013-05-23 15:50:01 +00:00
|
|
|
|
2016-08-02 12:52:32 +00:00
|
|
|
exclude=.venv,.git,.tox,build,dist,*lib/python*,*egg,tools,vendor,.update-venv,*.ini,*.po,*.pot
|
2014-10-17 06:10:13 +00:00
|
|
|
max-complexity=24
|
2013-10-21 14:10:27 +00:00
|
|
|
|
|
|
|
[testenv:docs]
|
2018-06-06 20:06:00 +00:00
|
|
|
basepython = python3
|
2018-03-22 08:38:56 +00:00
|
|
|
deps =
|
|
|
|
-r{toxinidir}/doc/requirements.txt
|
|
|
|
.[ldap,memcache,mongodb]
|
2013-10-21 14:10:27 +00:00
|
|
|
commands=
|
2015-07-21 05:31:45 +00:00
|
|
|
bash -c "rm -rf doc/build"
|
|
|
|
bash -c "rm -rf doc/source/api"
|
2018-03-22 08:38:56 +00:00
|
|
|
sphinx-build -W -b html doc/source doc/build/html
|
2014-02-12 01:12:17 +00:00
|
|
|
|
2015-11-09 08:12:37 +00:00
|
|
|
[testenv:releasenotes]
|
2018-06-06 20:06:00 +00:00
|
|
|
basepython = python3
|
2017-12-19 05:33:24 +00:00
|
|
|
deps = -r{toxinidir}/doc/requirements.txt
|
2015-11-25 19:28:44 +00:00
|
|
|
commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
|
2015-11-09 08:12:37 +00:00
|
|
|
|
2015-05-15 15:10:28 +00:00
|
|
|
[testenv:genconfig]
|
2018-06-06 20:06:00 +00:00
|
|
|
basepython = python3
|
2014-08-13 14:13:04 +00:00
|
|
|
commands = oslo-config-generator --config-file=config-generator/keystone.conf
|
2013-11-29 14:46:08 +00:00
|
|
|
|
2017-03-08 22:53:24 +00:00
|
|
|
[testenv:genpolicy]
|
2018-06-06 20:06:00 +00:00
|
|
|
basepython = python3
|
2017-04-21 18:20:51 +00:00
|
|
|
commands = oslopolicy-sample-generator --config-file config-generator/keystone-policy-generator.conf
|
2017-03-08 22:53:24 +00:00
|
|
|
|
2013-11-29 14:46:08 +00:00
|
|
|
[hacking]
|
2014-07-02 23:02:08 +00:00
|
|
|
import_exceptions =
|
|
|
|
keystone.i18n
|
2015-04-23 15:04:23 +00:00
|
|
|
six.moves
|
2015-07-17 06:17:30 +00:00
|
|
|
local-check-factory = keystone.tests.hacking.checks.factory
|
2016-10-29 14:26:03 +00:00
|
|
|
|
|
|
|
[testenv:bindep]
|
2018-06-06 20:06:00 +00:00
|
|
|
basepython = python3
|
2016-10-29 14:26:03 +00:00
|
|
|
# Do not install any requirements. We want this to be fast and work even if
|
|
|
|
# system dependencies are missing, since it's used to tell you what system
|
|
|
|
# dependencies are missing! This also means that bindep must be installed
|
|
|
|
# separately, outside of the requirements files.
|
|
|
|
deps = bindep
|
|
|
|
commands = bindep test
|
2018-03-22 18:18:50 +00:00
|
|
|
|
|
|
|
[testenv:lower-constraints]
|
|
|
|
basepython = python3
|
|
|
|
deps =
|
|
|
|
-c{toxinidir}/lower-constraints.txt
|
|
|
|
-r{toxinidir}/test-requirements.txt
|
|
|
|
.[ldap,memcache,mongodb]
|