diff --git a/tests/test-cinder-upgrades.sh b/tests/test-cinder-upgrades.sh index 15b06915..6ed5f383 100755 --- a/tests/test-cinder-upgrades.sh +++ b/tests/test-cinder-upgrades.sh @@ -55,7 +55,8 @@ echo "TEST_IDEMPOTENCE: ${TEST_IDEMPOTENCE}" function execute_ansible_playbook { export ANSIBLE_CLI_PARAMETERS="${ANSIBLE_PARAMETERS} -e @${ANSIBLE_OVERRIDES}" - CMD_TO_EXECUTE="ansible-playbook ${TEST_PLAYBOOK} $@ ${ANSIBLE_CLI_PARAMETERS}" + export ANSIBLE_BIN=${ANSIBLE_BIN:-"ansible-playbook"} + CMD_TO_EXECUTE="${ANSIBLE_BIN} ${TEST_PLAYBOOK} $@ ${ANSIBLE_CLI_PARAMETERS}" echo "Executing: ${CMD_TO_EXECUTE}" echo "With:" @@ -71,13 +72,28 @@ function execute_ansible_playbook { # Ensure that the Ansible environment is properly prepared source "${COMMON_TESTS_PATH}/test-ansible-env-prep.sh" -# Prepare environment for the initial deploy of previous Cinder +# Prepare environment for the initial deploy of (previous and current) Cinder # No upgrading or testing is done yet. export ANSIBLE_LOG_PATH="${ANSIBLE_LOG_DIR}/ansible-execute-cinder-install.log" +# Execute the setup of current infrastructure +execute_ansible_playbook + +# Prepare environment for the deploy of previous Nova: +# No upgrading or testing is done yet. +export TEST_PLAYBOOK="${WORKING_DIR}/tests/test-install-previous-cinder.yml" +export ANSIBLE_LOG_PATH="${ANSIBLE_LOG_DIR}/ansible-execute-previous_cinder-install.log" +export PREVIOUS_VENV="ansible-previous" +export ANSIBLE_BIN="${WORKING_DIR}/.tox/${PREVIOUS_VENV}/bin/ansible-playbook" +source ${COMMON_TESTS_PATH}/test-create-previous-venv.sh + # Execute the setup of previous Cinder execute_ansible_playbook +# Unset previous branch overrides +unset PREVIOUS_VENV +unset ANSIBLE_BIN + # Prepare environment for the upgrade of Cinder export TEST_PLAYBOOK="${WORKING_DIR}/tests/benchmark-upgrade.yml" export ANSIBLE_LOG_PATH="${ANSIBLE_LOG_DIR}/ansible-execute-cinder-upgrade.log" diff --git a/tests/test-install-previous-cinder.yml b/tests/test-install-previous-cinder.yml index 6332f60b..7ec30089 100644 --- a/tests/test-install-previous-cinder.yml +++ b/tests/test-install-previous-cinder.yml @@ -13,6 +13,9 @@ # See the License for the specific language governing permissions and # limitations under the License. +# Ensure the repo is setup for previous version +- include: common/previous/test-repo-setup.yml + - name: Deploy cinder hosts: cinder_all user: root diff --git a/tests/test-upgrade.yml b/tests/test-upgrade.yml index 2dbc436f..6ffac87d 100644 --- a/tests/test-upgrade.yml +++ b/tests/test-upgrade.yml @@ -24,9 +24,3 @@ # Install Keystone - include: common/test-install-keystone.yml - -# Ensure the repo is setup for previous version -- include: common/previous/test-repo-setup.yml - -# Install previous Cinder -- include: test-install-previous-cinder.yml