X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=test%2Fauto-test%2FFTC_HELM_E_RELEASE.sh;h=f6433ad6db8fd8c724a0f1cffdbf305033f4b28d;hb=f83c362e67d25a464b80faf6d8363ccacacc5ebb;hp=2a6a3075437a04810885eceb3c7b1ad87d5b3b2a;hpb=007b64509101d8e3ef881955adee2ad15d062213;p=nonrtric.git diff --git a/test/auto-test/FTC_HELM_E_RELEASE.sh b/test/auto-test/FTC_HELM_E_RELEASE.sh index 2a6a3075..f6433ad6 100755 --- a/test/auto-test/FTC_HELM_E_RELEASE.sh +++ b/test/auto-test/FTC_HELM_E_RELEASE.sh @@ -19,15 +19,20 @@ TC_ONELINE_DESCR="Sanity test of Non-RT RIC Helm chats - all components - E-RELEASE" # This script requires the helm charts for nonrtric, a1simulator and a1controller are installed -# There should be 2 simulator of version started +# There should be 2 simulator of each A1 interface version started #App names to include in the test when running docker, space separated list DOCKER_INCLUDED_IMAGES="" # Not used - KUBE only test script #App names to include in the test when running kubernetes, space separated list -KUBE_INCLUDED_IMAGES=" MR CR PRODSTUB KUBEPROXY" +KUBE_INCLUDED_IMAGES=" MR DMAAPMR CR PRODSTUB KUBEPROXY KAFKAPC" #Prestarted app (not started by script) to include in the test when running kubernetes, space separated list -KUBE_PRESTARTED_IMAGES=" PA RICSIM CP ICS RC SDNC DMAAPMED DMAAPADP" +KUBE_PRESTARTED_IMAGES=" A1PMS RICSIM CP ICS RC SDNC DMAAPMED DMAAPADP" + +#Ignore image in DOCKER_INCLUDED_IMAGES, KUBE_INCLUDED_IMAGES if +#the image is not configured in the supplied env_file +#Used for images not applicable to all supported profile +CONDITIONALLY_IGNORED_IMAGES="" #Supported test environment profiles SUPPORTED_PROFILES="ORAN-E-RELEASE" @@ -40,13 +45,14 @@ setup_testenvironment #### TEST BEGIN #### -use_mr_http #MR only supports http? +use_mr_https use_cr_https -use_agent_rest_https +use_a1pms_rest_https use_sdnc_https use_simulator_https use_ics_rest_https use_prod_stub_https +use_dmaapmed_https if [ $ICS_VERSION == "V1-1" ]; then use_rapp_catalogue_http # https not yet supported @@ -60,17 +66,12 @@ echo -e "$RED CHECK WHY RC HTTPS DOES NOT WORK $ERED" ###############################use_control_panel_https use_control_panel_http -if [ "$PMS_VERSION" == "V1" ]; then - echo "PMS VERSION 2 (V2) is required" - exit 1 -fi - clean_environment -pms_kube_pvc_reset - ics_kube_pvc_reset +a1pms_kube_pvc_reset + start_kube_proxy STD_NUM_RICS=2 @@ -88,13 +89,22 @@ start_ric_simulators a1-sim-std2 $STD_NUM_RICS STD_2.0.0 echo " RIC MAPPING a1-sim-std2-0 : ric5" echo " RIC MAPPING a1-sim-std2-1 : ric6" -start_mr +start_mr "$MR_READ_TOPIC" "/events" "users/policy-agent" \ + "$MR_WRITE_TOPIC" "/events" "users/mr-stub" \ + "unauthenticated.dmaapmed.json" "/events" "dmaapmediatorproducer/STD_Fault_Messages" \ + "unauthenticated.dmaapadp.json" "/events" "dmaapadapterproducer/msgs" + +start_kafkapc + +kafkapc_api_create_topic 201 "unauthenticated.dmaapadp_kafka.text" "text/plain" + +kafkapc_api_start_sending 200 "unauthenticated.dmaapadp_kafka.text" start_control_panel start_sdnc -start_policy_agent +start_a1pms start_cr 1 @@ -106,7 +116,7 @@ set_ics_trace start_rapp_catalogue -set_agent_trace +set_a1pms_trace #### Test RAPP Catalogue #### @@ -119,7 +129,9 @@ rapp_cat_api_get_services 200 "Emergency-response-app" v1 "Emergency-response-ap #Check the number of services rc_equal json:services 1 -api_get_status 200 +sleep_wait 120 "Let A1PMS cofiguration take effect" + +a1_a1pms_api_get_status 200 #### Test Policy Management Service #### @@ -155,7 +167,7 @@ do done #Check the number of schemas -api_equal json:policy-types 1 +a1pms_equal json:policy-types 1 # Load the polictypes in STD 2 for ((i=0; i<$STD_NUM_RICS; i++)) @@ -172,72 +184,60 @@ do done # Check that all rics are synced in -api_equal json:rics 6 300 +a1pms_equal json:rics 6 300 #Check the number of schemas and the individual schemas -api_equal json:policy-types 5 300 +a1pms_equal json:policy-types 5 300 for ((i=0; i<$STD_NUM_RICS; i++)) do ricid=$((3+$i)) - api_equal json:policy-types?ric_id=ric$ricid 1 120 + a1pms_equal json:policy-types?ric_id=ric$ricid 1 120 done for ((i=0; i<$STD_NUM_RICS; i++)) do ricid=$((5+$i)) - api_equal json:policy-types?ric_id=ric$ricid 2 120 + a1pms_equal json:policy-types?ric_id=ric$ricid 2 120 done for ((i=0; i<$OSC_NUM_RICS; i++)) do ricid=$((1+$i)) - api_equal json:policy-types?ric_id=ric$ricid 2 120 + a1pms_equal json:policy-types?ric_id=ric$ricid 2 120 done #Check the schemas in STD 2 for ((i=0; i<$OSC_NUM_RICS; i++)) do ricid=$((5+$i)) - api_get_policy_type 200 STD_QOS_0_2_0 testdata/STD2/qos-agent-modified.json - api_get_policy_type 200 STD_QOS2_0.1.0 testdata/STD2/qos2-agent-modified.json + a1_a1pms_api_get_policy_type 200 STD_QOS_0_2_0 testdata/STD2/qos-a1pms-modified.json + a1_a1pms_api_get_policy_type 200 STD_QOS2_0.1.0 testdata/STD2/qos2-a1pms-modified.json done # Check the schemas in OSC for ((i=0; i<$OSC_NUM_RICS; i++)) do - api_get_policy_type 200 1 testdata/OSC/1-agent-modified.json - api_get_policy_type 200 2 testdata/OSC/2-agent-modified.json + a1_a1pms_api_get_policy_type 200 1 testdata/OSC/1-a1pms-modified.json + a1_a1pms_api_get_policy_type 200 2 testdata/OSC/2-a1pms-modified.json done -if [ "$PMS_VERSION" == "V2" ]; then - - api_equal json:policy-types 5 120 - - api_equal json:policies 0 - - api_equal json:policy-instances 0 -else - - api_equal json:policy_schemas 5 120 +a1pms_equal json:policy-types 5 120 - api_equal json:policy_types 5 +a1pms_equal json:policies 0 - api_equal json:policies 0 +a1pms_equal json:policy-instances 0 - api_equal json:policy_ids 0 -fi - -api_put_service 201 "Emergency-response-app" 0 "$CR_SERVICE_APP_PATH_0/ER-app" +a1pms_api_put_service 201 "Emergency-response-app" 0 "$CR_SERVICE_APP_PATH_0/ER-app" # Create policies in STD for ((i=0; i<$STD_NUM_RICS; i++)) do ricid=$((3+$i)) generate_policy_uuid - api_put_policy 201 "Emergency-response-app" ric$ricid NOTYPE $((1100+$i)) NOTRANSIENT $CR_SERVICE_APP_PATH_0/"std2" testdata/STD/pi1_template.json 1 + a1pms_api_put_policy 201 "Emergency-response-app" ric$ricid NOTYPE $((1100+$i)) NOTRANSIENT $CR_SERVICE_APP_PATH_0/"std2" testdata/STD/pi1_template.json 1 generate_policy_uuid - api_put_policy 201 "Emergency-response-app" ric$ricid NOTYPE $((1200+$i)) NOTRANSIENT $CR_SERVICE_APP_PATH_0/"std2" testdata/STD/pi1_template.json 1 + a1pms_api_put_policy 201 "Emergency-response-app" ric$ricid NOTYPE $((1200+$i)) NOTRANSIENT $CR_SERVICE_APP_PATH_0/"std2" testdata/STD/pi1_template.json 1 done #Create policies in STD 2 @@ -245,9 +245,9 @@ for ((i=0; i<$STD_NUM_RICS; i++)) do ricid=$((5+$i)) generate_policy_uuid - api_put_policy 201 "Emergency-response-app" ric$ricid STD_QOS_0_2_0 $((2100+$i)) NOTRANSIENT $CR_SERVICE_APP_PATH_0/"std2" testdata/STD2/pi_qos_template.json 1 + a1pms_api_put_policy 201 "Emergency-response-app" ric$ricid STD_QOS_0_2_0 $((2100+$i)) NOTRANSIENT $CR_SERVICE_APP_PATH_0/"std2" testdata/STD2/pi_qos_template.json 1 generate_policy_uuid - api_put_policy 201 "Emergency-response-app" ric$ricid STD_QOS2_0.1.0 $((2200+$i)) NOTRANSIENT $CR_SERVICE_APP_PATH_0/"std2" testdata/STD2/pi_qos2_template.json 1 + a1pms_api_put_policy 201 "Emergency-response-app" ric$ricid STD_QOS2_0.1.0 $((2200+$i)) NOTRANSIENT $CR_SERVICE_APP_PATH_0/"std2" testdata/STD2/pi_qos2_template.json 1 done # Create policies in OSC @@ -255,9 +255,9 @@ for ((i=0; i<$OSC_NUM_RICS; i++)) do ricid=$((1+$i)) generate_policy_uuid - api_put_policy 201 "Emergency-response-app" ric$ricid 1 $((3100+$i)) NOTRANSIENT $CR_SERVICE_APP_PATH_0/"osc" testdata/OSC/pi1_template.json 1 + a1pms_api_put_policy 201 "Emergency-response-app" ric$ricid 1 $((3100+$i)) NOTRANSIENT $CR_SERVICE_APP_PATH_0/"osc" testdata/OSC/pi1_template.json 1 generate_policy_uuid - api_put_policy 201 "Emergency-response-app" ric$ricid 2 $((3200+$i)) NOTRANSIENT $CR_SERVICE_APP_PATH_0/"osc" testdata/OSC/pi2_template.json 1 + a1pms_api_put_policy 201 "Emergency-response-app" ric$ricid 2 $((3200+$i)) NOTRANSIENT $CR_SERVICE_APP_PATH_0/"osc" testdata/OSC/pi2_template.json 1 done @@ -274,31 +274,19 @@ do sim_equal "a1-sim-osc-"$i num_instances 2 done -stop_policy_agent +stop_a1pms -start_stopped_policy_agent +start_stopped_a1pms -# Check PMS state after restart +# Check A1PMS state after restart sleep_wait 200 -if [ "$PMS_VERSION" == "V2" ]; then - - api_equal json:policy-types 5 120 - - api_equal json:policies 12 - - api_equal json:policy-instances 12 -else - - api_equal json:policy_schemas 5 120 +a1pms_equal json:policy-types 5 120 - api_equal json:policy_types 5 +a1pms_equal json:policies 12 - api_equal json:policies 12 - - api_equal json:policy_ids 12 -fi +a1pms_equal json:policy-instances 12 # Check the number of policies in STD and STD2 for ((i=0; i<$STD_NUM_RICS; i++)) @@ -313,6 +301,7 @@ do sim_equal "a1-sim-osc-"$i num_instances 2 done +cr_api_reset 0 # Reset CR to count new events echo "ADD EVENT/STATUS CHECK" echo "ADD MR CHECK" @@ -346,6 +335,7 @@ if [ $ICS_VERSION == "V1-1" ]; then else ics_api_edp_put_type_2 201 type1 testdata/ics/ei-type-1.json ics_api_edp_get_type_2 200 type1 + ics_api_edp_get_type_ids 200 type1 ics_api_edp_put_producer_2 201 prod-a $CB_JOB/prod-a $CB_SV/prod-a type1 @@ -367,7 +357,7 @@ fi if [ $ICS_VERSION == "V1-1" ]; then prodstub_check_jobdata 200 prod-a job1 type1 $TARGET1 ricsim_g3_1 testdata/ics/job-template.json else - if [[ "$ICS_FEATURE_LEVEL" == *"INFO-TYPES"* ]]; then + if [[ "$ICS_FEATURE3LEVEL" == *"INFO-TYPES"* ]]; then prodstub_check_jobdata_3 200 prod-a job1 type1 $TARGET1 ricsim_g3_1 testdata/ics/job-template.json else prodstub_check_jobdata_2 200 prod-a job1 type1 $TARGET1 ricsim_g3_1 testdata/ics/job-template.json @@ -394,43 +384,54 @@ else fi # Dmaap mediator and adapter -start_dmaapadp NOPROXY $SIM_GROUP/$DMAAP_ADP_COMPOSE_DIR/$DMAAP_ADP_CONFIG_FILE $SIM_GROUP/$DMAAP_ADP_COMPOSE_DIR/$DMAAP_ADP_DATA_FILE +start_dmaapadp NOPROXY $SIM_GROUP/$DMAAP_ADP_COMPOSE_DIR/$DMAAP_ADP_CONFIG_FILE_TEMPLATE $SIM_GROUP/$DMAAP_ADP_COMPOSE_DIR/$DMAAP_ADP_DATA_FILE -start_dmaapmed NOPROXY $SIM_GROUP/$DMAAP_MED_COMPOSE_DIR/$DMAAP_MED_DATA_FILE +start_dmaapmed NOPROXY $SIM_GROUP/$DMAAP_MED_COMPOSE_DIR/$DMAAP_MED_HOST_DATA_FILE -ics_equal json:ei-producer/v1/eiproducers 2 60 +ics_equal json:data-producer/v1/info-producers 3 120 -ics_api_idc_get_type_ids 200 ExampleInformationType STD_Fault_Messages +ics_equal json:data-producer/v1/info-types 4 30 -ics_api_edp_get_producer_ids_2 200 NOTYPE DmaapGenericInfoProducer DMaaP_Mediator_Producer +ics_api_idc_get_type_ids 200 ExampleInformationType ExampleInformationTypeKafka STD_Fault_Messages type1 -NUM_JOBS=5 +ics_api_edp_get_producer_ids_2 200 NOTYPE prod-a DmaapGenericInfoProducer DMaaP_Mediator_Producer + +NUM_JOBS=1 for ((i=1; i<=$NUM_JOBS; i++)) do - ics_api_idc_put_job 201 jobx$i STD_Fault_Messages $CR_SERVICE_MR_PATH_0/jobx-data$i info-ownerx$i $CR_SERVICE_MR_PATH_0/job_status_info-ownerx$i testdata/dmaap-adapter/job-template.json + ics_api_idc_put_job 201 jobx$i STD_Fault_Messages $CR_SERVICE_MR_PATH_0/jobx-data$i info-ownerx$i $CR_SERVICE_MR_PATH_0/job_status_info-ownerx$i testdata/dmaap-adapter/job-template1.json done for ((i=1; i<=$NUM_JOBS; i++)) do - ics_api_idc_put_job 201 joby$i ExampleInformationType $CR_SERVICE_MR_PATH_0/joby-data$i info-ownery$i $CR_SERVICE_MR_PATH_0/job_status_info-ownery$i testdata/dmaap-adapter/job-template.json + ics_api_idc_put_job 201 joby$i ExampleInformationType $CR_SERVICE_MR_PATH_0/joby-data$i info-ownery$i $CR_SERVICE_MR_PATH_0/job_status_info-ownery$i testdata/dmaap-adapter/job-template1.json + ics_api_idc_put_job 201 jobz$i ExampleInformationTypeKafka $CR_SERVICE_MR_PATH_0/jobz-data$i info-ownerz$i $CR_SERVICE_MR_PATH_0/job_status_info-ownerz$i testdata/dmaap-adapter/job-template-1-kafka.json done for ((i=1; i<=$NUM_JOBS; i++)) do ics_api_a1_get_job_status 200 jobx$i ENABLED 30 + ics_api_a1_get_job_status 200 joby$i ENABLED 30 + ics_api_a1_get_job_status 200 jobz$i ENABLED 30 done +sleep_wait 30 # Wait for mediator to listening to kafka + mr_api_send_json "/events/unauthenticated.dmaapmed.json" '{"msg":"msg-0"}' mr_api_send_json "/events/unauthenticated.dmaapadp.json" '{"msg":"msg-1"}' mr_api_send_json "/events/unauthenticated.dmaapmed.json" '{"msg":"msg-2"}' mr_api_send_json "/events/unauthenticated.dmaapadp.json" '{"msg":"msg-3"}' +kafkapc_api_post_msg 200 "unauthenticated.dmaapadp_kafka.text" "text/plain" 'Message-------4' +kafkapc_api_post_msg 200 "unauthenticated.dmaapadp_kafka.text" "text/plain" 'Message-------6' + -cr_equal 0 received_callbacks $(($NUM_JOBS*2*2)) 60 +cr_equal 0 received_callbacks $(($NUM_JOBS*2*3)) 200 for ((i=1; i<=$NUM_JOBS; i++)) do cr_equal 0 received_callbacks?id=jobx-data$i 2 cr_equal 0 received_callbacks?id=joby-data$i 2 + cr_equal 0 received_callbacks?id=jobz-data$i 2 done for ((i=1; i<=$NUM_JOBS; i++)) @@ -439,6 +440,8 @@ do cr_api_check_single_genric_json_event 200 0 jobx-data$i '{"msg":"msg-2"}' cr_api_check_single_genric_json_event 200 0 joby-data$i '{"msg":"msg-1"}' cr_api_check_single_genric_json_event 200 0 joby-data$i '{"msg":"msg-3"}' + cr_api_check_single_genric_json_event 200 0 jobz-data$i 'Message-------4' + cr_api_check_single_genric_json_event 200 0 jobz-data$i 'Message-------6' done @@ -456,7 +459,7 @@ else ics_api_a1_get_job_status 200 job2 DISABLED fi -check_policy_agent_logs +check_a1pms_logs check_ics_logs check_sdnc_logs