From 63bee5d5dfcd3667bd57b9c1e1284b930beecc53 Mon Sep 17 00:00:00 2001 From: piscione Date: Tue, 12 Mar 2024 14:38:10 +0100 Subject: [PATCH] Review of APPSUB TCs of MEC011v3.2.1 --- MEC011/SRV/APPSUB/PlatAppSubscriptions.robot | 19 +++++---- MEC011/SRV/APPSUB/environment/variables.txt | 5 ++- .../APPSUB/environment/variables_sandbox.txt | 40 +++++++++++++++++++ ...ppTerminationNotificationSubscription.json | 2 +- 4 files changed, 56 insertions(+), 10 deletions(-) create mode 100644 MEC011/SRV/APPSUB/environment/variables_sandbox.txt diff --git a/MEC011/SRV/APPSUB/PlatAppSubscriptions.robot b/MEC011/SRV/APPSUB/PlatAppSubscriptions.robot index 4a2edb7..80e7e90 100644 --- a/MEC011/SRV/APPSUB/PlatAppSubscriptions.robot +++ b/MEC011/SRV/APPSUB/PlatAppSubscriptions.robot @@ -4,7 +4,7 @@ Documentation ... A test suite for validating Application Subscriptions (APPSUB) operations. Resource ../../../GenericKeywords.robot -Resource environment/variables.txt +Resource environment/variables_sandbox.txt Library REST ${SCHEMA}://${HOST}:${PORT} ssl_verify=false Library OperatingSystem Library String @@ -23,7 +23,7 @@ TC_MEC_MEC011_SRV_APPSUB_001_OK [Tags] PIC_MEC_PLAT PIC_SERVICES [Setup] Create new subscription ${APP_INSTANCE_ID} AppTerminationNotificationSubscription ${elements} = Split String ${response['body']['_links']['self']['href']} / - Set Suite Variable ${SUB_ID} ${elements[3]} + Set Suite Variable ${SUB_ID} ${elements[-1]} Get Subscriptions list ${APP_INSTANCE_ID} Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is SubscriptionsLinkList @@ -38,7 +38,7 @@ TC_MEC_MEC011_SRV_APPSUB_001_NF ... Reference "ETSI GS MEC 011 3.2.1, clause 5.2.6", ... "ETSI GS MEC 011 3.2.1, clause 7.2.3.3.1" [Tags] PIC_MEC_PLAT PIC_SERVICES - [TearDown] Remove subscription ${NON_EXISTENT_APP_INSTANCE_ID} ${SUB_ID} + [Setup] Remove subscription ${NON_EXISTENT_APP_INSTANCE_ID} ${SUB_ID} Get Subscriptions list ${NON_EXISTENT_APP_INSTANCE_ID} Check HTTP Response Status Code Is 404 @@ -51,15 +51,16 @@ TC_MEC_MEC011_SRV_APPSUB_002_OK ... Reference "ETSI GS MEC 011 3.2.1, clause 5.2.6", ... "ETSI GS MEC 011 3.2.1, clause 7.2.3.3.4" [Tags] PIC_MEC_PLAT PIC_SERVICES + Create new subscription ${APP_INSTANCE_ID} AppTerminationNotificationSubscription + ${CALLBACK_REF} Get value entry from JSON file AppTerminationNotificationSubscription callbackReference ${elements} = Split String ${response['body']['_links']['self']['href']} / - Set Suite Variable ${SUB_ID} ${elements[3]} - + Set Suite Variable ${SUB_ID} ${elements[-1]} Check HTTP Response Status Code Is 201 Check HTTP Response Body Json Schema Is AppTerminationNotificationSubscription Check HTTP Response Header Contains Location Check Response Contains ${response['body']} subscriptionType AppTerminationNotificationSubscription - Check Response Contains ${response['body']} callbackReference ${APP_TERM_NOTIF_CALLBACK_URI} + Check Response Contains ${response['body']} callbackReference ${CALLBACK_REF} [TearDown] Remove subscription ${APP_INSTANCE_ID} ${SUB_ID} @@ -85,7 +86,7 @@ TC_MEC_MEC011_SRV_APPSUB_003_OK [Tags] PIC_MEC_PLAT PIC_SERVICES [Setup] Create new subscription ${APP_INSTANCE_ID} AppTerminationNotificationSubscription ${elements} = Split String ${response['body']['_links']['self']['href']} / - Set Suite Variable ${SUB_ID} ${elements[3]} + Set Suite Variable ${SUB_ID} ${elements[-1]} Get individual subscription ${APP_INSTANCE_ID} ${SUB_ID} Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is AppTerminationNotificationSubscription @@ -114,7 +115,9 @@ TC_MEC_MEC011_SRV_APPSUB_004_OK ... "ETSI GS MEC 011 3.2.1, clause 7.2.4.3.5" [Tags] PIC_MEC_PLAT PIC_SERVICES [Setup] Create new subscription ${APP_INSTANCE_ID} AppTerminationNotificationSubscription - Remove subscription ${APP_INSTANCE_ID} ${SUBSCRIPTION_ID} + ${elements} = Split String ${response['body']['_links']['self']['href']} / + Set Suite Variable ${SUB_ID} ${elements[-1]} + Remove subscription ${APP_INSTANCE_ID} ${SUB_ID} Check HTTP Response Status Code Is 204 diff --git a/MEC011/SRV/APPSUB/environment/variables.txt b/MEC011/SRV/APPSUB/environment/variables.txt index aa73f74..f983b98 100644 --- a/MEC011/SRV/APPSUB/environment/variables.txt +++ b/MEC011/SRV/APPSUB/environment/variables.txt @@ -10,7 +10,10 @@ ${apiName} mec_app_support ${apiVersion} v1 # Specific variables -${APP_INSTANCE_ID} 5abe4782-2c70-4e47-9a4e-0ee3a1a0fd1f + +# Specific variables +#${APP_INSTANCE_ID} 5abe4782-2c70-4e47-9a4e-0ee3a1a0fd1f +${APP_INSTANCE_ID} f1e4d448-e277-496b-bf63-98391cfd20fb ${NON_EXISTENT_APP_INSTANCE_ID} NON_ESISTENT_APP_INSTANCE_ID diff --git a/MEC011/SRV/APPSUB/environment/variables_sandbox.txt b/MEC011/SRV/APPSUB/environment/variables_sandbox.txt new file mode 100644 index 0000000..3c8c9ab --- /dev/null +++ b/MEC011/SRV/APPSUB/environment/variables_sandbox.txt @@ -0,0 +1,40 @@ +*** Variables *** +####Env variable for the ETSI MEC Sandbox +${SCHEMA} https +${HOST} try-mec.etsi.org +${PORT} 443 +${TOKEN} Basic YWxhZGRpbjpvcGVuc2VzYW1l +${apiRoot} //mep1 +${apiName} mec_app_support +${apiVersion} v1 + + +# Specific variables + +# Specific variables +#${APP_INSTANCE_ID} 5abe4782-2c70-4e47-9a4e-0ee3a1a0fd1f +${APP_INSTANCE_ID} f1e4d448-e277-496b-bf63-98391cfd20fb +${NON_EXISTENT_APP_INSTANCE_ID} NON_ESISTENT_APP_INSTANCE_ID + + +${APP_TERM_NOTIF_CALLBACK_URI} http://127.0.0.1/subscribe + +${SUBSCRIPTION_ID} e0deee2b-6e50-4f33-ab09-8bf0585025d3 +${NON_EXISTENT_SUBSCRIPTION_ID} NON_EXISTENT_SUBSCRIPTION_ID +${SUB_ID} + + +# ${SUBSCRIPTION_TYPE} MobilityProcedureSubscription +# ${SUBSCRIPTION_ID} e0deee2b-6e50-4f33-ab09-8bf0585025d3 +# +# ${NON_EXISTENT_APP_MOBILITY_SERVICE_ID} NON_EXISTENT_APP_MOBILITY_SERVICE_ID + +# # Notifications variables +# ${MOCK_SERVER_JAR} ../../../bin/mockserver-netty-5.5.0-jar-with-dependencies.jar + +# ${callback_port} 9091 +# ${callback_uri} http://172.22.1.7:${callback_port} +# ${callback_endpoint} /amsi/subscriptions +# ${callback_endpoint_error} /subs_404 +# ${total_polling_time} 2 min +# ${polling_interval} 10 sec diff --git a/MEC011/SRV/APPSUB/jsons/AppTerminationNotificationSubscription.json b/MEC011/SRV/APPSUB/jsons/AppTerminationNotificationSubscription.json index eb61a28..2975227 100644 --- a/MEC011/SRV/APPSUB/jsons/AppTerminationNotificationSubscription.json +++ b/MEC011/SRV/APPSUB/jsons/AppTerminationNotificationSubscription.json @@ -6,5 +6,5 @@ "href": "https://somewhere.com/mecAppSuptApi/example" } }, - "appInstanceId": "appIntanceId" + "appInstanceId": "f1e4d448-e277-496b-bf63-98391cfd20fb" } \ No newline at end of file -- GitLab