TC_ONELINE_DESCR="Testing southbound proxy for PMS and ECS"
#App names to include in the test when running docker, space separated list
-DOCKER_INCLUDED_IMAGES="CBS CONSUL CP CR MR PA RICSIM ECS PRODSTUB HTTPPROXY NGW"
+DOCKER_INCLUDED_IMAGES="CBS CONSUL CP CR MR PA RICSIM ECS PRODSTUB HTTPPROXY NGW KUBEPROXY"
#App names to include in the test when running kubernetes, space separated list
KUBE_INCLUDED_IMAGES=" MR CR PA PRODSTUB RICSIM CP ECS HTTPPROXY KUBEPROXY NGW"
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"
use_prod_stub_https
if [ "$PMS_VERSION" == "V2" ]; then
- notificationurl=$CR_SERVICE_PATH"/test"
+ notificationurl=$CR_SERVICE_APP_PATH"/test"
else
echo "PMS VERSION 2 (V2) is required"
exit 1
clean_environment
-if [ $RUNMODE == "KUBE" ]; then
- start_kube_proxy
-fi
+start_kube_proxy
STD_NUM_RICS=2
#Check the number of types
api_equal json:policy-types 2 300
-api_put_service 201 "Emergency-response-app" 0 "$CR_SERVICE_PATH/1"
+api_put_service 201 "Emergency-response-app" 0 "$CR_SERVICE_APP_PATH/1"
# Create policies in STD
for ((i=1; i<=$STD_NUM_RICS; i++))
TARGET1="$RIC_SIM_HTTPX://$RIC_G1_1:$RIC_SIM_PORT/datadelivery"
TARGET2="$RIC_SIM_HTTPX://$RIC_G1_1:$RIC_SIM_PORT/datadelivery"
-STATUS1="$CR_SERVICE_PATH/job1-status"
-STATUS2="$CR_SERVICE_PATH/job2-status"
+STATUS1="$CR_SERVICE_APP_PATH/job1-status"
+STATUS2="$CR_SERVICE_APP_PATH/job2-status"
prodstub_arm_producer 200 prod-a
prodstub_arm_type 200 prod-a type1
### ecs status
ecs_api_service_status 200
+if [[ "$ECS_FEATURE_LEVEL" == *"TYPE-SUBSCRIPTIONS"* ]]; then
+ #Type registration status callbacks
+ TYPESTATUS1="$CR_SERVICE_APP_PATH/type-status1"
+
+ ecs_api_idc_put_subscription 201 subscription-id-1 owner1 $TYPESTATUS1
+
+ ecs_api_idc_get_subscription_ids 200 owner1 subscription-id-1
+fi
+
## Setup prod-a
if [ $ECS_VERSION == "V1-1" ]; then
ecs_api_edp_put_producer 201 prod-a $CB_JOB/prod-a $CB_SV/prod-a type1 testdata/ecs/ei-type-1.json
ecs_equal json:ei-producer/v1/eiproducers 0 1000
fi
+if [[ "$ECS_FEATURE_LEVEL" == *"TYPE-SUBSCRIPTIONS"* ]]; then
+ cr_equal received_callbacks 3 30
+ cr_api_check_all_ecs_subscription_events 200 type-status1 type1 testdata/ecs/ei-type-1.json REGISTERED
+ cr_api_check_all_ecs_events 200 job1-status DISABLED
+ cr_api_check_all_ecs_events 200 job2-status DISABLED
+else
+ cr_equal received_callbacks 2 30
+ cr_api_check_all_ecs_events 200 job1-status DISABLED
+ cr_api_check_all_ecs_events 200 job2-status DISABLED
+fi
-echo -e $YELLOW"Verify that ECS has send status notification to the callback recevier"$EYELLOW
-echo -e $YELLOW"and check the source of the call in the log to be from the httpproxy"$EYELLOW
-echo -e $YELLOW"Check for 'Calling host'"$EYELLOW
-echo -e $YELLOW"cmd: docker logs <callback-receiver-container-name>"$EYELLOW
+cr_contains_str remote_hosts $HTTP_PROXY_APP_NAME
check_policy_agent_logs
check_ecs_logs