2012-06-11 10:07:14 +00:00
|
|
|
[tox]
|
2013-09-17 16:34:21 +00:00
|
|
|
minversion = 1.6
|
2015-12-22 09:15:21 +00:00
|
|
|
envlist = linters
|
2013-09-19 14:57:23 +00:00
|
|
|
skipsdist = True
|
2012-06-11 10:07:14 +00:00
|
|
|
|
2013-09-17 16:34:21 +00:00
|
|
|
[testenv]
|
2018-08-21 00:59:38 +00:00
|
|
|
basepython = python3
|
2013-09-19 14:57:23 +00:00
|
|
|
usedevelop = True
|
|
|
|
install_command = pip install {opts} {packages}
|
2013-09-17 16:34:21 +00:00
|
|
|
|
2015-12-22 09:15:21 +00:00
|
|
|
[testenv:linters]
|
2020-08-21 03:58:14 +00: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 20:58:18 +00:00
|
|
|
ansible
|
2020-08-21 03:58:14 +00:00
|
|
|
openstacksdk
|
|
|
|
testtools
|
|
|
|
mock
|
2017-01-12 20:32:46 +00:00
|
|
|
whitelist_externals = bash
|
2020-03-11 15:23:46 +00:00
|
|
|
setenv =
|
|
|
|
ANSIBLE_LIBRARY= {toxinidir}/tools/fake-ansible/library
|
2015-12-22 09:15:21 +00:00
|
|
|
commands =
|
|
|
|
flake8
|
|
|
|
{toxinidir}/tools/run-bashate.sh
|
2018-06-15 03:58:57 +00: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 20:46:41 +00:00
|
|
|
# The following command validates that inventory/base/hosts.yaml
|
2019-06-12 00:23:46 +00:00
|
|
|
# parses, but doesn't do anything.
|
2020-05-26 20:46:41 +00: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 04:31:44 +00:00
|
|
|
python3 -m unittest playbooks/roles/install-ansible/files/inventory_plugins/test_yamlgroup.py
|
2015-12-22 09:15:21 +00:00
|
|
|
|
2014-08-27 18:10:16 +00:00
|
|
|
[testenv:docs]
|
2018-08-20 04:14:30 +00:00
|
|
|
deps = -r{toxinidir}/doc/requirements.txt
|
|
|
|
commands = sphinx-build -W -E -b html doc/source doc/build/html
|
2014-08-27 18:10:16 +00:00
|
|
|
|
2018-08-22 16:46:07 +00:00
|
|
|
[testenv:testinfra]
|
2020-08-21 03:58:14 +00:00
|
|
|
deps =
|
2020-11-17 23:02:56 +00:00
|
|
|
ansible-base # see install-ansible/tasks/main.yaml
|
2020-08-21 03:58:14 +00:00
|
|
|
pytest-html # MPL-2.0
|
2020-11-09 14:58:43 +00:00
|
|
|
pytest-testinfra>=6.0.0
|
2020-12-15 04:22:26 +00:00
|
|
|
selenium
|
2021-08-13 16:59:10 +00:00
|
|
|
requests
|
2020-08-21 03:58:14 +00:00
|
|
|
|
2020-05-26 20:46:41 +00:00
|
|
|
# This environment assumes a gate-hosts.yaml file has been written.
|
2020-05-19 23:06:40 +00:00
|
|
|
passenv =
|
|
|
|
TESTINFRA_EXTRA_DATA
|
2020-07-13 04:27:58 +00: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 16:46:07 +00:00
|
|
|
|
2013-09-19 14:57:23 +00:00
|
|
|
[flake8]
|
|
|
|
show-source = True
|
2015-12-07 09:47:37 +00:00
|
|
|
exclude = .tox,.eggs
|
2013-09-19 14:57:23 +00:00
|
|
|
ignore = E125,H
|
2014-05-29 21:48:56 +00:00
|
|
|
select = H231
|