Add instack-tempest-test-overcloud

...and run it optionally from instack-deploy-overcloud.

Co-Authored-By: Imre Farkas <ifarkas@redhat.com>
Change-Id: I5975345d6aa3f3e9fc92f62cd1cc908f2d21679b
This commit is contained in:
Crag Wolfe 2015-04-14 00:53:58 -04:00 committed by Imre Farkas
parent 9bf651c17d
commit f003d0065f
5 changed files with 57 additions and 1 deletions

View File

@ -225,6 +225,20 @@ Deploy the overcloud (default of 1 compute and 1 control):
instack-deploy-overcloud --tuskar
.. admonition:: Deployment with post-install validation
:class: tempest
To deploy the overcloud **and** verify it by running Tempest::
instack-deploy-overcloud --tuskar --tempest
.. note:: The full Tempest test suite might take hours to run on a single CPU.
To run only a part of the Tempest test suite (eg. tests with ``gate`` tag)::
export TEMPEST_ARGS="gate"
instack-deploy-overcloud --tuskar --tempest
Post-Deployment
---------------

View File

@ -360,3 +360,5 @@ class { 'tuskar::ui':
# tempest
# TODO: when puppet-tempest supports install by package, do that instead
package{'openstack-tempest': }
# needed for /bin/subunit-2to1 (called by run_tempest.sh)
package{'subunit-filters': }

View File

@ -12,6 +12,7 @@ if [ -z "$OS_AUTH_URL" ]; then
fi
TUSKAR=
TEMPEST=
# Default stack create timeout, in minutes
# Note heat defaults to 60mins, which may not be enough when
@ -27,11 +28,12 @@ function show_options () {
echo "Options:"
echo " --tuskar -- will use tuskar for building the heat Template"
echo " --timeout -- create timeout in minutes, default $TIMEOUT"
echo " --tempest -- run tempest tests after deployment"
echo
exit $1
}
TEMP=$(getopt -o ,h -l,tuskar,timeout:,help -n $SCRIPT_NAME -- "$@")
TEMP=$(getopt -o ,h -l,tuskar,timeout:,tempest,help -n $SCRIPT_NAME -- "$@")
if [ $? != 0 ] ; then echo "Terminating..." >&2 ; exit 1 ; fi
# Note the quotes around `$TEMP': they are essential!
@ -41,6 +43,7 @@ while true ; do
case "$1" in
--tuskar) TUSKAR="1"; shift 1;;
--timeout) TIMEOUT="$2"; shift 2;;
--tempest) TEMPEST="1"; shift 1;;
-h | --help) show_options 0;;
--) shift ; break ;;
*) echo "Error: unsupported option $1." ; exit 1 ;;
@ -517,3 +520,8 @@ rm $NETWORK_JSON
nova flavor-create m1.demo auto 512 10 1
echo "Overcloud Deployed"
if [ -n "$TEMPEST" ]; then
TEMPEST_ARGS=${TEMPEST_ARGS:-} $(dirname $0)/instack-tempest-test-overcloud
$(dirname $0)/instack-test-overcloud
fi

View File

@ -0,0 +1,31 @@
#!/bin/bash
set -eux
source ~/overcloudrc
TEMPEST_ARGS=${TEMPEST_ARGS:-}
# e.g. TEMPEST_ARGS='tempest.api.compute.flavors tempest.api.network.admin'
mkdir -p ~/tempest
cd ~/tempest
/usr/share/openstack-tempest-kilo/tools/configure-tempest-directory
./tools/config_tempest.py --out etc/tempest.conf --debug --create \
identity.uri $OS_AUTH_URL \
compute.allow_tenant_isolation true \
object-storage.operator_role SwiftOperator \
identity.admin_password $OS_PASSWORD \
compute.build_timeout 500 \
compute.image_ssh_user cirros \
compute.ssh_user cirros \
network.build_timeout 500 \
volume.build_timeout 500 \
scenario.ssh_user cirros
FULL_TEMPEST_ARGS="--no-virtual-env"
if [ -n "$TEMPEST_ARGS" ]; then
FULL_TEMPEST_ARGS="$FULL_TEMPEST_ARGS -- $TEMPEST_ARGS"
fi
./run_tempest.sh $FULL_TEMPEST_ARGS 2>&1 | tee ~/tempest/tempest-run.log

View File

@ -27,6 +27,7 @@ scripts =
scripts/instack-install-undercloud
scripts/instack-ironic-deployment
scripts/instack-prepare-for-overcloud
scripts/instack-tempest-test-overcloud
scripts/instack-test-overcloud
scripts/instack-virt-setup