summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHirofumi Ichihara <ichihara.hirofumi@lab.ntt.co.jp>2016-07-20 03:09:51 +0900
committerArmando Migliaccio <armamig@gmail.com>2016-07-19 20:47:00 +0000
commite7e84d351167e142ff41ea7a3971982032e5f90e (patch)
tree12d7a9eea0f6bdb29d261a3a51eba9ad4f8d3b59
parenteba0c389d060188efe24888cc1cad4d495a8991f (diff)
downloadpython-neutronclient-e7e84d351167e142ff41ea7a3971982032e5f90e.tar.gz
Add functional test hook for fwaas command
This patch adds a hook into functional test so that fwaas command test runs. (cherry picked from commit 6bc4685f6b50fb8883c67b7f80b12ced6228d27b) Change-Id: Ib4ba644b22db0df91a9b0c7011b46ece337198af Closes-Bug: #1604510
-rw-r--r--neutronclient/tests/functional/hooks/fwaas2
-rwxr-xr-x[-rw-r--r--]neutronclient/tests/functional/hooks/gate_hook.sh20
2 files changed, 22 insertions, 0 deletions
diff --git a/neutronclient/tests/functional/hooks/fwaas b/neutronclient/tests/functional/hooks/fwaas
new file mode 100644
index 0000000..0f04168
--- /dev/null
+++ b/neutronclient/tests/functional/hooks/fwaas
@@ -0,0 +1,2 @@
+enable_plugin neutron-fwaas git://git.openstack.org/openstack/neutron-fwaas
+enable_service q-fwaas \ No newline at end of file
diff --git a/neutronclient/tests/functional/hooks/gate_hook.sh b/neutronclient/tests/functional/hooks/gate_hook.sh
index b44c237..9ad05aa 100644..100755
--- a/neutronclient/tests/functional/hooks/gate_hook.sh
+++ b/neutronclient/tests/functional/hooks/gate_hook.sh
@@ -4,6 +4,26 @@ set -ex
VENV=${1:-"functional"}
+GATE_DEST=$BASE/new
+NEUTRONCLIENT_PATH=$GATE_DEST/python-neutronclient
+GATE_HOOKS=$NEUTRONCLIENT_PATH/neutronclient/tests/functional/hooks
+DEVSTACK_PATH=$GATE_DEST/devstack
+
+# Inject config from hook into localrc
+function load_rc_hook {
+ local hook="$1"
+ config=$(cat $GATE_HOOKS/$hook)
+ export DEVSTACK_LOCAL_CONFIG+="
+# generated from hook '$hook'
+${config}
+"
+}
+
+if [ "$VENV" == "functional" ]
+then
+ load_rc_hook fwaas
+fi
+
if [ "$VENV" == "functional-adv-svcs" ]
then
export DEVSTACK_LOCAL_CONFIG="enable_plugin neutron-vpnaas git://git.openstack.org/openstack/neutron-vpnaas"