From 422383a7c7b35bc51ddfad50d7c905e090046f81 Mon Sep 17 00:00:00 2001
From: "jose.lausuch" <jose.lausuch@ericsson.com>
Date: Wed, 16 Dec 2015 15:53:43 +0100
Subject: Add openstack cleanup after running the tests

JIRA: FUNCTEST-76

Change-Id: I1ab6366582c74f4eb1d3453cef155b85c757aa1b
Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com>
---
 docker/run_tests.sh | 7 +++++++
 1 file changed, 7 insertions(+)

(limited to 'docker')

diff --git a/docker/run_tests.sh b/docker/run_tests.sh
index 8b48a8210..64b1fc851 100755
--- a/docker/run_tests.sh
+++ b/docker/run_tests.sh
@@ -32,6 +32,10 @@ offline=false
 report=""
 arr_test=(vping odl tempest vims rally)
 
+function clean_openstack(){
+    python ${FUNCTEST_REPO_DIR}/testcases/VIM/OpenStack/CI/libraries/clean_openstack.py \
+        --debug ${FUNCTEST_REPO_DIR}/
+}
 
 function run_test(){
     test_name=$1
@@ -85,16 +89,19 @@ function run_test(){
             if [ -f ${tempest_conf} ]; then
                 cp $tempest_conf ${FUNCTEST_CONF_DIR}
             fi
+            clean_openstack
         ;;
         "vims")
             info "Running vIMS test..."
             python ${FUNCTEST_REPO_DIR}/testcases/vIMS/CI/vIMS.py \
                 --debug ${FUNCTEST_REPO_DIR}/ ${report}
+            clean_openstack
         ;;
         "rally")
             info "Running Rally benchmark suite..."
             python ${FUNCTEST_REPO_DIR}/testcases/VIM/OpenStack/CI/libraries/run_rally.py \
                 --debug ${FUNCTEST_REPO_DIR}/ all ${report}
+            clean_openstack
         ;;
         "bgpvpn_template")
             info "Running BGPVPN Tempest test case..."
-- 
cgit