X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=test%2Fauto-test%2FFTC1800.sh;h=8ad142c0218a201d82c754aedb4fd9961722acc8;hb=3cc0b58e9a786f619af2af318ef2028179ed2dab;hp=fd50bc9b2350438c78e912968aa331b77d1814fc;hpb=c675b454a3434d690695a7336700f78a51579400;p=nonrtric.git diff --git a/test/auto-test/FTC1800.sh b/test/auto-test/FTC1800.sh index fd50bc9b..8ad142c0 100755 --- a/test/auto-test/FTC1800.sh +++ b/test/auto-test/FTC1800.sh @@ -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" @@ -82,13 +82,27 @@ CB_SV="$PROD_STUB_SERVICE_PATH$PROD_STUB_SUPERVISION_CALLBACK" TARGET="http://localhost:80/target" # Dummy target NUM_JOBS=10000 - use_info_jobs=false #Set flag if interface supporting info-types is used if [[ "$ECS_FEATURE_LEVEL" == *"INFO-TYPES"* ]]; then use_info_jobs=true 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_PATH/type-status1" + TYPESTATUS2="$CR_SERVICE_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 @@ -236,7 +250,7 @@ do 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_get_job_status 200 job$(($i+$NUM_JOBS)) ENABLED 120 + 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 @@ -248,7 +262,7 @@ do 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_get_job_status 200 job$(($i+$NUM_JOBS)) ENABLED 120 + 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 @@ -260,7 +274,7 @@ do 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_get_job_status 200 job$(($i+$NUM_JOBS)) ENABLED 120 + ecs_api_idc_get_job_status2 200 job$(($i+$NUM_JOBS)) ENABLED 1 prod-c 120 fi fi if [ $(($i%5)) -eq 3 ]; then @@ -272,7 +286,7 @@ do 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_get_job_status 200 job$(($i+$NUM_JOBS)) ENABLED 120 + ecs_api_idc_get_job_status2 200 job$(($i+$NUM_JOBS)) ENABLED 1 prod-d 120 fi fi if [ $(($i%5)) -eq 4 ]; then @@ -284,7 +298,7 @@ do 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_get_job_status 200 job$(($i+$NUM_JOBS)) ENABLED 120 + ecs_api_idc_get_job_status2 200 job$(($i+$NUM_JOBS)) ENABLED 1 prod-d 120 fi fi done @@ -310,12 +324,44 @@ 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 + stop_ecs +cr_api_reset + start_stopped_ecs set_ecs_trace + +if [[ "$ECS_FEATURE_LEVEL" == *"TYPE-SUBSCRIPTIONS"* ]]; then + + ecs_api_idc_get_subscription_ids 200 NOOWNER EMPTY + ecs_api_idc_get_subscription_ids 200 NOOWNER EMPTY + + 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 + + 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 + for ((i=1; i<=$NUM_JOBS; i++)) do if [ $(($i%5)) -eq 0 ]; then @@ -370,7 +416,7 @@ do ecs_api_a1_get_job_status 200 job$i DISABLED 120 fi if [ $use_info_jobs ]; then - ecs_api_idc_get_job_status 200 job$(($i+$NUM_JOBS)) DISABLED 120 + ecs_api_idc_get_job_status2 200 job$(($i+$NUM_JOBS)) DISABLED EMPTYPROD 120 fi fi if [ $(($i%5)) -eq 1 ]; then @@ -380,7 +426,7 @@ do ecs_api_a1_get_job_status 200 job$i DISABLED 120 fi if [ $use_info_jobs ]; then - ecs_api_idc_get_job_status 200 job$(($i+$NUM_JOBS)) DISABLED 120 + ecs_api_idc_get_job_status2 200 job$(($i+$NUM_JOBS)) DISABLED EMPTYPROD 120 fi fi if [ $(($i%5)) -eq 2 ]; then @@ -390,7 +436,7 @@ do ecs_api_a1_get_job_status 200 job$i DISABLED 120 fi if [ $use_info_jobs ]; then - ecs_api_idc_get_job_status 200 job$(($i+$NUM_JOBS)) DISABLED 120 + ecs_api_idc_get_job_status2 200 job$(($i+$NUM_JOBS)) DISABLED EMPTYPROD 120 fi fi if [ $(($i%5)) -eq 3 ]; then @@ -400,7 +446,7 @@ do ecs_api_a1_get_job_status 200 job$i DISABLED 120 fi if [ $use_info_jobs ]; then - ecs_api_idc_get_job_status 200 job$(($i+$NUM_JOBS)) DISABLED 120 + ecs_api_idc_get_job_status2 200 job$(($i+$NUM_JOBS)) DISABLED EMPTYPROD 120 fi fi if [ $(($i%5)) -eq 4 ]; then @@ -410,7 +456,7 @@ do ecs_api_a1_get_job_status 200 job$i DISABLED 120 fi if [ $use_info_jobs ]; then - ecs_api_idc_get_job_status 200 job$(($i+$NUM_JOBS)) DISABLED 120 + ecs_api_idc_get_job_status2 200 job$(($i+$NUM_JOBS)) DISABLED EMPTYPROD 120 fi fi done @@ -466,7 +512,7 @@ do ecs_api_a1_get_job_status 200 job$i ENABLED 120 fi if [ $use_info_jobs ]; then - ecs_api_idc_get_job_status 200 job$(($i+$NUM_JOBS)) ENABLED 120 + 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 @@ -476,7 +522,7 @@ do ecs_api_a1_get_job_status 200 job$i ENABLED 120 fi if [ $use_info_jobs ]; then - ecs_api_idc_get_job_status 200 job$(($i+$NUM_JOBS)) ENABLED 120 + 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 @@ -486,7 +532,7 @@ do ecs_api_a1_get_job_status 200 job$i ENABLED 120 fi if [ $use_info_jobs ]; then - ecs_api_idc_get_job_status 200 job$(($i+$NUM_JOBS)) ENABLED 120 + ecs_api_idc_get_job_status2 200 job$(($i+$NUM_JOBS)) ENABLED 1 prod-c 120 fi fi if [ $(($i%5)) -eq 3 ]; then @@ -496,7 +542,7 @@ do ecs_api_a1_get_job_status 200 job$i ENABLED 120 fi if [ $use_info_jobs ]; then - ecs_api_idc_get_job_status 200 job$(($i+$NUM_JOBS)) ENABLED 120 + ecs_api_idc_get_job_status2 200 job$(($i+$NUM_JOBS)) ENABLED 1 prod-d 120 fi fi if [ $(($i%5)) -eq 4 ]; then @@ -506,7 +552,7 @@ do ecs_api_a1_get_job_status 200 job$i ENABLED 120 fi if [ $use_info_jobs ]; then - ecs_api_idc_get_job_status 200 job$(($i+$NUM_JOBS)) ENABLED 120 + ecs_api_idc_get_job_status2 200 job$(($i+$NUM_JOBS)) ENABLED 1 prod-d 120 fi fi done @@ -689,6 +735,12 @@ if [ $use_info_jobs ]; then ecs_equal json:data-consumer/v1/info-jobs?infoTypeId=type105 0 fi +if [[ "$ECS_FEATURE_LEVEL" == *"TYPE-SUBSCRIPTIONS"* ]]; then + cr_equal received_callbacks 0 30 +else + cr_equal received_callbacks 0 30 +fi + check_ecs_logs store_logs END