Test FTC100 fails since A1-SIM update 30/12930/1 master
authorraviteja.karumuri <raviteja.karumuri@est.tech>
Mon, 27 May 2024 09:58:44 +0000 (10:58 +0100)
committerraviteja.karumuri <raviteja.karumuri@est.tech>
Mon, 27 May 2024 14:57:34 +0000 (15:57 +0100)
Issue-ID: NONRTRIC-1002
Change-Id: I40245a273b4af57599c91899166ea092b3ec4330
Signed-off-by: Raviteja Karumuri <raviteja.karumuri@est.tech>
test/auto-test/FTC100.sh
test/auto-test/FTC150.sh
test/auto-test/FTC2002.sh
test/auto-test/ONAP_UC.sh
test/auto-test/verify-jobs-nonrtric.sh
test/common/a1pms_api_functions.sh
test/common/sdnc_api_functions.sh

index a473338..04ff8d2 100755 (executable)
@@ -492,10 +492,20 @@ for __httpx in $TESTED_PROTOCOLS ; do
 
         a1pms_api_get_policy_status 404 1
         a1pms_api_get_policy_status 404 2
 
         a1pms_api_get_policy_status 404 1
         a1pms_api_get_policy_status 404 2
-        VAL='NOT IN EFFECT'
-        a1pms_api_get_policy_status 200 5000 OSC "$VAL" "false"
+        if [[ $TEST_ENV_PROFILE =~ ^ORAN-[A-H] ]] || [[ $TEST_ENV_PROFILE =~ ^ONAP-[A-L] ]]; then
+          VAL='NOT IN EFFECT'
+          VAL2="false"
+          VAL3=EMPTY
+          VAL4=EMPTY
+        else
+          VAL="NOT_ENFORCED"
+          VAL2="OTHER_REASON"
+          VAL3="NOT_ENFORCED"
+          VAL4="OTHER_REASON"
+        fi
+        a1pms_api_get_policy_status 200 5000 OSC "$VAL" "$VAL2"
         a1pms_api_get_policy_status 200 5100 STD "UNDEFINED"
         a1pms_api_get_policy_status 200 5100 STD "UNDEFINED"
-        a1pms_api_get_policy_status 200 5200 STD2 EMPTY EMPTY
+        a1pms_api_get_policy_status 200 5200 STD2 $VAL3 $VAL4
 
 
         deviation "TR10 - a1pms allows policy creation on unregistered service (side effect of orig. problem)- test combo $interface and $__httpx"
 
 
         deviation "TR10 - a1pms allows policy creation on unregistered service (side effect of orig. problem)- test combo $interface and $__httpx"
index 2ce0750..103d74c 100755 (executable)
@@ -128,7 +128,7 @@ 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
 
         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
-        if [[ $TEST_ENV_PROFILE =~ ^ORAN-[A-I] ]] || [[ $TEST_ENV_PROFILE =~ ^ONAP-[A-M] ]]; then
+        if [[ $TEST_ENV_PROFILE =~ ^ORAN-[A-H] ]] || [[ $TEST_ENV_PROFILE =~ ^ONAP-[A-L] ]]; then
           VAL='NOT IN EFFECT'
           VAL2="false"
         else
           VAL='NOT IN EFFECT'
           VAL2="false"
         else
index e34b56c..c8d3f6e 100755 (executable)
@@ -143,7 +143,7 @@ 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
 
         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
 
-        if [[ $TEST_ENV_PROFILE =~ ^ORAN-[A-I]$  || $TEST_ENV_PROFILE =~ ^ONAP-[A-M]$ ]]; then
+        if [[ $TEST_ENV_PROFILE =~ ^ORAN-[A-H]$  || $TEST_ENV_PROFILE =~ ^ONAP-[A-L]$ ]]; then
             VAL='NOT IN EFFECT'
             VAL2="false"
         else
             VAL='NOT IN EFFECT'
             VAL2="false"
         else
index 6c699d1..3dc724d 100755 (executable)
@@ -283,11 +283,17 @@ for interface in $TESTED_VARIANTS ; do
     done
 
     # Check status OSC
     done
 
     # Check status OSC
-    VAL='NOT IN EFFECT'
+    if [[ $TEST_ENV_PROFILE =~ ^ORAN-[A-H] ]] || [[ $TEST_ENV_PROFILE =~ ^ONAP-[A-L] ]]; then
+      VAL='NOT IN EFFECT'
+      VAL2="false"
+    else
+      VAL='NOT_ENFORCED'
+      VAL2="OTHER_REASON"
+    fi
     for ((i=1; i<=$OSC_NUM_RICS; i++))
     do
     for ((i=1; i<=$OSC_NUM_RICS; i++))
     do
-        a1pms_api_get_policy_status 200 $((3000+$i)) OSC "$VAL" "false"
-        a1pms_api_get_policy_status 200 $((4000+$i)) OSC "$VAL" "false"
+        a1pms_api_get_policy_status 200 $((3000+$i)) OSC "$VAL" "$VAL2"
+        a1pms_api_get_policy_status 200 $((4000+$i)) OSC "$VAL" "$VAL2"
     done
 
     # Note: Status callback is not tested since this callback (http POST) is made from the
     done
 
     # Note: Status callback is not tested since this callback (http POST) is made from the
index 625eff4..e93e1a7 100644 (file)
 TEST_DIRECTORY="test/auto-test"
 TEST_SCRIPT="./Suite-Verify-jobs.sh"
 DOCKER_COMPOSE_VERSION="v2.21.0"
 TEST_DIRECTORY="test/auto-test"
 TEST_SCRIPT="./Suite-Verify-jobs.sh"
 DOCKER_COMPOSE_VERSION="v2.21.0"
+PULL_IMAGE_TYPE="remote-remove"
+RUN_MODE="docker"
+IMAGE_VERSION="release"
+ENV_FLAG="--env-file"
+ENV_FILE="../common/test_env-oran-h-release.sh"
 
 # Check if jq is installed, and install it if not
 if ! command -v jq &> /dev/null; then
 
 # Check if jq is installed, and install it if not
 if ! command -v jq &> /dev/null; then
@@ -50,7 +55,7 @@ fi
 
 cd "$TEST_DIRECTORY"
 sudo chmod 775 "$TEST_SCRIPT"
 
 cd "$TEST_DIRECTORY"
 sudo chmod 775 "$TEST_SCRIPT"
-"$TEST_SCRIPT" remote-remove docker release --env-file ../common/test_env-oran-h-release.sh
+"$TEST_SCRIPT" $PULL_IMAGE_TYPE $RUN_MODE $IMAGE_VERSION $ENV_FLAG $ENV_FILE
 exit_val=$?
 
 # Remove docker-compose after tests are done
 exit_val=$?
 
 # Remove docker-compose after tests are done
index b80bb25..a0062ac 100644 (file)
@@ -1830,11 +1830,18 @@ a1pms_api_get_policy_status() {
                fi
                targetJson=$targetJson"}"
        elif [ "$3" == "OSC" ]; then
                fi
                targetJson=$targetJson"}"
        elif [ "$3" == "OSC" ]; then
-               targetJson="{\"instance_status\":\"$4\""
-               if [ $# -eq 5 ]; then
-                       targetJson=$targetJson",\"has_been_deleted\":\"$5\""
-               fi
-               targetJson=$targetJson",\"created_at\":\"????\"}"
+         if [[ $TEST_ENV_PROFILE =~ ^ORAN-[A-H] ]] || [[ $TEST_ENV_PROFILE =~ ^ONAP-[A-L] ]]; then
+      targetJson="{\"instance_status\":\"$4\""
+      if [ $# -eq 5 ]; then
+        targetJson=$targetJson",\"has_been_deleted\":\"$5\""
+      fi
+      targetJson=$targetJson",\"created_at\":\"????\"}"
+    else
+      targetJson="{\"enforceStatus\":\"$4\""
+      if [ $# -eq 5 ]; then
+        targetJson=$targetJson",\"enforceReason\":\"$5\"}"
+      fi
+    fi
        else
                __print_err "<response-code> (STD <enforce-status> [<reason>])|(OSC <instance-status> <has-been-deleted>)" $@
                return 1
        else
                __print_err "<response-code> (STD <enforce-status> [<reason>])|(OSC <instance-status> <has-been-deleted>)" $@
                return 1
index eb80d40..a18afe3 100644 (file)
@@ -588,7 +588,7 @@ 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
     if [ $# -ge 5 ] && [ $2 == "OSC" ]; then
         url="$ric_id/a1-p/policytypes/$4/policies/$UUID$5/status"
         if [ $# -gt 5 ]; then
-            if [[ $TEST_ENV_PROFILE =~ ^ORAN-[A-I] ]] || [[ $TEST_ENV_PROFILE =~ ^ONAP-[A-M] ]]; then
+            if [[ $TEST_ENV_PROFILE =~ ^ORAN-[A-H] ]] || [[ $TEST_ENV_PROFILE =~ ^ONAP-[A-L] ]]; then
               targetJson="{\"instance_status\":\"$6\""
               targetJson=$targetJson",\"has_been_deleted\":\"$7\""
               targetJson=$targetJson",\"created_at\":\"????\"}"
               targetJson="{\"instance_status\":\"$6\""
               targetJson=$targetJson",\"has_been_deleted\":\"$7\""
               targetJson=$targetJson",\"created_at\":\"????\"}"