From 27221f75a7dd7a126f147a4de950a08d9868404c Mon Sep 17 00:00:00 2001 From: Andy McCrae Date: Fri, 20 Jan 2017 16:36:21 +0000 Subject: [PATCH] Split upgrade test into its own play To avoid requiring all the os_previous_cinder tasks to be evaluated, we should split the 2 tests up. This will help make the gate more efficient and avoids unnecessary issues. Change-Id: I861764c498618cf644c06b212cf789fe8aa6b3d4 --- tests/test-upgrade.yml | 35 +++++++++++++++++++++++++++++++++++ tests/test.yml | 6 ------ tox.ini | 6 +++++- 3 files changed, 40 insertions(+), 7 deletions(-) create mode 100644 tests/test-upgrade.yml diff --git a/tests/test-upgrade.yml b/tests/test-upgrade.yml new file mode 100644 index 00000000..c29e7686 --- /dev/null +++ b/tests/test-upgrade.yml @@ -0,0 +1,35 @@ +--- +# Copyright 2015, Rackspace US, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Setup the host +- include: common/test-setup-host.yml + +# Prepare the cinder-volumes VG +- include: common/test-setup-cinder-localhost.yml + +# Install RabbitMQ/MariaDB +- include: common/test-install-infra.yml + +# Install Keystone +- include: common/test-install-keystone.yml + +# Install previous Cinder +- include: test-install-previous-cinder.yml + +# Install Cinder +- include: common/test-install-cinder.yml + +# Install and execute Tempest +- include: common/test-install-tempest.yml diff --git a/tests/test.yml b/tests/test.yml index 24a9c8b9..0282f17a 100644 --- a/tests/test.yml +++ b/tests/test.yml @@ -25,12 +25,6 @@ # Install Keystone - include: common/test-install-keystone.yml -# Install previous Cinder -- include: test-install-previous-cinder.yml - when: - - cinder_upgrade is defined - - cinder_upgrade | bool - # Install Cinder - include: common/test-install-cinder.yml diff --git a/tox.ini b/tox.ini index 3ba78ebd..d1bd4207 100644 --- a/tox.ini +++ b/tox.ini @@ -119,9 +119,13 @@ deps = {[testenv:ansible]deps} setenv = {[testenv]setenv} - ANSIBLE_PARAMETERS=-vvv -e cinder_upgrade=True + TEST_PLAYBOOK={toxinidir}/tests/test-upgrade.yml commands = {[testenv:tests_clone]commands} + bash -c "if [ ! -d "{toxinidir}/tests/common/previous" ]; then \ + git clone https://git.openstack.org/openstack/openstack-ansible-tests -b stable/newton \ + {toxinidir}/tests/common/previous; \ + fi" bash -c "{toxinidir}/tests/common/test-ansible-functional.sh"