Add Tempest Plugin to DevStack Plugin

Additionally, execute the tests in the gate

Change-Id: I58930c40243068e97ff8f6f1684cfbe5565ac7f1
Depends-On: I7733e8786d6b525a7c9a8d4f12add329cd030d9d
Depends-On: Ic1ee7f8bfea7954fca4057b74b76fcb502bb782d
Partially-Implements: blueprint designate-tempest-plugin
This commit is contained in:
Kiall Mac Innes 2016-04-07 11:03:20 +01:00
parent 0d8e048a7c
commit fc2fe86807
6 changed files with 62 additions and 2 deletions

View File

@ -26,6 +26,10 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
override.vm.synced_folder "../../../designate-dashboard", "/opt/stack/designate-dashboard"
end
if File.directory?("../../../designate-tempest-plugin")
override.vm.synced_folder "../../../designate-tempest-plugin", "/opt/stack/designate-tempest-plugin"
end
if File.directory?("../../../../openstack/rally")
override.vm.synced_folder "../../../../openstack/rally", "/opt/stack/rally"
end
@ -50,6 +54,10 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
override.vm.synced_folder "../../../designate-dashboard", "/opt/stack/designate-dashboard", type: "nfs"
end
if File.directory?("../../../designate-tempest-plugin")
override.vm.synced_folder "../../../designate-tempest-plugin", "/opt/stack/designate-tempest-plugin", type: "nfs"
end
if File.directory?("../../../../openstack/rally")
override.vm.synced_folder "../../../../openstack/rally", "/opt/stack/rally", type: "nfs"
end

View File

@ -106,8 +106,8 @@ enable_service designate,designate-central,designate-api,designate-pool-manager,
# Optional TLS Proxy
#enable_service tls-proxy
# Optional Tempest
#enable_service tempest
# Optional Tempest (Recommended)
enable_service tempest
# Optional Rally
#enable_service rally

View File

@ -8,6 +8,10 @@ $BASE/new/designate/devstack/exercise.sh
# Import functions needed for the below workaround
source $BASE/new/devstack/functions
# Run the new style tempest plugin first, so the workaround below is not
# applied.
sudo BASE=$BASE ./run_tempest_plugin.sh
# Workaround for Tempest architectural changes
# See bugs:
# 1) https://bugs.launchpad.net/manila/+bug/1531049

View File

@ -0,0 +1,33 @@
#!/bin/bash -e
#
# 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.
# TODO(kiall): One old style tests are no longer used, we should switch from
# this pattern for executing the tests to a true tempest gate job.
# How many seconds to wait for the API to be responding before giving up
API_RESPONDING_TIMEOUT=20
if ! timeout ${API_RESPONDING_TIMEOUT} sh -c "while ! curl -s http://127.0.0.1:9001/ 2>/dev/null | grep -q 'v1' ; do sleep 1; done"; then
echo "The Designate API failed to respond within ${API_RESPONDING_TIMEOUT} seconds"
exit 1
fi
echo "Successfully contacted the Designate API"
# Where Tempest code lives
TEMPEST_DIR=${TEMPEST_DIR:-"$BASE/new/tempest"}
pushd $TEMPEST_DIR
tox -e all-plugin -- designate
popd

View File

@ -262,6 +262,12 @@ function install_designatedashboard {
ln -fs $DESIGNATEDASHBOARD_DIR/designatedashboard/enabled/_1720_project_dns_panel.py $HORIZON_DIR/openstack_dashboard/local/enabled/_1720_project_dns_panel.py
}
# install_designatetempest - Collect source and prepare
function install_designatetempest {
git_clone_by_name "designate-tempest-plugin"
setup_dev_lib "designate-tempest-plugin"
}
# start_designate - Start running processes, including screen
function start_designate {
start_designate_backend
@ -313,6 +319,11 @@ if is_service_enabled designate; then
install_designatedashboard
fi
if is_service_enabled tempest; then
echo_summary "Installing Designate Tempest Plugin"
install_designatetempest
fi
elif [[ "$1" == "stack" && "$2" == "post-config" ]]; then
echo_summary "Configuring Designate"
configure_designate

View File

@ -42,6 +42,10 @@ DESIGNATEDASHBOARD_REPO=${DESIGNATEDASHBOARD_REPO:-${GIT_BASE}/openstack/designa
DESIGNATEDASHBOARD_BRANCH=${DESIGNATEDASHBOARD_BRANCH:-master}
GITDIR["python-designateclient"]=$DEST/python-designateclient
GITREPO["designate-tempest-plugin"]=${DESIGNATETEMPEST_REPO:-${GIT_BASE}/openstack/designate-tempest-plugin.git}
GITBRANCH["designate-tempest-plugin"]=${DESIGNATETEMPEST_BRANCH:-master}
GITDIR["designate-tempest-plugin"]=$DEST/designate-tempest-plugin
# Tell Tempest this project is present
TEMPEST_SERVICES+=,designate