diff --git a/devstack/gate/post_test_hook.sh b/devstack/gate/post_test_hook.sh index 30c8cbcbc..41dd63147 100755 --- a/devstack/gate/post_test_hook.sh +++ b/devstack/gate/post_test_hook.sh @@ -34,4 +34,17 @@ iniset $TEMPEST_CONFIG validation ssh_timeout $BUILD_TIMEOUT iniset $TEMPEST_CONFIG validation network_for_ssh ${PRIVATE_NETWORK_NAME:-"private"} # Run the Designate Tempest tests -sudo ./run_tempest_tests.sh +sudo BASE=$BASE ./run_tempest_tests.sh + +# TODO(pglass) - update cli tests to look in the [auth] section for admin creds +iniset $TEMPEST_CONFIG identity admin_username ${ADMIN_USERNAME:-"admin"} +iniset $TEMPEST_CONFIG identity admin_password $ADMIN_PASSWORD +iniset $TEMPEST_CONFIG identity admin_tenant_name $ADMIN_TENANT_NAME +iniset $TEMPEST_CONFIG identity admin_domain_name ${ADMIN_DOMAIN_NAME:-"Default"} + +# must match the dir where `openstack` is installed +DESIGNATE_CLI_DIR=${DESIGNATE_CLI_DIR:-"$BASE/new/python-designateclient"} +iniset $TEMPEST_CONFIG designateclient directory "$DESIGNATE_CLI_DIR/.venv/bin" + +# Run the python-designateclient functional tests +sudo BASE=$BASE ./run_cli_tests.sh diff --git a/devstack/gate/run_cli_tests.sh b/devstack/gate/run_cli_tests.sh new file mode 100755 index 000000000..5e66a822f --- /dev/null +++ b/devstack/gate/run_cli_tests.sh @@ -0,0 +1,28 @@ +#!/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. + +DESIGNATE_CLI_DIR=${DESIGNATE_CLI_DIR:-"$BASE/new/python-designateclient"} +TEMPEST_DIR=${TEMPEST_DIR:-"$BASE/new/tempest"} +export TEMPEST_CONFIG=$TEMPEST_DIR/etc/tempest.conf + +pushd $DESIGNATE_CLI_DIR + +# we need the actual openstack executable which is not installed by tox +virtualenv "$DESIGNATE_CLI_DIR/.venv" +source "$DESIGNATE_CLI_DIR/.venv/bin/activate" +pip install python-openstackclient +pip install . + +tox -e functional -- --concurrency 4 +popd diff --git a/devstack/gate/run_tempest_tests.sh b/devstack/gate/run_tempest_tests.sh index 78755792a..002311360 100755 --- a/devstack/gate/run_tempest_tests.sh +++ b/devstack/gate/run_tempest_tests.sh @@ -23,10 +23,10 @@ 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} - +DESIGNATE_DIR=${DESIGNATE_DIR:-"$BASE/new/designate"} +TEMPEST_DIR=${TEMPEST_DIR:-"$BASE/new/tempest"} pushd $DESIGNATE_DIR export TEMPEST_CONFIG=$TEMPEST_DIR/etc/tempest.conf tox -e functional -- --concurrency 4 +popd