Enable Tempest Functional Tests
Change-Id: I617c15aa5ba03bec103991f9b65ddc5e3181bd13
This commit is contained in:
parent
9bf9406287
commit
72ff534a62
2
.gitignore
vendored
2
.gitignore
vendored
@ -28,3 +28,5 @@ designate/versioninfo
|
||||
/dnsmasq
|
||||
.testrepository/*
|
||||
contrib/vagrant/.vagrant/
|
||||
functionaltests/tempest.log
|
||||
functionaltests/.testrepository/
|
||||
|
@ -57,6 +57,9 @@ DESIGNATE_TEST_NSREC=${DESIGNATE_TEST_NSREC:-ns1.devstack.org.}
|
||||
DESIGNATE_ENABLED_EXTENSIONS_V1=${DESIGNATE_ENABLED_EXTENSIONS_V1:-"quotas"}
|
||||
DESIGNATE_ENABLED_EXTENSIONS_V2=${DESIGNATE_ENABLED_EXTENSIONS_V2:-"quotas"}
|
||||
|
||||
# Tell Tempest this project is present
|
||||
TEMPEST_SERVICES+=,designate
|
||||
|
||||
# Get backend configuration
|
||||
# ----------------------------
|
||||
if is_service_enabled designate && [[ -r $DESIGNATE_PLUGINS/backend-$DESIGNATE_BACKEND_DRIVER ]]; then
|
||||
|
@ -4,3 +4,6 @@ set -ex
|
||||
|
||||
# Run the Designate DevStack exercises
|
||||
$BASE/new/devstack/exercises/designate.sh
|
||||
|
||||
# Run the Designate Tempest tests
|
||||
sudo ./run_tempest_tests.sh
|
||||
|
42
contrib/devstack/run_tempest_tests.sh
Executable file
42
contrib/devstack/run_tempest_tests.sh
Executable file
@ -0,0 +1,42 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# 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.
|
||||
|
||||
# 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 Designate and Tempest code lives
|
||||
DESIGNATE_DIR=${DESIGNATE_DIR:-/opt/stack/new/designate}
|
||||
TEMPEST_DIR=${TEMPEST_DIR:-/opt/stack/new/tempest}
|
||||
|
||||
# Install tempest
|
||||
pip install -e $TEMPEST_DIR
|
||||
|
||||
pushd $DESIGNATE_DIR/functionaltests
|
||||
|
||||
# run the tests in parallel
|
||||
testr init
|
||||
testr run --parallel --subunit | subunit-trace --no-failure-debug -f
|
||||
retval=$?
|
||||
testr slowest
|
||||
|
||||
popd
|
||||
|
||||
exit $retval
|
@ -37,6 +37,9 @@ ENABLED_SERVICES+=,designate,designate-central,designate-api,designate-pool-mana
|
||||
# Optional TLS Proxy
|
||||
#ENABLED_SERVICES+=,tls-proxy
|
||||
|
||||
# Optional Tempest
|
||||
#ENABLED_SERVICES+=,tempest
|
||||
|
||||
# Optional Rally
|
||||
#ENABLED_SERVICES+=,rally
|
||||
|
||||
|
@ -1,19 +0,0 @@
|
||||
"""
|
||||
Copyright 2015 Rackspace
|
||||
|
||||
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.
|
||||
"""
|
||||
|
||||
from tempest.config import CONF
|
||||
|
||||
CONF.set_config_path('designate-tempest.conf')
|
Loading…
Reference in New Issue
Block a user