
Remove pifpaf and dependencies to gnocchi for tox test runs. Remove redundant gabbi tests. Move wsme & query unit tests from fuctional to unit test folder where they belong. Remove integration tests which has been covered in the new tempest cases in the depends on patch. Remove run-tests.sh in favour of just calling stestr. Depends-On: https://review.opendev.org/c/openstack/telemetry-tempest-plugin/+/901838 Change-Id: I5b33cba27dfcb2bbdf12c9bc6b28ecff9aa18d93
129 lines
3.4 KiB
INI
129 lines
3.4 KiB
INI
[tox]
|
|
minversion = 4.2.5
|
|
envlist = py3{,-mysql,-postgresql},functional,pep8
|
|
|
|
[testenv]
|
|
usedevelop = False
|
|
setenv =
|
|
OS_STDOUT_CAPTURE=1
|
|
OS_STDERR_CAPTURE=1
|
|
OS_TEST_TIMEOUT=600
|
|
|
|
AODH_TEST_DRIVERS=postgresql mysql
|
|
mysql: AODH_TEST_DRIVERS=mysql
|
|
postgresql: AODH_TEST_DRIVERS=postgresql
|
|
|
|
AODH_TEST_DEPS=postgresql,mysql
|
|
mysql: AODH_TEST_DEPS=mysql
|
|
postgresql: AODH_TEST_DEPS=postgresql
|
|
deps =
|
|
-c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
|
|
.[{env:AODH_TEST_DEPS}]
|
|
-r{toxinidir}/test-requirements.txt
|
|
-r{toxinidir}/requirements.txt
|
|
passenv =
|
|
OS_TEST_TIMEOUT
|
|
OS_STDOUT_CAPTURE
|
|
OS_STDERR_CAPTURE
|
|
OS_LOG_CAPTURE
|
|
AODH_TEST_DRIVERS
|
|
commands =
|
|
stestr --test-path=./aodh/tests run
|
|
aodh-config-generator
|
|
allowlist_externals =
|
|
bash
|
|
stestr
|
|
|
|
[testenv:cover]
|
|
setenv =
|
|
{[testenv]setenv}
|
|
PYTHON=coverage run --source aodh --parallel-mode
|
|
commands =
|
|
coverage erase
|
|
stestr run {posargs}
|
|
stestr --test-path=./aodh/tests/functional run {posargs}
|
|
coverage combine
|
|
coverage html -d cover
|
|
coverage xml -o cover/coverage.xml
|
|
coverage report
|
|
stestr --test-path=./aodh/tests run
|
|
coverage report
|
|
|
|
[testenv:pep8]
|
|
deps = hacking>=3.0,<3.1.0
|
|
commands =
|
|
flake8
|
|
|
|
[testenv:releasenotes]
|
|
deps = {[testenv:docs]deps}
|
|
commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
|
|
|
|
[testenv:docs]
|
|
usedevelop = True
|
|
deps =
|
|
-c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
|
|
-r{toxinidir}/requirements.txt
|
|
-r{toxinidir}/doc/requirements.txt
|
|
allowlist_externals =
|
|
rm
|
|
commands =
|
|
rm -rf doc/build/html
|
|
sphinx-build -W --keep-going -b html doc/source doc/build/html
|
|
setenv = PYTHONHASHSEED=0
|
|
|
|
[testenv:pdf-docs]
|
|
envdir = {toxworkdir}/docs
|
|
usedevelop = {[testenv:docs]usedevelop}
|
|
deps = {[testenv:docs]deps}
|
|
allowlist_externals =
|
|
make
|
|
rm
|
|
commands =
|
|
rm -rf doc/build/pdf
|
|
sphinx-build -W --keep-going -b latex doc/source doc/build/pdf
|
|
make -C doc/build/pdf
|
|
|
|
[testenv:venv]
|
|
commands = {posargs}
|
|
setenv = PYTHONHASHSEED=0
|
|
|
|
[testenv:debug]
|
|
commands = bash -x oslo_debug_helper {posargs}
|
|
|
|
[testenv:debug-mysql]
|
|
deps =
|
|
gnocchi[mysql, file]
|
|
pifpaf[gnocchi]>=1.0.1
|
|
-c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
|
|
.[mysql]
|
|
-r{toxinidir}/test-requirements.txt
|
|
setenv = OS_TEST_PATH=aodh/tests/functional/
|
|
commands = pifpaf -g AODH_TEST_STORAGE_URL run mysql -- oslo_debug_helper {posargs}
|
|
|
|
[testenv:debug-pgsql]
|
|
deps =
|
|
gnocchi[postgresql, file]
|
|
pifpaf[gnocchi]>=1.0.1
|
|
-c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
|
|
.[postgresql]
|
|
-r{toxinidir}/test-requirements.txt
|
|
setenv = OS_TEST_PATH=aodh/tests/functional/
|
|
commands = pifpaf -g AODH_TEST_STORAGE_URL run postgresql -- oslo_debug_helper {posargs}
|
|
|
|
[flake8]
|
|
# W503 line break before binary operator
|
|
# W504 line break after binary operator
|
|
# E402 module level import not at top of file
|
|
ignore = W503,W504,E402
|
|
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build
|
|
# [H106] Do not put vim configuration in source files.
|
|
# [H203] Use assertIs(Not)None to check for None.
|
|
# [H204] Use assert(Not)Equal to check for equality.
|
|
# [H205] Use assert(Greater|Less)(Equal) for comparison.
|
|
enable-extensions=H106,H203,H204,H205
|
|
show-source = True
|
|
|
|
[hacking]
|
|
import_exceptions =
|
|
aodh.i18n
|