X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=test%2Fauto-test%2FFTC100.sh;h=34705f4e332c5b4ee9f160b7fd7b8efaf21d94f0;hb=f2bfafab18e7fb197a7e351a4f6a89c2936cbb5c;hp=e0b8d8739cbf13a4e806eebf4c46d5f6829bd502;hpb=49f0e5ab01b51aee8713a17aed86cd6d229b40cc;p=nonrtric.git diff --git a/test/auto-test/FTC100.sh b/test/auto-test/FTC100.sh index e0b8d873..34705f4e 100755 --- a/test/auto-test/FTC100.sh +++ b/test/auto-test/FTC100.sh @@ -18,14 +18,13 @@ # -TC_ONELINE_DESCR="Full agent API walk through using agent REST/DMAAP and with/without SDNC A1 Controller" +TC_ONELINE_DESCR="Full agent API walkthrough using agent REST/DMAAP and with/without SDNC A1 Controller" #App names to include in the test, space separated list INCLUDED_IMAGES="CBS CONSUL CP CR MR PA RICSIM SDNC" - #SUPPORTED TEST ENV FILE -SUPPORTED_PROFILES="ONAP-MASTER ONAP-GUILIN" +SUPPORTED_PROFILES="ONAP-GUILIN ONAP-HONOLULU ORAN-CHERRY ORAN-DAWN" . ../common/testcase_common.sh $@ . ../common/agent_api_functions.sh @@ -55,9 +54,11 @@ for __httpx in $TESTED_PROTOCOLS ; do clean_containers if [ $__httpx == "HTTPS" ]; then + use_cr_https use_agent_rest_https else use_agent_rest_http + use_cr_http fi start_policy_agent @@ -70,7 +71,6 @@ for __httpx in $TESTED_PROTOCOLS ; do if [ $__httpx == "HTTPS" ]; then - use_cr_https use_simulator_https use_mr_https if [[ $interface = *"SDNC"* ]]; then @@ -82,7 +82,6 @@ for __httpx in $TESTED_PROTOCOLS ; do use_agent_rest_https fi else - use_cr_http use_simulator_http use_mr_http if [[ $interface = *"SDNC"* ]]; then @@ -122,9 +121,12 @@ for __httpx in $TESTED_PROTOCOLS ; do sim_put_policy_type 201 ricsim_g1_1 2 testdata/OSC/sim_2.json if [ "$PMS_VERSION" == "V2" ]; then + sim_put_policy_type 201 ricsim_g3_1 STD_QOS_0_2_0 testdata/STD2/sim_qos.json + sim_put_policy_type 201 ricsim_g3_1 STD_QOS2_0.1.0 testdata/STD2/sim_qos2.json + api_equal json:rics 3 60 - api_equal json:policy-types 3 120 + api_equal json:policy-types 5 120 api_equal json:policies 0 @@ -237,7 +239,7 @@ for __httpx in $TESTED_PROTOCOLS ; do echo "############################################" if [ "$PMS_VERSION" == "V2" ]; then - api_get_rics 200 NOTYPE "ricsim_g1_1:me1_ricsim_g1_1,me2_ricsim_g1_1:1,2:AVAILABLE ricsim_g2_1:me1_ricsim_g2_1,me2_ricsim_g2_1:EMPTYTYPE:AVAILABLE ricsim_g3_1:me1_ricsim_g3_1,me2_ricsim_g3_1:NOTYPE:AVAILABLE" + api_get_rics 200 NOTYPE "ricsim_g1_1:me1_ricsim_g1_1,me2_ricsim_g1_1:1,2:AVAILABLE ricsim_g2_1:me1_ricsim_g2_1,me2_ricsim_g2_1:EMPTYTYPE:AVAILABLE ricsim_g3_1:me1_ricsim_g3_1,me2_ricsim_g3_1:STD_QOS_0_2_0,STD_QOS2_0.1.0:AVAILABLE" else api_get_rics 200 NOTYPE "ricsim_g1_1:me1_ricsim_g1_1,me2_ricsim_g1_1:1,2:AVAILABLE ricsim_g2_1:me1_ricsim_g2_1,me2_ricsim_g2_1:EMPTYTYPE:AVAILABLE" fi @@ -256,10 +258,16 @@ for __httpx in $TESTED_PROTOCOLS ; do api_get_ric 200 me2_ricsim_g2_1 NORIC "ricsim_g2_1:me1_ricsim_g2_1,me2_ricsim_g2_1:EMPTYTYPE:AVAILABLE" + api_get_ric 200 me1_ricsim_g3_1 NORIC "ricsim_g3_1:me1_ricsim_g3_1,me2_ricsim_g3_1:STD_QOS_0_2_0,STD_QOS2_0.1.0:AVAILABLE" + + api_get_ric 200 me2_ricsim_g3_1 NORIC "ricsim_g3_1:me1_ricsim_g3_1,me2_ricsim_g3_1:STD_QOS_0_2_0,STD_QOS2_0.1.0:AVAILABLE" + api_get_ric 200 NOME ricsim_g1_1 "ricsim_g1_1:me1_ricsim_g1_1,me2_ricsim_g1_1:1,2:AVAILABLE" api_get_ric 200 NOME ricsim_g2_1 "ricsim_g2_1:me1_ricsim_g2_1,me2_ricsim_g2_1:EMPTYTYPE:AVAILABLE" + api_get_ric 200 NOME ricsim_g3_1 "ricsim_g3_1:me1_ricsim_g3_1,me2_ricsim_g3_1:STD_QOS_0_2_0,STD_QOS2_0.1.0:AVAILABLE" + api_get_ric 404 NOME test1 api_get_ric 404 test NORIC @@ -293,6 +301,12 @@ for __httpx in $TESTED_PROTOCOLS ; do deviation "TR9 - agent modify the type with type id - test combo $interface and $__httpx" #Behaviour accepted for now api_get_policy_type 200 2 testdata/OSC/2-agent-modified.json + deviation "TR9 - agent modify the type with type id - test combo $interface and $__httpx" + #Behaviour accepted for now + api_get_policy_type 200 STD_QOS_0_2_0 testdata/STD2/qos-agent-modified.json + deviation "TR9 - agent modify the type with type id - test combo $interface and $__httpx" + #Behaviour accepted for now + api_get_policy_type 200 STD_QOS2_0.1.0 testdata/STD2/qos2-agent-modified.json api_get_policy_type 404 3 else @@ -322,13 +336,20 @@ for __httpx in $TESTED_PROTOCOLS ; do fi - - api_get_policy_types 200 NORIC 1 2 EMPTY + if [ "$PMS_VERSION" == "V2" ]; then + api_get_policy_types 200 NORIC 1 2 EMPTY STD_QOS_0_2_0 STD_QOS2_0.1.0 + else + api_get_policy_types 200 NORIC 1 2 EMPTY + fi api_get_policy_types 200 ricsim_g1_1 1 2 api_get_policy_types 200 ricsim_g2_1 EMPTY + if [ "$PMS_VERSION" == "V2" ]; then + api_get_policy_types 200 ricsim_g3_1 STD_QOS_0_2_0 STD_QOS2_0.1.0 + fi + api_get_policy_types 404 dummy-ric @@ -358,23 +379,38 @@ for __httpx in $TESTED_PROTOCOLS ; do api_put_policy 200 "service10" ricsim_g2_1 NOTYPE 5100 true $notificationurl testdata/STD/pi1_template.json api_put_policy 200 "service10" ricsim_g2_1 NOTYPE 5100 false $notificationurl testdata/STD/pi1_template.json + if [ "$PMS_VERSION" == "V2" ]; then + api_put_policy 201 "service10" ricsim_g3_1 STD_QOS2_0.1.0 5200 NOTRANSIENT $notificationurl testdata/STD2/pi_qos2_template.json + api_put_policy 200 "service10" ricsim_g3_1 STD_QOS2_0.1.0 5200 NOTRANSIENT $notificationurl testdata/STD2/pi_qos2_template.json + + api_put_policy 200 "service10" ricsim_g3_1 STD_QOS2_0.1.0 5200 true $notificationurl testdata/STD2/pi_qos2_template.json + api_put_policy 200 "service10" ricsim_g3_1 STD_QOS2_0.1.0 5200 false $notificationurl testdata/STD2/pi_qos2_template.json + fi + VAL='NOT IN EFFECT' api_get_policy_status 200 5000 OSC "$VAL" "false" api_get_policy_status 200 5100 STD "UNDEFINED" + if [ "$PMS_VERSION" == "V2" ]; then + api_get_policy_status 200 5200 STD2 EMPTY EMPTY + fi deviation "TR10 - agent allows policy creation on unregistered service (side effect of orig. problem)- test combo $interface and $__httpx" #kept until decision #api_equal json:policies 2 #Allow 3 for now - api_equal json:policies 3 + if [ "$PMS_VERSION" == "V2" ]; then + api_equal json:policies 4 + else + api_equal json:policies 3 + fi deviation "TR10 - agent allows policy creation on unregistered service (side effect of orig. problem)- test combo $interface and $__httpx" #kept until decision #api_equal json:policy_ids 2 #Allow 3 for now if [ "$PMS_VERSION" == "V2" ]; then - api_equal json:policy-instances 3 + api_equal json:policy-instances 4 else api_equal json:policy_ids 3 fi @@ -383,28 +419,46 @@ for __httpx in $TESTED_PROTOCOLS ; do #kept until decision #api_get_policy_ids 200 NORIC NOSERVICE NOTYPE 5000 5100 #Allow policy create with unregistered service for now - api_get_policy_ids 200 NORIC NOSERVICE NOTYPE 5000 5100 2000 - + if [ "$PMS_VERSION" == "V2" ]; then + api_get_policy_ids 200 NORIC NOSERVICE NOTYPE 5000 5100 2000 5200 + else + api_get_policy_ids 200 NORIC NOSERVICE NOTYPE 5000 5100 2000 + fi deviation "TR10 - agent allows policy creation on unregistered service (side effect of orig. problem)- test combo $interface and $__httpx" #kept until decision #api_get_policy_ids 200 ricsim_g1_1 NOSERVICE NOTYPE 5000 #Allow policy create with unregistered service for now - api_get_policy_ids 200 ricsim_g1_1 NOSERVICE NOTYPE 5000 2000 + if [ "$PMS_VERSION" == "V2" ]; then + api_get_policy_ids 200 ricsim_g1_1 NOSERVICE NOTYPE 5000 2000 + + api_get_policy_ids 200 ricsim_g2_1 NOSERVICE NOTYPE 5100 + + api_get_policy_ids 200 ricsim_g3_1 NOSERVICE NOTYPE 5200 + + api_get_policy_ids 200 NORIC "service10" NOTYPE 5000 5100 5200 + else + api_get_policy_ids 200 ricsim_g1_1 NOSERVICE NOTYPE 5000 2000 - api_get_policy_ids 200 ricsim_g2_1 NOSERVICE NOTYPE 5100 + api_get_policy_ids 200 ricsim_g2_1 NOSERVICE NOTYPE 5100 - api_get_policy_ids 200 NORIC "service10" NOTYPE 5000 5100 + api_get_policy_ids 200 NORIC "service10" NOTYPE 5000 5100 + fi deviation "TR10 - agent allows policy creation on unregistered service (side effect of orig. problem)- test combo $interface and $__httpx" #kept until decision #api_get_policy_ids 200 NORIC NOSERVICE 1 5000 #Allow policy create with unregistered service for now + api_get_policy_ids 200 NORIC NOSERVICE 1 5000 2000 api_get_policy_ids 200 NORIC NOSERVICE 2 NOID + if [ "$PMS_VERSION" == "V2" ]; then + api_get_policy_ids 200 NORIC NOSERVICE STD_QOS2_0.1.0 5200 + fi + api_get_policy_ids 200 ricsim_g2_1 NOSERVICE 1 NOID if [ "$PMS_VERSION" == "V2" ]; then @@ -412,6 +466,8 @@ for __httpx in $TESTED_PROTOCOLS ; do api_get_policy 200 5100 testdata/STD/pi1_template.json "service10" ricsim_g2_1 NOTYPE false $notificationurl + api_get_policy 200 5200 testdata/STD2/pi_qos2_template.json "service10" ricsim_g3_1 STD_QOS2_0.1.0 false $notificationurl + api_get_policies 200 ricsim_g1_1 "service10" 1 5000 ricsim_g1_1 "service10" 1 false $notificationurl testdata/OSC/pi1_template.json else api_get_policy 200 5000 testdata/OSC/pi1_template.json @@ -431,8 +487,14 @@ for __httpx in $TESTED_PROTOCOLS ; do api_delete_policy 204 5000 + if [ "$PMS_VERSION" == "V2" ]; then + + api_delete_policy 204 5200 + fi + api_equal json:policies 1 + if [ "$PMS_VERSION" == "V2" ]; then api_equal json:policy-instances 1 else