Split out neutron upgrade test

The upgrade test causes issues with the regular tests because the module
is evaluated and used from the previous_neutron version. This causes the
module to fail when not running upgrades.

Change-Id: Ifaeb26de5dc9392df4a65f58033b95659998f40d
This commit is contained in:
Andy McCrae 2017-01-20 14:58:49 +00:00
parent 15d00f7e63
commit 72f21662a2
4 changed files with 36 additions and 16 deletions

View File

@ -37,7 +37,7 @@ export WORKING_DIR=${WORKING_DIR:-$(pwd)}
export ROLE_NAME=${ROLE_NAME:-''}
export ANSIBLE_PARAMETERS=${ANSIBLE_PARAMETERS:-"-vvv"}
export TEST_PLAYBOOK=${TEST_PLAYBOOK:-$WORKING_DIR/tests/test.yml}
export TEST_PLAYBOOK=${TEST_PLAYBOOK:-$WORKING_DIR/tests/test-upgrade.yml}
export TEST_CHECK_MODE=${TEST_CHECK_MODE:-false}
export TEST_IDEMPOTENCE=${TEST_IDEMPOTENCE:-false}

31
tests/test-upgrade.yml Normal file
View File

@ -0,0 +1,31 @@
---
# 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 user ssh keys, host and containers
- include: common/test-setup-host.yml
# Install RabbitMQ/MariaDB
- include: common/test-install-infra.yml
# Install etcd
- include: common/test-install-etcd.yml
when:
- groups['neutron_calico_dhcp_agent'] | length > 0
# Install Keystone
- include: common/test-install-keystone.yml
# Install previous Neutron
- include: test-install-previous-neutron.yml

View File

@ -27,21 +27,11 @@
# Install Keystone
- include: common/test-install-keystone.yml
# Install previous Neutron
- include: test-install-previous-neutron.yml
when:
- neutron_upgrade is defined
- neutron_upgrade | bool
# Install Neutron
- include: common/test-install-neutron.yml
when:
- (neutron_upgrade is not defined) or (not neutron_upgrade | bool)
# Install and execute tempest
- include: common/test-install-tempest.yml
when:
- (neutron_upgrade is not defined) or (not neutron_upgrade | bool)
- include: test-calico-functional.yml
when:

View File

@ -59,10 +59,6 @@ commands =
bash -c "if [ ! -d "{toxinidir}/tests/common" ]; then \
git clone https://git.openstack.org/openstack/openstack-ansible-tests {toxinidir}/tests/common; \
fi"
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"
[testenv:pep8]
@ -119,9 +115,12 @@ deps =
{[testenv:ansible]deps}
setenv =
{[testenv]setenv}
ANSIBLE_PARAMETERS=-vvv -e neutron_upgrade=True
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/test-neutron-upgrades.sh"
[testenv:func_ovs]