Functional Test Updates for I Release
[nonrtric.git] / test / auto-test / startMR.sh
1 #!/bin/bash
2
3 #  ============LICENSE_START===============================================
4 #  Copyright (C) 2021-2023 Nordix Foundation. All rights reserved.
5 #  Copyright (C) 2023 OpenInfra Foundation Europe. All rights reserved.
6 #  ========================================================================
7 #  Licensed under the Apache License, Version 2.0 (the "License");
8 #  you may not use this file except in compliance with the License.
9 #  You may obtain a copy of the License at
10 #
11 #       http://www.apache.org/licenses/LICENSE-2.0
12 #
13 #  Unless required by applicable law or agreed to in writing, software
14 #  distributed under the License is distributed on an "AS IS" BASIS,
15 #  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 #  See the License for the specific language governing permissions and
17 #  limitations under the License.
18 #  ============LICENSE_END=================================================
19 #
20
21 TC_ONELINE_DESCR="Starts DMAAP MR"
22
23 #App names to include in the test when running docker, space separated list
24 DOCKER_INCLUDED_IMAGES="MR DMAAPMR KUBEPROXY KAFKAPC"
25
26 #App names to include in the test when running kubernetes, space separated list
27 KUBE_INCLUDED_IMAGES="MR DMAAPMR KUBEPROXY KAFKAPC"
28 #Pre-started 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
34 CONDITIONALLY_IGNORED_IMAGES=""
35
36 #Supported test environment profiles
37 SUPPORTED_PROFILES="ORAN-G-RELEASE ORAN-H-RELEASE ORAN-I-RELEASE"
38 #Supported run modes
39 SUPPORTED_RUNMODES="DOCKER KUBE"
40
41 . ../common/testcase_common.sh $@
42
43 setup_testenvironment
44
45 #### TEST BEGIN ####
46
47 clean_environment
48 start_kube_proxy
49 start_mr    "$MR_READ_TOPIC"  "/events" "users/policy-agent" \
50             "$MR_WRITE_TOPIC" "/events" "users/mr-stub"
51             #\
52             #"unauthenticated.dmaapadp.json" "/events" "dmaapadapterproducer/msgs" \
53             #"unauthenticated.dmaapmed.json" "/events" "maapmediatorproducer/STD_Fault_Messages"
54
55 start_kafkapc
56
57 kafkapc_api_reset 200
58
59 kafkapc_api_create_topic 201 "unauthenticated.dmaapadp.json" "application/json"
60
61 kafkapc_api_create_topic 201 "unauthenticated.dmaapmed.json" "application/json"
62
63 dmaap_api_print_topics
64
65 if [ $RUNMODE == "KUBE" ]; then
66     :
67 else
68     docker kill $MR_STUB_APP_NAME
69 fi
70
71
72