From: raviteja.karumuri Date: Wed, 22 May 2024 16:24:22 +0000 (+0100) Subject: Test FTC150 & FTC2002 fails since A1-SIM update X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=commitdiff_plain;h=7f8b77b648ea7b36fe7a785b642a08f67d51f2a6;p=nonrtric.git Test FTC150 & FTC2002 fails since A1-SIM update Issue-ID: NONRTRIC-1003 Change-Id: I9c7a1ba980b74fe247910b08f77baad29e9e3c72 Signed-off-by: Raviteja Karumuri --- diff --git a/test/auto-test/FTC150.sh b/test/auto-test/FTC150.sh index 0a53d591..2ce07505 100755 --- a/test/auto-test/FTC150.sh +++ b/test/auto-test/FTC150.sh @@ -128,9 +128,14 @@ for __nb_httpx in $NB_TESTED_PROTOCOLS ; do controller_api_get_A1_policy_status 200 OSC ricsim_g1_1 1 4000 controller_api_get_A1_policy_status 200 STD ricsim_g2_1 5000 - - VAL='NOT_ENFORCED' - controller_api_get_A1_policy_status 200 OSC ricsim_g1_1 1 4000 "$VAL" "OTHER_REASON" + if [[ $TEST_ENV_PROFILE =~ ^ORAN-[A-I] ]] || [[ $TEST_ENV_PROFILE =~ ^ONAP-[A-M] ]]; then + VAL='NOT IN EFFECT' + VAL2="false" + else + VAL='NOT_ENFORCED' + VAL2="OTHER_REASON" + fi + controller_api_get_A1_policy_status 200 OSC ricsim_g1_1 1 4000 "$VAL" "$VAL2" controller_api_get_A1_policy_status 200 STD ricsim_g2_1 5000 "UNDEFINED" RESP=202 diff --git a/test/auto-test/FTC2002.sh b/test/auto-test/FTC2002.sh index 547492ca..e34b56cb 100755 --- a/test/auto-test/FTC2002.sh +++ b/test/auto-test/FTC2002.sh @@ -143,7 +143,13 @@ for __nb_httpx in $NB_TESTED_PROTOCOLS ; do controller_api_get_A1_policy_status 200 OSC ricsim_g1_1 1 4000 controller_api_get_A1_policy_status 200 STD ricsim_g2_1 5000 - VAL='NOT IN EFFECT' + if [[ $TEST_ENV_PROFILE =~ ^ORAN-[A-I]$ || $TEST_ENV_PROFILE =~ ^ONAP-[A-M]$ ]]; then + VAL='NOT IN EFFECT' + VAL2="false" + else + VAL='NOT_ENFORCED' + VAL2="OTHER_REASON" + fi controller_api_get_A1_policy_status 200 OSC ricsim_g1_1 1 4000 "$VAL" "false" controller_api_get_A1_policy_status 200 STD ricsim_g2_1 5000 "UNDEFINED" diff --git a/test/common/sdnc_api_functions.sh b/test/common/sdnc_api_functions.sh index 4fd9de4a..eb80d400 100644 --- a/test/common/sdnc_api_functions.sh +++ b/test/common/sdnc_api_functions.sh @@ -588,8 +588,14 @@ controller_api_get_A1_policy_status() { if [ $# -ge 5 ] && [ $2 == "OSC" ]; then url="$ric_id/a1-p/policytypes/$4/policies/$UUID$5/status" if [ $# -gt 5 ]; then - targetJson="{\"enforceStatus\":\"$6\"" - targetJson=$targetJson",\"enforceReason\":\"$7\"}" + if [[ $TEST_ENV_PROFILE =~ ^ORAN-[A-I] ]] || [[ $TEST_ENV_PROFILE =~ ^ONAP-[A-M] ]]; then + targetJson="{\"instance_status\":\"$6\"" + targetJson=$targetJson",\"has_been_deleted\":\"$7\"" + targetJson=$targetJson",\"created_at\":\"????\"}" + else + targetJson="{\"enforceStatus\":\"$6\"" + targetJson=$targetJson",\"enforceReason\":\"$7\"}" + fi fi paramError=0 elif [ $# -ge 4 ] && [ $2 == "STD" ]; then