X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;ds=sidebyside;f=test%2Fcommon%2Fhelmmanager_api_functions.sh;h=80239f9feac475426d707065a36b05833dc07ae4;hb=b188e12cc1b4be627ae6f8f424f06c38ffb89804;hp=a5a9a097e56fc0b97b1546c193409893781cc8e0;hpb=237a4da4b9419171f774bd6a02f61bef81f1b60f;p=nonrtric.git diff --git a/test/common/helmmanager_api_functions.sh b/test/common/helmmanager_api_functions.sh index a5a9a097..80239f9f 100644 --- a/test/common/helmmanager_api_functions.sh +++ b/test/common/helmmanager_api_functions.sh @@ -17,7 +17,7 @@ # ============LICENSE_END================================================= # -# This is a script that contains container/service managemnt functions test functions for Helm Manager +# This is a script that contains container/service management functions test functions for Helm Manager ################ Test engine functions ################ @@ -25,7 +25,7 @@ # arg: [] (selects staging, snapshot, release etc) # is present only for images with staging, snapshot,release tags __HELMMANAGER_imagesetup() { - __check_and_create_image_var HELMMANAGER "HELM_MANAGER_IMAGE" "HELM_MANAGER_IMAGE_BASE" "HELM_MANAGER_IMAGE_TAG" $1 "$HELM_MANAGER_DISPLAY_NAME" + __check_and_create_image_var HELMMANAGER "HELM_MANAGER_IMAGE" "HELM_MANAGER_IMAGE_BASE" "HELM_MANAGER_IMAGE_TAG" $1 "$HELM_MANAGER_DISPLAY_NAME" "" } # Pull image from remote repo or use locally built image @@ -55,12 +55,12 @@ __HELMMANAGER_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. __HELMMANAGER_kube_scale_zero_and_wait() { __kube_scale_and_wait_all_resources $KUBE_NONRTRIC_NAMESPACE app "$KUBE_NONRTRIC_NAMESPACE"-"$HELM_MANAGER_APP_NAME" } -# 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. __HELMMANAGER_kube_delete_all() { __kube_delete_all_resources $KUBE_NONRTRIC_NAMESPACE autotest HELMMANAGER @@ -68,10 +68,10 @@ __HELMMANAGER_kube_delete_all() { # Store docker logs # This function is called for apps managed by the test script. -# args: +# args: __HELMMANAGER_store_docker_logs() { if [ $RUNMODE == "KUBE" ]; then - kubectl logs -l "autotest=HELMMANAGER" -n $KUBE_NONRTRIC_NAMESPACE --tail=-1 > $1$2_helmmanager.log 2>&1 + kubectl $KUBECONF logs -l "autotest=HELMMANAGER" -n $KUBE_NONRTRIC_NAMESPACE --tail=-1 > $1$2_helmmanager.log 2>&1 else docker logs $HELM_MANAGER_APP_NAME > $1$2_helmmanager.log 2>&1 fi @@ -84,11 +84,11 @@ __HELMMANAGER_initial_setup() { use_helm_manager_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: - -__HELMMANAGER_statisics_setup() { +__HELMMANAGER_statistics_setup() { if [ $RUNMODE == "KUBE" ]; then echo "HELMMANAGER $HELM_MANAGER_APP_NAME $KUBE_NONRTRIC_NAMESPACE" else @@ -178,7 +178,7 @@ start_helm_manager() { __check_included_image "HELMMANAGER" 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 "HELMMANAGER" retcode_p=$? @@ -243,7 +243,7 @@ start_helm_manager() { echo "" } -# Excute a curl cmd towards the helm manager. +# Execute a curl cmd towards the helm manager. # args: GET # args: POST # args: POST3 @@ -517,7 +517,7 @@ helm_manager_api_exec_add_repo() { return 1 fi else - retmsg=$(kubectl exec -it $HELM_MANAGER_APP_NAME -n $KUBE_NONRTRIC_NAMESPACE -- helm repo add $1 $2) + retmsg=$(kubectl $KUBECONF exec -it $HELM_MANAGER_APP_NAME -n $KUBE_NONRTRIC_NAMESPACE -- helm repo add $1 $2) retcode=$? if [ $retcode -ne 0 ]; then __log_conf_fail_general " Cannot add repo to helm, return code: $retcode, msg: $retmsg"