114cdeb7eb
If you have a -c in the install_cmd it gets used with all the deps supplied this means that the lower-constraints job actually install from upper-constraints :( You can see what I mean in [1] Note both lower-constraints.txt and upper-constraints.txt are used ; and --- Collecting oslo.log===3.39.0 (from -c /home/zuul/src/git.openstack.org/openstack/requirements/upper-constraints.txt (line 247)) --- With this fixed we find a few minimums that needs to be bumped: * oslo.policy >= 1.33.0 keystone uses the scope_types[2] kwarg to RuleDefault which was introduced in 52c82ff9ab04dd78ff7045cb30d2f5de535dd7da which is contained in 1.32.0 ; also we need the 'policy-in-code' feature which is in 1.33.0 * oslo.log >= 0.38.0 keystone used the ROCKY[3] constant for deprecations which was introduced in d68a895ee8e61b5c9d4ef368e7f04252e84649e9 which is contained in 3.38.0 * msgpack >= 0.5.0 the 0.4.x versions have been removed from pypi so we have to bump the minimum :( * SQLAlchemy >= 1.0.13 identity_provider_id in token payload is byte in python3 which triggers a sqlalchemy bug[4]. The bug has been fixed in 1.0.13 * keystonemiddleware >= 5.1.0 unified limit feature uses system scope feature which is supported in keystonemiddleware after 5.1.0 We also add correct some errors in bindep.txt related to use on Fedora [1] http://logs.openstack.org/47/599447/2/check/openstack-tox-lower-constraints/bbc912b/tox/lower-constraints-1.log [2] http://git.openstack.org/cgit/openstack/keystone/tree/keystone/common/policies/access_token.py#n24 [3] http://git.openstack.org/cgit/openstack/keystone/tree/keystone/conf/default.py#n50 [4] http://docs.sqlalchemy.org/en/latest/changelog/changelog_10.html#change-a14dd2e73d889d065acc07a77b1ee7cb Change-Id: Ic0de6799fddd86a70abae2c87c92d565072ebdb9
176 lines
4.8 KiB
INI
176 lines
4.8 KiB
INI
[tox]
|
|
minversion = 2.3.1
|
|
skipsdist = True
|
|
envlist = py35,py27,pep8,api-ref,docs,genconfig,genpolicy,releasenotes
|
|
|
|
[testenv]
|
|
usedevelop = True
|
|
install_command = pip install {opts} {packages}
|
|
setenv = VIRTUAL_ENV={envdir}
|
|
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
|
|
.[ldap,memcache,mongodb]
|
|
commands =
|
|
find keystone -type f -name "*.pyc" -delete
|
|
stestr run {posargs}
|
|
whitelist_externals =
|
|
bash
|
|
find
|
|
passenv = http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY PBR_VERSION
|
|
|
|
[testenv:api-ref]
|
|
basepython = python3
|
|
deps = -r{toxinidir}/doc/requirements.txt
|
|
commands =
|
|
bash -c "rm -rf api-ref/build"
|
|
sphinx-build -W -b html -d api-ref/build/doctrees api-ref/source api-ref/build/html
|
|
|
|
[testenv:pep8]
|
|
basepython = python3
|
|
deps =
|
|
.[bandit]
|
|
{[testenv]deps}
|
|
commands =
|
|
flake8
|
|
# Run bash8 during pep8 runs to ensure violations are caught by
|
|
# the check and gate queues
|
|
bashate devstack/plugin.sh
|
|
# Run security linter
|
|
bandit -r keystone -x tests
|
|
|
|
[testenv:bandit]
|
|
basepython = python3
|
|
# NOTE(browne): This is required for the integration test job of the bandit
|
|
# project. Please do not remove.
|
|
deps = -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt}
|
|
-r{toxinidir}/requirements.txt
|
|
.[bandit]
|
|
commands = bandit -r keystone -x tests
|
|
|
|
[testenv:cover]
|
|
basepython = python3
|
|
# Also do not run test_coverage_ext tests while gathering coverage as those
|
|
# tests conflict with coverage.
|
|
setenv =
|
|
{[testenv]setenv}
|
|
PYTHON=coverage run --source keystone --parallel-mode
|
|
commands =
|
|
find keystone -type f -name "*.pyc" -delete
|
|
stestr run {posargs}
|
|
coverage combine
|
|
coverage html -d cover
|
|
coverage xml -o cover/coverage.xml
|
|
|
|
[testenv:patch_cover]
|
|
basepython = python3
|
|
commands =
|
|
bash tools/cover.sh
|
|
|
|
[testenv:venv]
|
|
basepython = python3
|
|
commands = {posargs}
|
|
|
|
[testenv:debug]
|
|
basepython = python3
|
|
commands =
|
|
find keystone -type f -name "*.pyc" -delete
|
|
oslo_debug_helper {posargs}
|
|
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
|
|
|
|
[testenv:debug-py35]
|
|
basepython = python3.5
|
|
commands =
|
|
# Cleanup *pyc
|
|
find keystone -type f -name "*.pyc" -delete
|
|
oslo_debug_helper {posargs}
|
|
|
|
[testenv:functional]
|
|
basepython = python3.5
|
|
deps = -r{toxinidir}/test-requirements.txt
|
|
setenv = OS_TEST_PATH=./keystone/tests/functional
|
|
commands =
|
|
find keystone -type f -name "*.pyc" -delete
|
|
stestr run '{posargs}'
|
|
stestr slowest
|
|
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
|
|
|
|
[flake8]
|
|
filename= *.py,keystone-manage
|
|
show-source = true
|
|
enable-extensions = H203,H904
|
|
|
|
# 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
|
|
# D203: 1 blank line required before class docstring (deprecated in pep257)
|
|
ignore = D100,D101,D102,D103,D104,D203
|
|
|
|
exclude=.venv,.git,.tox,build,dist,*lib/python*,*egg,tools,vendor,.update-venv,*.ini,*.po,*.pot
|
|
max-complexity=24
|
|
|
|
[testenv:docs]
|
|
basepython = python3
|
|
deps =
|
|
-r{toxinidir}/doc/requirements.txt
|
|
.[ldap,memcache,mongodb]
|
|
commands=
|
|
bash -c "rm -rf doc/build"
|
|
bash -c "rm -rf doc/source/api"
|
|
sphinx-build -W -b html doc/source doc/build/html
|
|
|
|
[testenv:releasenotes]
|
|
basepython = python3
|
|
deps = -r{toxinidir}/doc/requirements.txt
|
|
commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
|
|
|
|
[testenv:genconfig]
|
|
basepython = python3
|
|
commands = oslo-config-generator --config-file=config-generator/keystone.conf
|
|
|
|
[testenv:genpolicy]
|
|
basepython = python3
|
|
commands = oslopolicy-sample-generator --config-file config-generator/keystone-policy-generator.conf
|
|
|
|
[hacking]
|
|
import_exceptions =
|
|
keystone.i18n
|
|
six.moves
|
|
local-check-factory = keystone.tests.hacking.checks.factory
|
|
|
|
[testenv:bindep]
|
|
basepython = python3
|
|
# 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
|
|
|
|
[testenv:lower-constraints]
|
|
basepython = python3
|
|
deps =
|
|
-c{toxinidir}/lower-constraints.txt
|
|
-r{toxinidir}/test-requirements.txt
|
|
.[ldap,memcache,mongodb]
|