summaryrefslogtreecommitdiff
path: root/post_test_hook.sh
diff options
context:
space:
mode:
authorSteve Martinelli <stevemar@ca.ibm.com>2014-09-19 02:42:55 +0000
committerSteve Martinelli <stevemar@ca.ibm.com>2014-10-01 19:46:07 -0400
commit742982af4bb94b73a78c06688732acf1c8127f8a (patch)
tree0c84f0dbcb181e044c440bf7411811b014d72495 /post_test_hook.sh
parent02320a5a2437acdc501a003cca53310a444e4b4e (diff)
downloadpython-openstackclient-742982af4bb94b73a78c06688732acf1c8127f8a.tar.gz
Add functional tests to osc
Create a script that kicks off function tests that exercise openstackclient commands against a cloud. If no keystone/openstack process is detected, a devstack instance is spun up and the tests are run against that. There is also a hook added to tox.ini so that we can run these tests easily from a gate job. Change-Id: I3cc8b2b800de7ca74af506d2c7e8ee481fa985f0
Diffstat (limited to 'post_test_hook.sh')
-rwxr-xr-xpost_test_hook.sh15
1 files changed, 15 insertions, 0 deletions
diff --git a/post_test_hook.sh b/post_test_hook.sh
new file mode 100755
index 00000000..b82c1e62
--- /dev/null
+++ b/post_test_hook.sh
@@ -0,0 +1,15 @@
+#!/bin/bash
+
+# This is a script that kicks off a series of functional tests against an
+# OpenStack cloud. It will attempt to create an instance if one is not
+# available. Do not run this script unless you know what you're doing.
+# For more information refer to:
+# http://docs.openstack.org/developer/python-openstackclient/
+
+set -xe
+
+OPENSTACKCLIENT_DIR=$(cd $(dirname "$0") && pwd)
+
+cd $OPENSTACKCLIENT_DIR
+echo "Running openstackclient functional test suite"
+sudo -H -u stack tox -e functional