X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=test%2Fauto-test%2FFTC110.sh;h=c840800a9632002d0eca703e86d684d315a35e51;hb=5ada515a9b796bdcb0a78c7fd4eb3512bd21c031;hp=b4fc8851b4133cb7820f31a8907faacf5caf3a88;hpb=70e878f1b5a558baaaa5ab5885a039ed96c9f8d5;p=nonrtric.git diff --git a/test/auto-test/FTC110.sh b/test/auto-test/FTC110.sh index b4fc8851..c840800a 100755 --- a/test/auto-test/FTC110.sh +++ b/test/auto-test/FTC110.sh @@ -20,16 +20,25 @@ TC_ONELINE_DESCR="Testing of service registration timeouts and keepalive" +#App names to include in the test, space separated list +INCLUDED_IMAGES="CBS CONSUL CP CR MR PA RICSIM" + . ../common/testcase_common.sh $@ . ../common/agent_api_functions.sh . ../common/ricsimulator_api_functions.sh +generate_uuid #Local vars in test script ########################## # Path to callback receiver CR_PATH="http://$CR_APP_NAME:$CR_EXTERNAL_PORT/callbacks" +use_cr_http +use_simulator_http +use_mr_http +use_agent_rest_http + #### TEST BEGIN #### @@ -52,8 +61,6 @@ start_policy_agent set_agent_debug -use_agent_rest_http - #Verify no callbacks or dmaap messages has been sent cr_equal received_callbacks 0 mr_equal requests_submitted 0 @@ -139,10 +146,50 @@ api_put_services_keepalive 404 "service2" api_put_services_keepalive 404 "service3" api_put_services_keepalive 404 "service4" +# Policy delete after timeout +api_put_service 201 "service10" 600 "$CR_PATH/service10" + +sim_put_policy_type 201 ricsim_g1_1 1 testdata/OSC/sim_1.json + +api_equal json:rics 1 60 + +api_equal json:policy_schemas 1 120 + +api_equal json:policy_types 1 + +api_equal json:policies 0 + +api_put_policy 201 "service10" ricsim_g1_1 1 5000 NOTRANSIENT testdata/OSC/pi1_template.json + +api_equal json:policies 1 + +sim_equal ricsim_g1_1 num_instances 1 + +api_put_policy 201 "service10" ricsim_g1_1 1 5001 true testdata/OSC/pi1_template.json + +api_equal json:policies 2 + +sim_equal ricsim_g1_1 num_instances 2 + +sim_post_delete_instances 200 ricsim_g1_1 + +#Wait for recreate of non transient policy +api_equal json:policies 1 180 + +sim_equal ricsim_g1_1 num_instances 1 + +api_put_service 200 "service10" 10 "$CR_PATH/service10" + +#Wait for service expiry +api_equal json:policies 0 120 + +sim_equal ricsim_g1_1 num_instances 0 + + api_get_service_ids 200 deviation "TR18 Agents sends callback with empty body" -cr_equal received_callbacks 0 +cr_equal received_callbacks 4 mr_equal requests_submitted 0 check_policy_agent_logs