Merge "Run the cli functional tests in openstack ci"

This commit is contained in:
Jenkins 2016-03-31 14:41:55 +00:00 committed by Gerrit Code Review
commit f9c6dd98d0
3 changed files with 45 additions and 4 deletions

View File

@ -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

28
devstack/gate/run_cli_tests.sh Executable file
View File

@ -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

View File

@ -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