blob: 897628cda020f0de320f0dd926f0267afe9979b6 [file] [log] [blame]
vaibhavjayasea9aee02018-08-31 06:22:26 +00001# Copyright © 2018 Amdocs, Bell Canada
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
Mandeep Khindad6ea9872017-06-24 11:49:37 -040015#!/bin/bash
16
17#
kaihlavi7a411102019-05-09 16:31:15 +030018# Run the testsuite for the passed tag. Valid tags are listed in usage help
Mandeep Khindad6ea9872017-06-24 11:49:37 -040019# Please clean up logs when you are done...
kaihlavi7a411102019-05-09 16:31:15 +030020# Note: Do not run multiple concurrent ete-k8s.sh as the --display is not parameterized and tests will collide
Mandeep Khindad6ea9872017-06-24 11:49:37 -040021#
BorislavG8bfc6cf2018-02-27 15:04:26 +000022if [ "$1" == "" ] || [ "$2" == "" ]; then
kaihlavi7a411102019-05-09 16:31:15 +030023 echo "Usage: ete-k8s.sh [namespace] [tag]"
Brian Freeman46d00ca2019-05-06 12:12:36 -050024 echo ""
kaihlavi7a411102019-05-09 16:31:15 +030025 echo " List of test case tags (filename for intent: tag)"
26 echo ""
27 echo " cds.robot: cds"
28 echo ""
29 echo " clamp.robot: clamp"
30 echo ""
31 echo " demo.robot: InitDemo, InitCustomer, APPCCDTPreloadDemo, APPCMountPointDemo, DistributeDemoVFWDT, DistributeVFWNG,"
32 echo " InitDistribution, PreloadDemo, deleteVNF, heatbridge, instantiateDemoVFWCL, instantiateVFW, instantiateVFWCL, instantiateVFWDT"
33 echo ""
34 echo " health-check.robot: health, core, small, medium, 3rdparty, api, datarouter, externalapi, health-aaf, health-aai, health-appc,"
35 echo " health-clamp, health-cli, health-dcae, health-dmaap, health-log, health-modeling, health-msb,"
36 echo " health-multicloud, health-oof, health-policy, health-pomba, health-portal, health-sdc, health-sdnc,"
37 echo " health-so, health-uui, health-vfc, health-vid, health-vnfsdk, healthdist, healthlogin, healthmr,"
38 echo " healthportalapp, multicloud, oom"
39 echo ""
40 echo " hvves.robot: HVVES, ete"
41 echo ""
42 echo " model-distribution-vcpe.robot: distributevCPEResCust"
43 echo ""
44 echo " model-distribution.robot: distribute, distributeVFWDT, distributeVLB"
45 echo ""
46 echo " oof-*.robot: cmso, has, homing"
47 echo ""
48 echo " pnf-registration.robot: ete, pnf_registrate"
49 echo ""
Brian Freeman46d00ca2019-05-06 12:12:36 -050050 echo " post-install-tests.robot dmaapacl, postinstall"
kaihlavi7a411102019-05-09 16:31:15 +030051 echo ""
52 echo " update_onap_page.robot: UpdateWebPage"
53 echo ""
54 echo " vnf-orchestration-direct-so.robot: instantiateVFWdirectso"
55 echo ""
Brian Freeman46d00ca2019-05-06 12:12:36 -050056 echo " vnf-orchestration.robot: instantiate, instantiateNoDelete, stability72hr"
Mandeep Khindad6ea9872017-06-24 11:49:37 -040057 exit
58fi
59
Gary Wubf7f1592018-09-14 10:29:27 -070060set -x
Brian Freeman6b89ba02018-04-23 20:54:13 -050061
BorislavG8bfc6cf2018-02-27 15:04:26 +000062export NAMESPACE="$1"
Brian Freeman6b89ba02018-04-23 20:54:13 -050063
64POD=$(kubectl --namespace $NAMESPACE get pods | sed 's/ .*//'| grep robot)
65
Gary Wu4ec2c672018-11-01 11:57:27 -070066TAGS="-i $2"
Brian Freeman6b89ba02018-04-23 20:54:13 -050067
Brian Freemanab7c1742019-02-13 18:05:02 -050068ETEHOME=/var/opt/ONAP
Gary Wu4ec2c672018-11-01 11:57:27 -070069export GLOBAL_BUILD_NUMBER=$(kubectl --namespace $NAMESPACE exec ${POD} -- bash -c "ls -1q /share/logs/ | wc -l")
70OUTPUT_FOLDER=$(printf %04d $GLOBAL_BUILD_NUMBER)_ete_$2
71DISPLAY_NUM=$(($GLOBAL_BUILD_NUMBER + 90))
Mandeep Khindad6ea9872017-06-24 11:49:37 -040072
73VARIABLEFILES="-V /share/config/vm_properties.py -V /share/config/integration_robot_properties.py -V /share/config/integration_preload_parameters.py"
74VARIABLES="-v GLOBAL_BUILD_NUMBER:$$"
75
Gary Wu4ec2c672018-11-01 11:57:27 -070076kubectl --namespace $NAMESPACE exec ${POD} -- ${ETEHOME}/runTags.sh ${VARIABLEFILES} ${VARIABLES} -d /share/logs/${OUTPUT_FOLDER} ${TAGS} --display $DISPLAY_NUM