X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;ds=sidebyside;f=test%2Fcommon%2Fkafkapc_api_functions.sh;h=61d45badaa0c4fe4d6e7a735015bdd6d3087640f;hb=2f3e40b4e4786b84cb70848fcdcfadd040ffda4a;hp=4b15641e888ccdf6025b56048cc72b199888abc9;hpb=e60d04ec982c4ccb833226624ff5c3e3f311097a;p=nonrtric.git diff --git a/test/common/kafkapc_api_functions.sh b/test/common/kafkapc_api_functions.sh index 4b15641e..61d45bad 100644 --- a/test/common/kafkapc_api_functions.sh +++ b/test/common/kafkapc_api_functions.sh @@ -17,7 +17,7 @@ # ============LICENSE_END================================================= # -# This is a script that contains container/service managemnt functions for Kafka producer/consumer +# This is a script that contains container/service management functions for Kafka producer/consumer ################ Test engine functions ################ @@ -25,7 +25,7 @@ # arg: (selects staging, snapshot, release etc) # is present only for images with staging, snapshot,release tags __KAFKAPC_imagesetup() { - __check_and_create_image_var KAFKAPC "KAFKAPC_IMAGE" "KAFKAPC_IMAGE_BASE" "KAFKAPC_IMAGE_TAG" LOCAL "$KAFKAPC_DISPLAY_NAME" + __check_and_create_image_var KAFKAPC "KAFKAPC_IMAGE" "KAFKAPC_IMAGE_BASE" "KAFKAPC_IMAGE_TAG" LOCAL "$KAFKAPC_DISPLAY_NAME" $IMAGE_TARGET_PLATFORM_IMG_TAG } # Pull image from remote repo or use locally built image @@ -44,7 +44,7 @@ __KAFKAPC_imagebuild() { cd ../$KAFKAPC_BUILD_DIR echo " Building KAFKAPC - $KAFKAPC_DISPLAY_NAME - image: $KAFKAPC_IMAGE" - docker build --build-arg NEXUS_PROXY_REPO=$NEXUS_PROXY_REPO -t $KAFKAPC_IMAGE . &> .dockererr + docker build $IMAGE_TARGET_PLATFORM_CMD_PARAM --build-arg NEXUS_PROXY_REPO=$NEXUS_PROXY_REPO -t $KAFKAPC_IMAGE . &> .dockererr if [ $? -eq 0 ]; then echo -e $GREEN" Build Ok"$EGREEN __retag_and_push_image KAFKAPC_IMAGE @@ -78,12 +78,12 @@ __KAFKAPC_kube_scale_zero() { } # Scale kubernetes resources to zero and wait until this has been accomplished, if relevant. If not relevant to scale, then do no action. -# This function is called for prestarted apps not managed by the test script. +# This function is called for pre-started apps not managed by the test script. __KAFKAPC_kube_scale_zero_and_wait() { echo -e $RED" KAFKAPC app is not scaled in this state"$ERED } -# Delete all kube resouces for the app +# Delete all kube resources for the app # This function is called for apps managed by the test script. __KAFKAPC_kube_delete_all() { __kube_delete_all_resources $KUBE_SIM_NAMESPACE autotest KAFKAPC @@ -91,10 +91,10 @@ __KAFKAPC_kube_delete_all() { # Store docker logs # This function is called for apps managed by the test script. -# args: +# args: __KAFKAPC_store_docker_logs() { if [ $RUNMODE == "KUBE" ]; then - kubectl logs -l "autotest=KAFKAPC" -n $KUBE_SIM_NAMESPACE --tail=-1 > $1$2_kafkapc.log 2>&1 + kubectl $KUBECONF logs -l "autotest=KAFKAPC" -n $KUBE_SIM_NAMESPACE --tail=-1 > $1$2_kafkapc.log 2>&1 else docker logs $KAFKAPC_APP_NAME > $1$2_kafkapc.log 2>&1 fi @@ -107,11 +107,11 @@ __KAFKAPC_initial_setup() { use_kafkapc_http } -# Set app short-name, app name and namespace for logging runtime statistics of kubernets pods or docker containers +# Set app short-name, app name and namespace for logging runtime statistics of kubernetes pods or docker containers # For docker, the namespace shall be excluded -# This function is called for apps managed by the test script as well as for prestarted apps. +# This function is called for apps managed by the test script as well as for pre-started apps. # args: - -__KAFKAPC_statisics_setup() { +__KAFKAPC_statistics_setup() { if [ $RUNMODE == "KUBE" ]; then echo "KAFKAPC $KAFKAPC_APP_NAME $KUBE_SIM_NAMESPACE" else @@ -200,7 +200,7 @@ start_kafkapc() { __check_included_image "KAFKAPC" retcode_i=$? - # Check if app shall only be used by the testscipt + # Check if app shall only be used by the test script __check_prestarted_image "KAFKAPC" retcode_p=$?