Use centralised Ansible test scripts

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

Combined backport of:
- https://review.openstack.org/382297
- https://review.openstack.org/388429

Change-Id: I29e4163af37116409a128da589d655d165fb13ab
(cherry picked from commit 0a8d5006c6)
This commit is contained in:
Jesse Pretorius 2016-10-05 12:13:39 +01:00
parent ba55f1d601
commit 893864bf7f
6 changed files with 20 additions and 49 deletions

3
.gitignore vendored
View File

@ -61,8 +61,7 @@ ChangeLog
releasenotes/build
# Test temp files
tests/plugins
tests/playbooks
tests/common
tests/*.retry
# Vagrant artifacts

View File

@ -27,8 +27,15 @@ infra1
[keystone_all]
infra1
[glance_all]
infra1
[glance_api]
openstack1
[glance_registry]
openstack1
[glance_all:children]
glance_api
glance_registry
[ceilometer_api]
openstack1

View File

@ -26,8 +26,8 @@ ceilometer_rabbitmq_vhost: /ceilometer
ceilometer_rabbitmq_servers: "{{ rabbitmq_servers }}"
ceilometer_venv_tag: "testing"
ceilometer_developer_mode: True
ceilometer_git_install_branch: master
ceilometer_requirements_git_install_branch: master
ceilometer_git_install_branch: stable/newton
ceilometer_requirements_git_install_branch: stable/newton
ceilometer_service_password: secrete
ceilometer_telemetry_secret: secrete
ceilometer_container_db_password: secrete
@ -69,4 +69,4 @@ tempest_pip_packages:
tempest_plugins:
- name: tempest-ceilometer
repo: https://git.openstack.org/openstack/ceilometer
branch: master
branch: stable/newton

View File

@ -34,7 +34,6 @@
delay: 10
vars_files:
- common/test-vars.yml
- test-vars.yml
- name: Playbook for tempest testing ceilometer
hosts: utility_all
@ -49,5 +48,4 @@
RUN_TEMPEST_OPTS: "--serial"
vars_files:
- common/test-vars.yml
- test-vars.yml

View File

@ -43,4 +43,3 @@
- role: "os_ceilometer"
vars_files:
- common/test-vars.yml
- test-vars.yml

46
tox.ini
View File

@ -25,6 +25,7 @@ whitelist_externals =
setenv =
PYTHONUNBUFFERED=1
ROLE_NAME=os_ceilometer
TEST_IDEMPOTENCE=false
VIRTUAL_ENV={envdir}
WORKING_DIR={toxinidir}
@ -83,63 +84,30 @@ commands =
deps =
{[testenv]deps}
-rhttp://git.openstack.org/cgit/openstack/openstack-ansible-tests/plain/test-ansible-deps.txt?h=stable/newton
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:func_base]
# 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 =
pip install -U --force-reinstall {opts} {packages}
[testenv:func_logs]
commands =
bash -c "{toxinidir}/tests/common/test-log-collect.sh"
{[testenv:tests_clone]commands}
bash -c "{toxinidir}/tests/common/test-ansible-lint.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.
install_command =
{[testenv:func_base]install_command}
deps =
{[testenv:ansible]deps}
commands =
{[testenv:ansible]commands}
ansible-playbook -i {toxinidir}/tests/inventory \
-e @{toxinidir}/tests/test-vars.yml \
-e "install_test_packages=True" \
{toxinidir}/tests/test.yml -vvvv
{[testenv:func_logs]commands}
{[testenv:tests_clone]commands}
bash -c "{toxinidir}/tests/common/test-ansible-functional.sh"
[testenv:linters]