X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=test%2Fcommon%2Fricsim_api_functions.sh;h=b8af5323b4f33fb3c2cfeedd40f58608a081276e;hb=844931b62f35ce6ee2d9dc7274573fc54e14407a;hp=bd526119af2683c5082e8fc18f8357d5ac67aab8;hpb=dfdca185681554d67b63ec37ed19954654223e46;p=nonrtric.git diff --git a/test/common/ricsim_api_functions.sh b/test/common/ricsim_api_functions.sh index bd526119..b8af5323 100644 --- a/test/common/ricsim_api_functions.sh +++ b/test/common/ricsim_api_functions.sh @@ -72,8 +72,8 @@ __RICSIM_kube_delete_all() { # args: __RICSIM_store_docker_logs() { if [ $RUNMODE == "KUBE" ]; then - for podname in $(kubectl get pods -n $KUBE_A1SIM_NAMESPACE -l "autotest=RICSIM" -o custom-columns=":metadata.name"); do - kubectl logs -n $KUBE_A1SIM_NAMESPACE $podname --tail=-1 > $1$2_$podname.log 2>&1 + for podname in $(kubectl $KUBECONF get pods -n $KUBE_A1SIM_NAMESPACE -l "autotest=RICSIM" -o custom-columns=":metadata.name"); do + kubectl $KUBECONF logs -n $KUBE_A1SIM_NAMESPACE $podname --tail=-1 > $1$2_$podname.log 2>&1 done else @@ -116,6 +116,12 @@ __RICSIM_statisics_setup() { done } +# Check application requirements, e.g. helm, the the test needs. Exit 1 if req not satisfied +# args: - +__RICSIM_test_requirements() { + : +} + ####################################################### @@ -235,7 +241,7 @@ start_ric_simulators() { export RIC_SIM_INTERNAL_PORT export RIC_SIM_INTERNAL_SECURE_PORT - echo -e " Creating $POLICY_AGENT_APP_NAME app and expose service" + echo -e " Creating $RIC_SIM_PREFIX app and expose service" #Check if nonrtric namespace exists, if not create it __kube_create_namespace $KUBE_A1SIM_NAMESPACE @@ -247,7 +253,7 @@ start_ric_simulators() { # Create app input_yaml=$SIM_GROUP"/"$RIC_SIM_COMPOSE_DIR"/"app.yaml - output_yaml=$PWD/tmp/pa_${1}_app.yaml + output_yaml=$PWD/tmp/ric_${1}_app.yaml __kube_create_instance app $RIC_SIM_SET_NAME $input_yaml $output_yaml #Using only instance from index 1 to keep compatability with docker @@ -257,7 +263,6 @@ start_ric_simulators() { done fi else - __check_included_image 'RICSIM' if [ $? -eq 1 ]; then echo -e $RED"The Near-RT RIC Simulator app is not included as managed in this test script"$ERED @@ -281,7 +286,7 @@ start_ric_simulators() { export DOCKER_SIM_NWNAME export RIC_SIM_DISPLAY_NAME - docker_args="--no-recreate --scale $RICSIM_COMPOSE_SERVICE_NAME=$2" + docker_args=" --scale $RICSIM_COMPOSE_SERVICE_NAME=$2" #Create a list of contsiner names #Will be __