X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=test%2Fauto-test%2FFTC350.sh;h=9d47caaa65564ef88e75b47c3fe179b00d0e41f0;hb=be9a07faf8fbc1030404bbc71f409eb5e19736ba;hp=4df0a15d908317db5226c56c7772a08bf4c6ce67;hpb=bc89f17bf07fc2aca8e8004b769c52eaafb117b8;p=nonrtric.git diff --git a/test/auto-test/FTC350.sh b/test/auto-test/FTC350.sh index 4df0a15d..9d47caaa 100755 --- a/test/auto-test/FTC350.sh +++ b/test/auto-test/FTC350.sh @@ -19,20 +19,34 @@ TC_ONELINE_DESCR="Change supported policy types and reconfigure rics" -#App names to include in the test, space separated list -INCLUDED_IMAGES="CBS CONSUL CP CR MR PA RICSIM SDNC" +#App names to include in the test when running docker, space separated list +DOCKER_INCLUDED_IMAGES="CBS CONSUL CP CR MR PA RICSIM SDNC NGW" -#SUPPORTED TEST ENV FILE +#App names to include in the test when running kubernetes, space separated list +KUBE_INCLUDED_IMAGES="CP CR MR PA RICSIM SDNC KUBEPROXY NGW" +#Prestarted app (not started by script) to include in the test when running kubernetes, space separated list +KUBE_PRESTARTED_IMAGES="" + +#Supported test environment profiles SUPPORTED_PROFILES="ONAP-GUILIN ONAP-HONOLULU ORAN-CHERRY ORAN-DAWN" +#Supported run modes +SUPPORTED_RUNMODES="DOCKER KUBE" . ../common/testcase_common.sh $@ . ../common/agent_api_functions.sh +. ../common/consul_cbs_functions.sh . ../common/ricsimulator_api_functions.sh . ../common/cr_api_functions.sh +. ../common/mr_api_functions.sh +. ../common/control_panel_api_functions.sh +. ../common/controller_api_functions.sh +. ../common/kube_proxy_api_functions.sh + +setup_testenvironment #### TEST BEGIN #### -generate_uuid +generate_policy_uuid use_cr_http @@ -52,7 +66,11 @@ for interface in $TESTED_VARIANTS ; do # Clean container and start all needed containers # - clean_containers + clean_environment + + if [ $RUNMODE == "KUBE" ]; then + start_kube_proxy + fi #Start simulators and prepare two configs @@ -62,7 +80,9 @@ for interface in $TESTED_VARIANTS ; do start_mr - start_consul_cbs + if [ $RUNMODE == "DOCKER" ]; then + start_consul_cbs + fi # Create first config if [[ $interface = *"SDNC"* ]]; then @@ -81,7 +101,7 @@ for interface in $TESTED_VARIANTS ; do prepare_consul_config NOSDNC ".consul_config_all.json" fi - start_policy_agent + start_policy_agent NORPOXY $SIM_GROUP/$POLICY_AGENT_COMPOSE_DIR/$POLICY_AGENT_CONFIG_FILE set_agent_trace @@ -89,10 +109,14 @@ for interface in $TESTED_VARIANTS ; do # Create service to be able to receive events when rics becomes available # Must use rest towards the agent since dmaap is not configured yet - api_put_service 201 "ric-registration" 0 "$CR_PATH/ric-registration" + api_put_service 201 "ric-registration" 0 "$CR_SERVICE_PATH/ric-registration" #Load first config - consul_config_app ".consul_config_initial.json" + if [ $RUNMODE == "KUBE" ]; then + agent_load_config ".consul_config_initial.json" + else + consul_config_app ".consul_config_initial.json" + fi for ((i=1; i<=${NUM_RICS}; i++)) do @@ -100,7 +124,7 @@ for interface in $TESTED_VARIANTS ; do done # All sims running but 2 are not configured in consul - api_equal json:rics 8 120 + api_equal json:rics 8 300 if [ "$PMS_VERSION" == "V2" ]; then cr_equal received_callbacks?id=ric-registration 8 120 @@ -187,7 +211,11 @@ for interface in $TESTED_VARIANTS ; do fi #Load config with all rics - consul_config_app ".consul_config_all.json" + if [ $RUNMODE == "KUBE" ]; then + agent_load_config ".consul_config_all.json" + else + consul_config_app ".consul_config_all.json" + fi api_equal json:rics 10 120 @@ -250,10 +278,10 @@ for interface in $TESTED_VARIANTS ; do api_equal json:policy_types 5 fi - api_put_service 201 "serv1" 3600 "$CR_PATH/serv1" + api_put_service 201 "serv1" 3600 "$CR_SERVICE_PATH/serv1" if [ "$PMS_VERSION" == "V2" ]; then - notificationurl=$CR_PATH"/test" + notificationurl=$CR_SERVICE_PATH"/test" else notificationurl="" fi @@ -261,7 +289,11 @@ for interface in $TESTED_VARIANTS ; do sleep_wait 120 # Load config with reduced number of rics - consul_config_app ".consul_config_initial.json" + if [ $RUNMODE == "KUBE" ]; then + agent_load_config ".consul_config_initial.json" + else + consul_config_app ".consul_config_initial.json" + fi api_equal json:rics 8 120 @@ -312,7 +344,11 @@ for interface in $TESTED_VARIANTS ; do api_get_policy_types 404 ricsim_g1_9 # Load config with all rics - consul_config_app ".consul_config_all.json" + if [ $RUNMODE == "KUBE" ]; then + agent_load_config ".consul_config_all.json" + else + consul_config_app ".consul_config_all.json" + fi api_equal json:rics 10 120 @@ -442,4 +478,4 @@ done print_result -auto_clean_containers \ No newline at end of file +auto_clean_environment \ No newline at end of file