elinuxhenrik | 6e571d5 | 2021-05-04 13:33:58 +0200 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | |
| 3 | # ============LICENSE_START=============================================== |
| 4 | # Copyright (C) 2021 Nordix Foundation. All rights reserved. |
| 5 | # ======================================================================== |
| 6 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 7 | # you may not use this file except in compliance with the License. |
| 8 | # You may obtain a copy of the License at |
| 9 | # |
| 10 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 11 | # |
| 12 | # Unless required by applicable law or agreed to in writing, software |
| 13 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 15 | # See the License for the specific language governing permissions and |
| 16 | # limitations under the License. |
| 17 | # ============LICENSE_END================================================= |
| 18 | # |
| 19 | |
| 20 | |
| 21 | TC_ONELINE_DESCR="Starts DMAAP MR" |
| 22 | |
| 23 | #App names to include in the test when running docker, space separated list |
BjornMagnussonXA | 663566c | 2021-11-08 10:25:07 +0100 | [diff] [blame] | 24 | DOCKER_INCLUDED_IMAGES="MR DMAAPMR KUBEPROXY" |
elinuxhenrik | 6e571d5 | 2021-05-04 13:33:58 +0200 | [diff] [blame] | 25 | |
| 26 | #App names to include in the test when running kubernetes, space separated list |
BjornMagnussonXA | 663566c | 2021-11-08 10:25:07 +0100 | [diff] [blame] | 27 | KUBE_INCLUDED_IMAGES="MR DMAAPMR KUBEPROXY" |
elinuxhenrik | 6e571d5 | 2021-05-04 13:33:58 +0200 | [diff] [blame] | 28 | #Prestarted app (not started by script) to include in the test when running kubernetes, space separated list |
| 29 | KUBE_PRESTARTED_IMAGES="" |
| 30 | |
| 31 | #Ignore image in DOCKER_INCLUDED_IMAGES, KUBE_INCLUDED_IMAGES if |
| 32 | #the image is not configured in the supplied env_file |
| 33 | #Used for images not applicable to all supported profile |
BjornMagnussonXA | 663566c | 2021-11-08 10:25:07 +0100 | [diff] [blame] | 34 | CONDITIONALLY_IGNORED_IMAGES="" |
elinuxhenrik | 6e571d5 | 2021-05-04 13:33:58 +0200 | [diff] [blame] | 35 | |
| 36 | #Supported test environment profiles |
BjornMagnussonXA | 663566c | 2021-11-08 10:25:07 +0100 | [diff] [blame] | 37 | SUPPORTED_PROFILES="ONAP-HONOLULU ONAP-ISTANBUL ORAN-D-RELEASE ORAN-E-RELEASE" |
elinuxhenrik | 6e571d5 | 2021-05-04 13:33:58 +0200 | [diff] [blame] | 38 | #Supported run modes |
| 39 | SUPPORTED_RUNMODES="DOCKER KUBE" |
| 40 | |
BjornMagnussonXA | 79e3700 | 2021-11-22 13:36:04 +0100 | [diff] [blame] | 41 | . ../common/testcase_common.sh $@ |
elinuxhenrik | 6e571d5 | 2021-05-04 13:33:58 +0200 | [diff] [blame] | 42 | |
| 43 | setup_testenvironment |
| 44 | |
| 45 | #### TEST BEGIN #### |
| 46 | |
| 47 | clean_environment |
BjornMagnussonXA | 663566c | 2021-11-08 10:25:07 +0100 | [diff] [blame] | 48 | start_kube_proxy |
BjornMagnussonXA | 6fc58fd | 2021-11-18 08:19:45 +0100 | [diff] [blame] | 49 | start_mr "$MR_READ_TOPIC" "/events" "users/policy-agent" \ |
| 50 | "$MR_WRITE_TOPIC" "/events" "users/mr-stub" \ |
| 51 | "unauthenticated.dmaapadp.json" "/events" "dmaapadapterproducer/msgs" \ |
| 52 | "unauthenticated.dmaapmed.json" "/events" "maapmediatorproducer/STD_Fault_Messages" |
| 53 | |
BjornMagnussonXA | 663566c | 2021-11-08 10:25:07 +0100 | [diff] [blame] | 54 | if [ $RUNMODE == "KUBE" ]; then |
| 55 | : |
| 56 | else |
| 57 | docker kill $MR_STUB_APP_NAME |
| 58 | fi |
elinuxhenrik | 6e571d5 | 2021-05-04 13:33:58 +0200 | [diff] [blame] | 59 | |
| 60 | |
elinuxhenrik | 6e571d5 | 2021-05-04 13:33:58 +0200 | [diff] [blame] | 61 | |