vaibhavjayas | ea9aee0 | 2018-08-31 06:22:26 +0000 | [diff] [blame] | 1 | # 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 Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 15 | #!/bin/bash |
| 16 | |
| 17 | # |
kaihlavi | 7a41110 | 2019-05-09 16:31:15 +0300 | [diff] [blame] | 18 | # Run the testsuite for the passed tag. Valid tags are listed in usage help |
Mandeep Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 19 | # Please clean up logs when you are done... |
Mandeep Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 20 | # |
BorislavG | 8bfc6cf | 2018-02-27 15:04:26 +0000 | [diff] [blame] | 21 | if [ "$1" == "" ] || [ "$2" == "" ]; then |
kaihlavi | 7a41110 | 2019-05-09 16:31:15 +0300 | [diff] [blame] | 22 | echo "Usage: ete-k8s.sh [namespace] [tag]" |
Brian Freeman | 46d00ca | 2019-05-06 12:12:36 -0500 | [diff] [blame] | 23 | echo "" |
kaihlavi | 7a41110 | 2019-05-09 16:31:15 +0300 | [diff] [blame] | 24 | echo " List of test case tags (filename for intent: tag)" |
| 25 | echo "" |
| 26 | echo " cds.robot: cds" |
| 27 | echo "" |
| 28 | echo " clamp.robot: clamp" |
| 29 | echo "" |
| 30 | echo " demo.robot: InitDemo, InitCustomer, APPCCDTPreloadDemo, APPCMountPointDemo, DistributeDemoVFWDT, DistributeVFWNG," |
| 31 | echo " InitDistribution, PreloadDemo, deleteVNF, heatbridge, instantiateDemoVFWCL, instantiateVFW, instantiateVFWCL, instantiateVFWDT" |
| 32 | echo "" |
| 33 | echo " health-check.robot: health, core, small, medium, 3rdparty, api, datarouter, externalapi, health-aaf, health-aai, health-appc," |
| 34 | echo " health-clamp, health-cli, health-dcae, health-dmaap, health-log, health-modeling, health-msb," |
| 35 | echo " health-multicloud, health-oof, health-policy, health-pomba, health-portal, health-sdc, health-sdnc," |
| 36 | echo " health-so, health-uui, health-vfc, health-vid, health-vnfsdk, healthdist, healthlogin, healthmr," |
| 37 | echo " healthportalapp, multicloud, oom" |
| 38 | echo "" |
| 39 | echo " hvves.robot: HVVES, ete" |
| 40 | echo "" |
| 41 | echo " model-distribution-vcpe.robot: distributevCPEResCust" |
| 42 | echo "" |
| 43 | echo " model-distribution.robot: distribute, distributeVFWDT, distributeVLB" |
| 44 | echo "" |
| 45 | echo " oof-*.robot: cmso, has, homing" |
| 46 | echo "" |
| 47 | echo " pnf-registration.robot: ete, pnf_registrate" |
| 48 | echo "" |
Brian Freeman | 46d00ca | 2019-05-06 12:12:36 -0500 | [diff] [blame] | 49 | echo " post-install-tests.robot dmaapacl, postinstall" |
kaihlavi | 7a41110 | 2019-05-09 16:31:15 +0300 | [diff] [blame] | 50 | echo "" |
| 51 | echo " update_onap_page.robot: UpdateWebPage" |
| 52 | echo "" |
| 53 | echo " vnf-orchestration-direct-so.robot: instantiateVFWdirectso" |
| 54 | echo "" |
Brian Freeman | 46d00ca | 2019-05-06 12:12:36 -0500 | [diff] [blame] | 55 | echo " vnf-orchestration.robot: instantiate, instantiateNoDelete, stability72hr" |
Mandeep Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 56 | exit |
| 57 | fi |
| 58 | |
Gary Wu | bf7f159 | 2018-09-14 10:29:27 -0700 | [diff] [blame] | 59 | set -x |
Brian Freeman | 6b89ba0 | 2018-04-23 20:54:13 -0500 | [diff] [blame] | 60 | |
BorislavG | 8bfc6cf | 2018-02-27 15:04:26 +0000 | [diff] [blame] | 61 | export NAMESPACE="$1" |
Brian Freeman | 6b89ba0 | 2018-04-23 20:54:13 -0500 | [diff] [blame] | 62 | |
| 63 | POD=$(kubectl --namespace $NAMESPACE get pods | sed 's/ .*//'| grep robot) |
| 64 | |
Gary Wu | 4ec2c67 | 2018-11-01 11:57:27 -0700 | [diff] [blame] | 65 | TAGS="-i $2" |
Brian Freeman | 6b89ba0 | 2018-04-23 20:54:13 -0500 | [diff] [blame] | 66 | |
Brian Freeman | ab7c174 | 2019-02-13 18:05:02 -0500 | [diff] [blame] | 67 | ETEHOME=/var/opt/ONAP |
Gary Wu | 4ec2c67 | 2018-11-01 11:57:27 -0700 | [diff] [blame] | 68 | export GLOBAL_BUILD_NUMBER=$(kubectl --namespace $NAMESPACE exec ${POD} -- bash -c "ls -1q /share/logs/ | wc -l") |
| 69 | OUTPUT_FOLDER=$(printf %04d $GLOBAL_BUILD_NUMBER)_ete_$2 |
| 70 | DISPLAY_NUM=$(($GLOBAL_BUILD_NUMBER + 90)) |
Mandeep Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 71 | |
| 72 | VARIABLEFILES="-V /share/config/vm_properties.py -V /share/config/integration_robot_properties.py -V /share/config/integration_preload_parameters.py" |
| 73 | VARIABLES="-v GLOBAL_BUILD_NUMBER:$$" |
| 74 | |
Gary Wu | 4ec2c67 | 2018-11-01 11:57:27 -0700 | [diff] [blame] | 75 | kubectl --namespace $NAMESPACE exec ${POD} -- ${ETEHOME}/runTags.sh ${VARIABLEFILES} ${VARIABLES} -d /share/logs/${OUTPUT_FOLDER} ${TAGS} --display $DISPLAY_NUM |