Use centralised Ansible test scripts

This patch consumes the centralised Ansible test scripts
implemented in https://review.openstack.org/381853

Change-Id: If66de2e76c530ded122fce3aaca127adc02840c1
This commit is contained in:
Jesse Pretorius 2016-10-05 12:15:18 +01:00 committed by Jesse Pretorius (odyssey4me)
parent 403d5b889e
commit 4d720c9d0e
2 changed files with 26 additions and 51 deletions

77
tox.ini
View File

@ -25,6 +25,7 @@ whitelist_externals =
setenv =
PYTHONUNBUFFERED=1
ROLE_NAME=os_keystone
TEST_IDEMPOTENCE=false
VIRTUAL_ENV={envdir}
WORKING_DIR={toxinidir}
@ -83,28 +84,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,69 +110,49 @@ 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(andymccr): this target will test keystone with apache & mod_wsgi
# 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/inventory \
-e @{toxinidir}/tests/keystone-overrides.yml \
{toxinidir}/tests/test.yml -vvvv
{[testenv:func_logs]commands}
{[testenv:tests_clone]commands}
bash -c "{toxinidir}/tests/common/test-ansible-functional.sh"
[testenv:uwsgi_apache]
# 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(stevelle): this will test keystone with uwsgi & apache
# 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_PARAMETERS=-vvv -e keystone_mod_wsgi_enabled=False
commands =
{[testenv:ansible]commands}
ansible-playbook -i {toxinidir}/tests/inventory \
-e @{toxinidir}/tests/keystone-overrides.yml \
-e "keystone_mod_wsgi_enabled=False" \
{toxinidir}/tests/test.yml -vvvv
{[testenv:func_logs]commands}
{[testenv:tests_clone]commands}
bash -c "{toxinidir}/tests/common/test-ansible-functional.sh"
[testenv:uwsgi_nginx]
# 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(andymccr): this will test keystone with uwsgi & nginx
# 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_PARAMETERS=-vvv -e keystone_apache_enabled=False -e keystone_mod_wsgi_enabled=False
commands =
{[testenv:ansible]commands}
ansible-playbook -i {toxinidir}/tests/inventory \
-e @{toxinidir}/tests/keystone-overrides.yml \
-e "keystone_apache_enabled=False" \
-e "keystone_mod_wsgi_enabled=False" \
{toxinidir}/tests/test.yml -vvvv
{[testenv:func_logs]commands}
{[testenv:tests_clone]commands}
bash -c "{toxinidir}/tests/common/test-ansible-functional.sh"
[testenv:linters]