X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=test%2Fauto-test%2FFTC1800.sh;h=6241f3cacb6d03967a48cf4d84972553f8a4aff6;hb=d0c7f9207203ce9a502fc15c09f9938eebfd44f7;hp=cbb78700fc01d812729e5f7383707e6004e66ee6;hpb=e45cd2c15e8862040471c92bf3c67243aa94d45f;p=nonrtric.git diff --git a/test/auto-test/FTC1800.sh b/test/auto-test/FTC1800.sh index cbb78700..6241f3ca 100755 --- a/test/auto-test/FTC1800.sh +++ b/test/auto-test/FTC1800.sh @@ -21,7 +21,7 @@ TC_ONELINE_DESCR="ECS Create 10000 jobs (ei and info) restart, test job persistency" #App names to include in the test when running docker, space separated list -DOCKER_INCLUDED_IMAGES="ECS PRODSTUB CR CP NGW" +DOCKER_INCLUDED_IMAGES="ECS PRODSTUB CR CP NGW KUBEPROXY" #App names to include in the test when running kubernetes, space separated list KUBE_INCLUDED_IMAGES="ECS PRODSTUB CP CR KUBEPROXY NGW" @@ -34,7 +34,7 @@ KUBE_PRESTARTED_IMAGES="" CONDITIONALLY_IGNORED_IMAGES="NGW" #Supported test environment profiles -SUPPORTED_PROFILES="ONAP-HONOLULU ONAP-ISTANBUL ORAN-CHERRY ORAN-D-RELEASE" +SUPPORTED_PROFILES="ONAP-HONOLULU ONAP-ISTANBUL ORAN-CHERRY ORAN-D-RELEASE ORAN-E-RELEASE" #Supported run modes SUPPORTED_RUNMODES="DOCKER KUBE" @@ -55,9 +55,7 @@ FLAT_A1_EI="1" clean_environment -if [ $RUNMODE == "KUBE" ]; then - start_kube_proxy -fi +start_kube_proxy use_ecs_rest_http @@ -88,6 +86,21 @@ if [[ "$ECS_FEATURE_LEVEL" == *"INFO-TYPES"* ]]; then NUM_JOBS=5000 # 5K ei jobs and 5K info jobs fi +if [[ "$ECS_FEATURE_LEVEL" == *"TYPE-SUBSCRIPTIONS"* ]]; then + #Type registration status callbacks + TYPESTATUS1="$CR_SERVICE_APP_PATH/type-status1" + TYPESTATUS2="$CR_SERVICE_APP_PATH/type-status2" + + ecs_api_idc_put_subscription 201 subscription-id-1 owner1 $TYPESTATUS1 + + ecs_api_idc_get_subscription_ids 200 owner1 subscription-id-1 + + ecs_api_idc_put_subscription 201 subscription-id-2 owner2 $TYPESTATUS2 + + ecs_api_idc_get_subscription_ids 200 owner2 subscription-id-2 + +fi + # Setup prodstub sim to accept calls for producers, types and jobs prodstub_arm_producer 200 prod-a prodstub_arm_producer 200 prod-b @@ -203,6 +216,39 @@ else ecs_api_edp_put_type_2 201 type104 testdata/ecs/info-type-4.json ecs_api_edp_put_type_2 201 type105 testdata/ecs/info-type-5.json + + + if [[ "$ECS_FEATURE_LEVEL" == *"TYPE-SUBSCRIPTIONS"* ]]; then + cr_equal received_callbacks 20 30 + cr_equal received_callbacks?id=type-status1 10 + cr_equal received_callbacks?id=type-status2 10 + + cr_api_check_all_ecs_subscription_events 200 type-status1 \ + type1 testdata/ecs/ei-type-1.json REGISTERED \ + type2 testdata/ecs/ei-type-2.json REGISTERED \ + type3 testdata/ecs/ei-type-3.json REGISTERED \ + type4 testdata/ecs/ei-type-4.json REGISTERED \ + type5 testdata/ecs/ei-type-5.json REGISTERED \ + type101 testdata/ecs/info-type-1.json REGISTERED \ + type102 testdata/ecs/info-type-2.json REGISTERED \ + type103 testdata/ecs/info-type-3.json REGISTERED \ + type104 testdata/ecs/info-type-4.json REGISTERED \ + type105 testdata/ecs/info-type-5.json REGISTERED + + cr_api_check_all_ecs_subscription_events 200 type-status2 \ + type1 testdata/ecs/ei-type-1.json REGISTERED \ + type2 testdata/ecs/ei-type-2.json REGISTERED \ + type3 testdata/ecs/ei-type-3.json REGISTERED \ + type4 testdata/ecs/ei-type-4.json REGISTERED \ + type5 testdata/ecs/ei-type-5.json REGISTERED \ + type101 testdata/ecs/info-type-1.json REGISTERED \ + type102 testdata/ecs/info-type-2.json REGISTERED \ + type103 testdata/ecs/info-type-3.json REGISTERED \ + type104 testdata/ecs/info-type-4.json REGISTERED \ + type105 testdata/ecs/info-type-5.json REGISTERED + + fi + ecs_api_edp_put_producer_2 200 prod-a $CB_JOB/prod-a $CB_SV/prod-a type1 type101 ecs_api_edp_put_producer_2 200 prod-b $CB_JOB/prod-b $CB_SV/prod-b type1 type2 type101 type102 @@ -227,62 +273,62 @@ ecs_api_edp_get_producer_status 200 prod-d ENABLED for ((i=1; i<=$NUM_JOBS; i++)) do if [ $(($i%5)) -eq 0 ]; then - ecs_api_a1_put_job 201 job$i type1 $TARGET ric1 $CR_SERVICE_PATH/job_status_ric1 testdata/ecs/job-template.json + ecs_api_a1_put_job 201 job$i type1 $TARGET ric1 $CR_SERVICE_APP_PATH/job_status_ric1 testdata/ecs/job-template.json if [ -z "$FLAT_A1_EI" ]; then ecs_api_a1_get_job_status 200 type1 job$i ENABLED else ecs_api_a1_get_job_status 200 job$i ENABLED 120 fi if [ $use_info_jobs ]; then - ecs_api_idc_put_job 201 job$(($i+$NUM_JOBS)) type101 $TARGET info-owner $CR_SERVICE_PATH/job_status_info-owner testdata/ecs/job-template.json VALIDATE + ecs_api_idc_put_job 201 job$(($i+$NUM_JOBS)) type101 $TARGET info-owner $CR_SERVICE_APP_PATH/job_status_info-owner testdata/ecs/job-template.json VALIDATE ecs_api_idc_get_job_status2 200 job$(($i+$NUM_JOBS)) ENABLED 3 prod-a prod-b prod-c 120 fi fi if [ $(($i%5)) -eq 1 ]; then - ecs_api_a1_put_job 201 job$i type2 $TARGET ric1 $CR_SERVICE_PATH/job_status_ric1 testdata/ecs/job-template.json + ecs_api_a1_put_job 201 job$i type2 $TARGET ric1 $CR_SERVICE_APP_PATH/job_status_ric1 testdata/ecs/job-template.json if [ -z "$FLAT_A1_EI" ]; then ecs_api_a1_get_job_status 200 type2 job$i ENABLED else ecs_api_a1_get_job_status 200 job$i ENABLED 120 fi if [ $use_info_jobs ]; then - ecs_api_idc_put_job 201 job$(($i+$NUM_JOBS)) type102 $TARGET info-owner $CR_SERVICE_PATH/job_status_info-owner testdata/ecs/job-template.json VALIDATE + ecs_api_idc_put_job 201 job$(($i+$NUM_JOBS)) type102 $TARGET info-owner $CR_SERVICE_APP_PATH/job_status_info-owner testdata/ecs/job-template.json VALIDATE ecs_api_idc_get_job_status2 200 job$(($i+$NUM_JOBS)) ENABLED 2 prod-b prod-c 120 fi fi if [ $(($i%5)) -eq 2 ]; then - ecs_api_a1_put_job 201 job$i type3 $TARGET ric1 $CR_SERVICE_PATH/job_status_ric1 testdata/ecs/job-template.json + ecs_api_a1_put_job 201 job$i type3 $TARGET ric1 $CR_SERVICE_APP_PATH/job_status_ric1 testdata/ecs/job-template.json if [ -z "$FLAT_A1_EI" ]; then ecs_api_a1_get_job_status 200 type3 job$i ENABLED else ecs_api_a1_get_job_status 200 job$i ENABLED 120 fi if [ $use_info_jobs ]; then - ecs_api_idc_put_job 201 job$(($i+$NUM_JOBS)) type103 $TARGET info-owner $CR_SERVICE_PATH/job_status_info-owner testdata/ecs/job-template.json VALIDATE + ecs_api_idc_put_job 201 job$(($i+$NUM_JOBS)) type103 $TARGET info-owner $CR_SERVICE_APP_PATH/job_status_info-owner testdata/ecs/job-template.json VALIDATE ecs_api_idc_get_job_status2 200 job$(($i+$NUM_JOBS)) ENABLED 1 prod-c 120 fi fi if [ $(($i%5)) -eq 3 ]; then - ecs_api_a1_put_job 201 job$i type4 $TARGET ric1 $CR_SERVICE_PATH/job_status_ric1 testdata/ecs/job-template.json + ecs_api_a1_put_job 201 job$i type4 $TARGET ric1 $CR_SERVICE_APP_PATH/job_status_ric1 testdata/ecs/job-template.json if [ -z "$FLAT_A1_EI" ]; then ecs_api_a1_get_job_status 200 type4 job$i ENABLED else ecs_api_a1_get_job_status 200 job$i ENABLED 120 fi if [ $use_info_jobs ]; then - ecs_api_idc_put_job 201 job$(($i+$NUM_JOBS)) type104 $TARGET info-owner $CR_SERVICE_PATH/job_status_info-owner testdata/ecs/job-template.json VALIDATE + ecs_api_idc_put_job 201 job$(($i+$NUM_JOBS)) type104 $TARGET info-owner $CR_SERVICE_APP_PATH/job_status_info-owner testdata/ecs/job-template.json VALIDATE ecs_api_idc_get_job_status2 200 job$(($i+$NUM_JOBS)) ENABLED 1 prod-d 120 fi fi if [ $(($i%5)) -eq 4 ]; then - ecs_api_a1_put_job 201 job$i type5 $TARGET ric1 $CR_SERVICE_PATH/job_status_ric1 testdata/ecs/job-template.json + ecs_api_a1_put_job 201 job$i type5 $TARGET ric1 $CR_SERVICE_APP_PATH/job_status_ric1 testdata/ecs/job-template.json if [ -z "$FLAT_A1_EI" ]; then ecs_api_a1_get_job_status 200 type5 job$i ENABLED else ecs_api_a1_get_job_status 200 job$i ENABLED 120 fi if [ $use_info_jobs ]; then - ecs_api_idc_put_job 201 job$(($i+$NUM_JOBS)) type105 $TARGET info-owner $CR_SERVICE_PATH/job_status_info-owner testdata/ecs/job-template.json VALIDATE + ecs_api_idc_put_job 201 job$(($i+$NUM_JOBS)) type105 $TARGET info-owner $CR_SERVICE_APP_PATH/job_status_info-owner testdata/ecs/job-template.json VALIDATE ecs_api_idc_get_job_status2 200 job$(($i+$NUM_JOBS)) ENABLED 1 prod-d 120 fi fi @@ -309,12 +355,54 @@ if [ $use_info_jobs ]; then ecs_equal json:data-consumer/v1/info-jobs?infoTypeId=type105 $(($NUM_JOBS/5)) fi +if [[ "$ECS_FEATURE_LEVEL" == *"TYPE-SUBSCRIPTIONS"* ]]; then + cr_equal received_callbacks 20 30 + +else + cr_equal received_callbacks 0 30 + +fi + + +if [[ "$ECS_FEATURE_LEVEL" == *"TYPE-SUBSCRIPTIONS"* ]]; then + + ecs_equal json:/data-consumer/v1/info-type-subscription 2 200 + + ecs_api_idc_get_subscription_ids 200 owner1 subscription-id-1 + ecs_api_idc_get_subscription_ids 200 owner2 subscription-id-2 + + if [ $use_info_jobs ]; then + ecs_equal json:data-producer/v1/info-types 10 1000 + else + ecs_equal json:ei-producer/v1/eitypes 5 1000 + fi + +fi + stop_ecs +cr_api_reset + start_stopped_ecs set_ecs_trace +if [[ "$ECS_FEATURE_LEVEL" == *"TYPE-SUBSCRIPTIONS"* ]]; then + + ecs_equal json:/data-consumer/v1/info-type-subscription 2 200 + + ecs_api_idc_get_subscription_ids 200 owner1 subscription-id-1 + ecs_api_idc_get_subscription_ids 200 owner2 subscription-id-2 + + if [ $use_info_jobs ]; then + ecs_equal json:data-producer/v1/info-types 10 1000 + else + ecs_equal json:ei-producer/v1/eitypes 5 1000 + fi +fi + +cr_equal received_callbacks 0 + for ((i=1; i<=$NUM_JOBS; i++)) do if [ $(($i%5)) -eq 0 ]; then @@ -688,6 +776,39 @@ if [ $use_info_jobs ]; then ecs_equal json:data-consumer/v1/info-jobs?infoTypeId=type105 0 fi +if [ $use_info_jobs ]; then + if [[ "$ECS_FEATURE_LEVEL" == *"TYPE-SUBSCRIPTIONS"* ]]; then + ecs_api_edp_put_type_2 200 type101 testdata/ecs/info-type-1.json + ecs_api_edp_put_type_2 200 type102 testdata/ecs/info-type-2.json + ecs_api_edp_put_type_2 200 type103 testdata/ecs/info-type-3.json + ecs_api_edp_put_type_2 200 type104 testdata/ecs/info-type-4.json + ecs_api_edp_put_type_2 200 type105 testdata/ecs/info-type-5.json + fi +fi + +if [[ "$ECS_FEATURE_LEVEL" == *"TYPE-SUBSCRIPTIONS"* ]]; then + cr_equal received_callbacks 10 30 + cr_equal received_callbacks?id=type-status1 5 + cr_equal received_callbacks?id=type-status2 5 + + cr_api_check_all_ecs_subscription_events 200 type-status1 \ + type101 testdata/ecs/info-type-1.json REGISTERED \ + type102 testdata/ecs/info-type-2.json REGISTERED \ + type103 testdata/ecs/info-type-3.json REGISTERED \ + type104 testdata/ecs/info-type-4.json REGISTERED \ + type105 testdata/ecs/info-type-5.json REGISTERED + + cr_api_check_all_ecs_subscription_events 200 type-status2 \ + type101 testdata/ecs/info-type-1.json REGISTERED \ + type102 testdata/ecs/info-type-2.json REGISTERED \ + type103 testdata/ecs/info-type-3.json REGISTERED \ + type104 testdata/ecs/info-type-4.json REGISTERED \ + type105 testdata/ecs/info-type-5.json REGISTERED + +else + cr_equal received_callbacks 0 30 +fi + check_ecs_logs store_logs END