2012-06-11 11:07:14 +01:00
|
|
|
[tox]
|
2013-09-17 16:34:21 +00:00
|
|
|
minversion = 1.6
|
2015-12-22 10:15:21 +01:00
|
|
|
envlist = linters
|
2013-09-19 07:57:23 -07:00
|
|
|
skipsdist = True
|
2012-06-11 11:07:14 +01:00
|
|
|
|
2013-09-17 16:34:21 +00:00
|
|
|
[testenv]
|
2018-08-21 10:59:38 +10:00
|
|
|
basepython = python3
|
2013-09-19 07:57:23 -07:00
|
|
|
usedevelop = True
|
|
|
|
install_command = pip install {opts} {packages}
|
2013-09-17 16:34:21 +00:00
|
|
|
|
2015-12-22 10:15:21 +01:00
|
|
|
[testenv:linters]
|
2020-08-21 13:58:14 +10:00
|
|
|
deps =
|
|
|
|
hacking!=0.13.0,<0.14,>=0.12.0 # Apache-2.0
|
|
|
|
bashate>=0.2 # Apache-2.0
|
|
|
|
PyYAML>=3.10.0 # MIT
|
2020-06-03 13:58:18 -07:00
|
|
|
ansible
|
2020-08-21 13:58:14 +10:00
|
|
|
openstacksdk
|
|
|
|
testtools
|
|
|
|
mock
|
2022-12-12 09:29:47 -08:00
|
|
|
allowlist_externals =
|
|
|
|
bash
|
|
|
|
{toxinidir}/tools/run-bashate.sh
|
2020-03-11 08:23:46 -07:00
|
|
|
setenv =
|
|
|
|
ANSIBLE_LIBRARY= {toxinidir}/tools/fake-ansible/library
|
2015-12-22 10:15:21 +01:00
|
|
|
commands =
|
|
|
|
flake8
|
|
|
|
{toxinidir}/tools/run-bashate.sh
|
2018-06-15 13:58:57 +10:00
|
|
|
python3 {toxinidir}/tools/sorted_modules_env.py {toxinidir}/modules.env
|
|
|
|
python3 {toxinidir}/tools/irc_checks.py
|
|
|
|
python3 {toxinidir}/tools/check_clouds_yaml.py
|
2020-05-26 15:46:41 -05:00
|
|
|
# The following command validates that inventory/base/hosts.yaml
|
2019-06-12 10:23:46 +10:00
|
|
|
# parses, but doesn't do anything.
|
2020-05-26 15:46:41 -05:00
|
|
|
bash -c "ANSIBLE_INVENTORY_PLUGINS=./playbooks/roles/install-ansible/files/inventory_plugins ansible -i ./inventory/base/hosts.yaml not_a_host -a 'true'"
|
2018-11-01 15:31:44 +11:00
|
|
|
python3 -m unittest playbooks/roles/install-ansible/files/inventory_plugins/test_yamlgroup.py
|
2015-12-22 10:15:21 +01:00
|
|
|
|
2014-08-27 14:10:16 -04:00
|
|
|
[testenv:docs]
|
2018-08-20 14:14:30 +10:00
|
|
|
deps = -r{toxinidir}/doc/requirements.txt
|
|
|
|
commands = sphinx-build -W -E -b html doc/source doc/build/html
|
2014-08-27 14:10:16 -04:00
|
|
|
|
2018-08-22 09:46:07 -07:00
|
|
|
[testenv:testinfra]
|
2020-08-21 13:58:14 +10:00
|
|
|
deps =
|
|
|
|
pytest-html # MPL-2.0
|
2022-08-09 11:11:20 +10:00
|
|
|
pytest-testinfra[ansible]>=6.0.0
|
2022-09-16 14:06:19 +10:00
|
|
|
selenium
|
2021-08-13 16:59:10 +00:00
|
|
|
requests
|
2020-08-21 13:58:14 +10:00
|
|
|
|
2020-05-26 15:46:41 -05:00
|
|
|
# This environment assumes a gate-hosts.yaml file has been written.
|
2020-05-20 09:06:40 +10:00
|
|
|
passenv =
|
|
|
|
TESTINFRA_EXTRA_DATA
|
2020-07-13 14:27:58 +10:00
|
|
|
commands = py.test \
|
|
|
|
--junit-xml junit.xml -o junit_family=xunit1 \
|
|
|
|
--html=test-results.html --self-contained-html \
|
|
|
|
--connection=ansible \
|
|
|
|
--ansible-inventory=/home/zuul/src/opendev.org/opendev/system-config/inventory/base/gate-hosts.yaml -v testinfra {posargs}
|
2018-08-22 09:46:07 -07:00
|
|
|
|
2013-09-19 07:57:23 -07:00
|
|
|
[flake8]
|
|
|
|
show-source = True
|
2015-12-07 10:47:37 +01:00
|
|
|
exclude = .tox,.eggs
|
2013-09-19 07:57:23 -07:00
|
|
|
ignore = E125,H
|
2014-05-29 23:48:56 +02:00
|
|
|
select = H231
|