Use centralised Ansible test scripts
This patch consumes the centralised Ansible test scripts implemented in https://review.openstack.org/381853 Change-Id: Ia7faf310deabfaea32feb400ca7f8886b5cca7ff
This commit is contained in:
parent
aa995b87d0
commit
6ab8f43a7a
71
tox.ini
71
tox.ini
@ -23,8 +23,10 @@ passenv =
|
||||
whitelist_externals =
|
||||
bash
|
||||
setenv =
|
||||
ANSIBLE_INVENTORY={toxinidir}/tests/lxb_inventory
|
||||
PYTHONUNBUFFERED=1
|
||||
ROLE_NAME=os_neutron
|
||||
TEST_IDEMPOTENCE=false
|
||||
VIRTUAL_ENV={envdir}
|
||||
WORKING_DIR={toxinidir}
|
||||
|
||||
@ -83,28 +85,22 @@ commands =
|
||||
deps =
|
||||
{[testenv]deps}
|
||||
-rhttp://git.openstack.org/cgit/openstack/openstack-ansible-tests/plain/test-ansible-deps.txt
|
||||
commands =
|
||||
{[testenv:tests_clone]commands}
|
||||
bash -c "{toxinidir}/tests/common/test-ansible-env-prep.sh"
|
||||
|
||||
|
||||
[testenv:ansible-syntax]
|
||||
deps =
|
||||
{[testenv:ansible]deps}
|
||||
commands =
|
||||
{[testenv:ansible]commands}
|
||||
ansible-playbook -i {toxinidir}/tests/lxb_inventory \
|
||||
--syntax-check \
|
||||
--list-tasks \
|
||||
{toxinidir}/tests/test.yml
|
||||
{[testenv:tests_clone]commands}
|
||||
bash -c "{toxinidir}/tests/common/test-ansible-syntax.sh"
|
||||
|
||||
|
||||
[testenv:ansible-lint]
|
||||
deps =
|
||||
{[testenv:ansible]deps}
|
||||
commands =
|
||||
{[testenv:ansible]commands}
|
||||
ansible-lint {toxinidir}
|
||||
{[testenv:tests_clone]commands}
|
||||
bash -c "{toxinidir}/tests/common/test-ansible-lint.sh"
|
||||
|
||||
|
||||
[testenv:func_base]
|
||||
@ -115,60 +111,51 @@ install_command =
|
||||
pip install -U --force-reinstall {opts} {packages}
|
||||
|
||||
|
||||
[testenv:func_logs]
|
||||
commands =
|
||||
bash -c "{toxinidir}/tests/common/test-log-collect.sh"
|
||||
|
||||
|
||||
[testenv:functional]
|
||||
# Ignore_errors is set to true so that the logs are collected at the
|
||||
# end of the run. This will not produce a false positive. Any
|
||||
# exception will be mark the run as failed and exit 1 after all of
|
||||
# the commands have been iterated through.
|
||||
ignore_errors = True
|
||||
# NOTE(automagically): this target tests neutron with linuxbridge
|
||||
# NOTE(odyssey4me): this target does not use constraints because
|
||||
# it doesn't work in OpenStack-CI yet. Once that's fixed, we can
|
||||
# drop the install_command.
|
||||
install_command =
|
||||
{[testenv:func_base]install_command}
|
||||
deps =
|
||||
{[testenv:ansible]deps}
|
||||
commands =
|
||||
{[testenv:ansible]commands}
|
||||
ansible-playbook -i {toxinidir}/tests/lxb_inventory \
|
||||
{toxinidir}/tests/test.yml -vvvv
|
||||
{[testenv:func_logs]commands}
|
||||
{[testenv:tests_clone]commands}
|
||||
bash -c "{toxinidir}/tests/common/test-ansible-functional.sh"
|
||||
|
||||
|
||||
[testenv:func_ovs]
|
||||
# Ignore_errors is set to true so that the logs are collected at the
|
||||
# end of the run. This will not produce a false positive. Any
|
||||
# exception will be mark the run as failed and exit 1 after all of
|
||||
# the commands have been iterated through.
|
||||
ignore_errors = True
|
||||
# NOTE(automagically): this target tests neutron with ovs
|
||||
# NOTE(odyssey4me): this target does not use constraints because
|
||||
# it doesn't work in OpenStack-CI yet. Once that's fixed, we can
|
||||
# drop the install_command.
|
||||
install_command =
|
||||
{[testenv:func_base]install_command}
|
||||
deps =
|
||||
{[testenv:ansible]deps}
|
||||
setenv =
|
||||
{[testenv]setenv}
|
||||
ANSIBLE_INVENTORY={toxinidir}/tests/ovs_inventory
|
||||
ANSIBLE_OVERRIDES={toxinidir}/tests/neutron-overrides-ovs.yml
|
||||
commands =
|
||||
{[testenv:ansible]commands}
|
||||
ansible-playbook -i {toxinidir}/tests/ovs_inventory \
|
||||
-e @{toxinidir}/tests/neutron-overrides-ovs.yml \
|
||||
{toxinidir}/tests/test.yml -vvvv
|
||||
{[testenv:func_logs]commands}
|
||||
{[testenv:tests_clone]commands}
|
||||
bash -c "{toxinidir}/tests/common/test-ansible-functional.sh"
|
||||
|
||||
|
||||
[testenv:calico]
|
||||
# NOTE(logan): this target tests neutron with calico
|
||||
# NOTE(odyssey4me): this target does not use constraints because
|
||||
# it doesn't work in OpenStack-CI yet. Once that's fixed, we can
|
||||
# drop the install_command.
|
||||
install_command =
|
||||
{[testenv:func_base]install_command}
|
||||
deps =
|
||||
{[testenv:ansible]deps}
|
||||
setenv =
|
||||
{[testenv]setenv}
|
||||
ANSIBLE_INVENTORY={toxinidir}/tests/calico_inventory
|
||||
ANSIBLE_OVERRIDES={toxinidir}/tests/neutron-overrides-calico.yml
|
||||
commands =
|
||||
{[testenv:ansible]commands}
|
||||
ansible-playbook -i {toxinidir}/tests/calico_inventory \
|
||||
-e @{toxinidir}/tests/neutron-overrides-calico.yml \
|
||||
{toxinidir}/tests/test.yml -vvvv
|
||||
{[testenv:func_logs]commands}
|
||||
{[testenv:tests_clone]commands}
|
||||
bash -c "{toxinidir}/tests/common/test-ansible-functional.sh"
|
||||
|
||||
|
||||
[testenv:linters]
|
||||
|
Loading…
Reference in New Issue
Block a user