X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=test%2Fcommon%2Fmr_api_functions.sh;h=122b4124c1225a6bdc08eb8221fedbcd9a4e6e1b;hb=1b732d17463fad74721391b3a87a2a12172da63c;hp=c6feb459829566f7f5f309970e10192cc18de053;hpb=98ce5dc75fc222dadaf26a8a148788b0367bf6ca;p=nonrtric.git diff --git a/test/common/mr_api_functions.sh b/test/common/mr_api_functions.sh index c6feb459..122b4124 100755 --- a/test/common/mr_api_functions.sh +++ b/test/common/mr_api_functions.sh @@ -173,7 +173,7 @@ __DMAAPMR_store_docker_logs() { kubectl logs -n $KUBE_ONAP_NAMESPACE $podname --tail=-1 > $1$2_$podname.log 2>&1 done else - docker logs $MR_DMAAP_APP_NAME > $1$2mr.log 2>&1 + docker logs $MR_DMAAP_APP_NAME > $1$2_mr.log 2>&1 docker logs $MR_KAFKA_APP_NAME > $1$2_mr_kafka.log 2>&1 docker logs $MR_ZOOKEEPER_APP_NAME > $1$2_mr_zookeeper.log 2>&1 fi @@ -217,6 +217,18 @@ __DMAAPMR_statisics_setup() { fi } +# Check application requirements, e.g. helm, the the test needs. Exit 1 if req not satisfied +# args: - +__MR_test_requirements() { + : +} + +# Check application requirements, e.g. helm, the the test needs. Exit 1 if req not satisfied +# args: - +__DMAAPMR_test_requirements() { + : +} + ####################################################### # Description of port mappings when running MR-STUB only or MR-STUB + MESSAGE-ROUTER @@ -273,7 +285,7 @@ use_mr_https() { # args: __mr_set_protocoll() { echo -e $BOLD"$MR_STUB_DISPLAY_NAME and $MR_DMAAP_DISPLAY_NAME protocol setting"$EBOLD - echo -e " Using $BOLD http $EBOLD towards $MR_STUB_DISPLAY_NAME and $MR_DMAAP_DISPLAY_NAME" + echo -e " Using $BOLD $1 $EBOLD towards $MR_STUB_DISPLAY_NAME and $MR_DMAAP_DISPLAY_NAME" ## Access to Dmaap mediator @@ -629,10 +641,7 @@ start_mr() { fi fi - echo " Current topics:" - curlString="$MR_DMAAP_PATH/topics" - result=$(__do_curl "$curlString") - echo $result | indent2 + dmaap_api_print_topics fi __mr_export_vars @@ -719,6 +728,15 @@ __dmaap_pipeclean() { return 1 } +# Helper function to list the current topics in DMAAP MR +# args: - +dmaap_api_print_topics() { + echo " Current topics:" + curlString="$MR_DMAAP_PATH/topics" + result=$(__do_curl "$curlString") + echo $result | indent2 +} + ### Generic test cases for varaible checking @@ -901,7 +919,7 @@ mr_api_generate_json_payload_file() { return 0 } -# Create tet file for payload +# Create text file for payload # arg: mr_api_generate_text_payload_file() { __log_conf_start $@