Donot exit if k8s tests fail 55/53755/2
authorLinda Wang <wangwulin@huawei.com>
Wed, 14 Mar 2018 07:37:54 +0000 (07:37 +0000)
committerLinda Wang <wangwulin@huawei.com>
Fri, 16 Mar 2018 09:28:51 +0000 (09:28 +0000)
1. Add 'set +e' before running k8s tests, then the following builder
   of functest-store-results will be executed.
2. Remove the logic of managing k8s scenario from functest-alpine.sh

Change-Id: I9a269fc46e45d1db6af741775d475e887ebc79c7
Signed-off-by: Linda Wang <wangwulin@huawei.com>
jjb/functest/functest-alpine.sh
jjb/functest/functest-k8.sh

index 432bbbb..788a4cd 100755 (executable)
@@ -165,24 +165,19 @@ volumes="${images_vol} ${results_vol} ${sshkey_vol} ${rc_file_vol} ${cacert_file
 
 set +e
 
 
 set +e
 
-
-if [[ ${DEPLOY_SCENARIO} =~ ^os-.* ]]; then
-    [[ ${BRANCH##*/} == "master" ]] && check_os_deployment
-    if [ ${FUNCTEST_MODE} == 'testcase' ]; then
-        echo "FUNCTEST_MODE=testcase, FUNCTEST_SUITE_NAME=${FUNCTEST_SUITE_NAME}"
-        run_test ${FUNCTEST_SUITE_NAME}
-    elif [ ${FUNCTEST_MODE} == 'tier' ]; then
-        echo "FUNCTEST_MODE=tier, FUNCTEST_TIER=${FUNCTEST_TIER}"
-        tiers=(${FUNCTEST_TIER})
-        run_tiers ${tiers}
+[[ ${BRANCH##*/} == "master" ]] && check_os_deployment
+if [ ${FUNCTEST_MODE} == 'testcase' ]; then
+    echo "FUNCTEST_MODE=testcase, FUNCTEST_SUITE_NAME=${FUNCTEST_SUITE_NAME}"
+    run_test ${FUNCTEST_SUITE_NAME}
+elif [ ${FUNCTEST_MODE} == 'tier' ]; then
+    echo "FUNCTEST_MODE=tier, FUNCTEST_TIER=${FUNCTEST_TIER}"
+    tiers=(${FUNCTEST_TIER})
+    run_tiers ${tiers}
+else
+    if [ ${DEPLOY_TYPE} == 'baremetal' ]; then
+        tiers=(healthcheck smoke features vnf parser)
     else
     else
-        if [ ${DEPLOY_TYPE} == 'baremetal' ]; then
-            tiers=(healthcheck smoke features vnf parser)
-        else
-            tiers=(healthcheck smoke features)
-        fi
-        run_tiers ${tiers}
+        tiers=(healthcheck smoke features)
     fi
     fi
-else
-    echo "k8 deployment has not been supported by functest yet"
+    run_tiers ${tiers}
 fi
 fi
index 3f08e4a..115ff42 100755 (executable)
@@ -46,6 +46,8 @@ envs="-e INSTALLER_TYPE=${INSTALLER_TYPE} \
 
 DOCKER_TAG=`[[ ${BRANCH##*/} == "master" ]] && echo "latest" || echo ${BRANCH##*/}`
 
 
 DOCKER_TAG=`[[ ${BRANCH##*/} == "master" ]] && echo "latest" || echo ${BRANCH##*/}`
 
+set +e
+
 FUNCTEST_IMAGE=opnfv/functest-kubernetes:${DOCKER_TAG}
 echo "Pulling Docker image ${FUNCTEST_IMAGE} ..."
 docker pull ${FUNCTEST_IMAGE}>/dev/null
 FUNCTEST_IMAGE=opnfv/functest-kubernetes:${DOCKER_TAG}
 echo "Pulling Docker image ${FUNCTEST_IMAGE} ..."
 docker pull ${FUNCTEST_IMAGE}>/dev/null