From c45a043407fc7a209f610dd633d21d38f9f4aeee Mon Sep 17 00:00:00 2001 From: Jesse Pretorius Date: Wed, 5 Oct 2016 12:18:14 +0100 Subject: [PATCH] Use centralised Ansible test scripts This patch consumes the centralised Ansible test scripts implemented in https://review.openstack.org/381853 Change-Id: I3300e7111263e7a4daf8bc39286e9b1a8c67b87f --- tox.ini | 32 +++++++------------------------- 1 file changed, 7 insertions(+), 25 deletions(-) diff --git a/tox.ini b/tox.ini index 6c19fe4..b25eed7 100644 --- a/tox.ini +++ b/tox.ini @@ -24,7 +24,7 @@ whitelist_externals = bash setenv = PYTHONUNBUFFERED=1 - ROLE_NAME=os_sahara + TEST_IDEMPOTENCE=false VIRTUAL_ENV={envdir} WORKING_DIR={toxinidir} @@ -83,28 +83,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/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,17 +109,7 @@ 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(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. @@ -134,10 +118,8 @@ install_command = deps = {[testenv:ansible]deps} commands = - {[testenv:ansible]commands} - ansible-playbook -i {toxinidir}/tests/inventory \ - {toxinidir}/tests/test.yml -vvvv - {[testenv:func_logs]commands} + {[testenv:tests_clone]commands} + bash -c "{toxinidir}/tests/common/test-ansible-functional.sh" [testenv:linters]