openstacksdk/post_test_hook.sh
Ankur Gupta 4413f46983 Update load_balancer for v2 API
This patch updates the load_balancer.v2.load_balancer for the current
state of the API

It also updates the post_test_hook script to accept an argument to
restrict the functional tests run.  Since the load-balancer tests can
take a significant time to run, this allows us to run a parallel gate
job for the load-balancer functional tests.

Co-Authored-By: Michael Johnson <johnsomor@gmail.com>
Change-Id: I6c526cd8225a929d3d5984da10b6478312461e6f
2017-07-18 18:05:29 -07:00

36 lines
1.1 KiB
Bash
Executable File

#!/bin/bash
#
# This is a script that kicks off a series of functional tests against a
# OpenStack devstack cloud. This script is intended to work as a gate
# in project-config for the Python SDK.
DIR=$(cd $(dirname "$0") && pwd)
echo "Running SDK functional test suite"
sudo -H -u stack -i <<!
export OS_CLOUD=devstack-admin
echo 'Running tests with:'
cat /etc/openstack/clouds.yaml
cd ${DIR}
echo '=functional=============================================='
if [[ -n "$1" ]]; then
tox -e functional -- $1
else
tox -e functional
fi
FUNCTIONAL_RESULT=\$?
echo '=examples================================================'
tox -e examples
EXAMPLES_RESULT=\$?
echo '========================================================='
echo "Functional test result: \$FUNCTIONAL_RESULT"
echo "Examples test result: \$EXAMPLES_RESULT"
test \$FUNCTIONAL_RESULT == 0 -a \$EXAMPLES_RESULT == 0
!
# TODO(thowe) For now we are going to ignore tests failures
# It is easier to change this script than the gate. The magic
# string fro this script should probably specify the -e option
# so the script will fail immediately if a command fails.
exit 0