From 416a9bcde31145843dfcc0897beda902b8787e20 Mon Sep 17 00:00:00 2001 From: piscione Date: Wed, 5 Jan 2022 11:20:47 +0100 Subject: [PATCH] Implemented TCs for configure platform for App operation for MEC010p2 V2.2.1 specification. --- MEC010p2/MEPM/LCM/PlatformConfiguration.robot | 59 +++++++++++++++++++ MEC010p2/MEPM/LCM/environment/variables.txt | 44 ++++++++++++++ 2 files changed, 103 insertions(+) create mode 100644 MEC010p2/MEPM/LCM/PlatformConfiguration.robot create mode 100644 MEC010p2/MEPM/LCM/environment/variables.txt diff --git a/MEC010p2/MEPM/LCM/PlatformConfiguration.robot b/MEC010p2/MEPM/LCM/PlatformConfiguration.robot new file mode 100644 index 0000000..422c196 --- /dev/null +++ b/MEC010p2/MEPM/LCM/PlatformConfiguration.robot @@ -0,0 +1,59 @@ +''[Documentation] robot --outputdir ./outputs ./PlatformConfiguration.robot +... Test Suite to validate Platform Configuration operations. + +*** Settings *** +Resource environment/variables.txt +Resource ../../../GenericKeywords.robot +Library REST ${MEPM_SCHEMA}://${MEPM_HOST}:${MEPM_PORT} ssl_verify=false +Library BuiltIn +Library OperatingSystem + + +*** Test Cases *** +TP_MEC_MEC010p2_MEPM_LCM_001_OK + [Documentation] TP_MEC_MEC010p2_MEPM_LCM_001_OK + ... Check that MEC API provider has created the configuration information in AppD to the MEPM-V + ... ETSI GS MEC 010-2 2.2.1, clause 7.7.6.3.1 + ... ETSI GS MEC 010-2 2.2.1, Table 6.2.2.21.2-1 #ConfigPlatformForAppRequest + + Request to configure Platform ${APP_INSTANCE_ID} ConfigPlatformForAppRequest + Check HTTP Response Status Code Is 202 + Check Response Header contains Location + + +TP_MEC_MEC010p2_MEPM_LCM_001_BR + [Documentation] TP_MEC_MEC010p2_MEPM_LCM_001_BR + ... Check that MEC API provider sends an error when it receives a malformed request for the configuration information in AppD to the MEPM-V + ... ETSI GS MEC 010-2 2.2.1, clause 7.7.6.3.1 + ... ETSI GS MEC 010-2 2.2.1, Table 6.2.2.21.2-1 #ConfigPlatformForAppRequest + + Request to configure Platform ${APP_INSTANCE_ID} ConfigPlatformForAppRequestBadRequest + Check HTTP Response Status Code Is 400 + + + +TP_MEC_MEC010p2_MEPM_LCM_001_NF + [Documentation] TP_MEC_MEC010p2_MEPM_LCM_001_BR + ... "Check that MEC API provider sends an error when it receives a request + ... for the configuration information in AppD to the MEPM-V with not valid app instance ID + ... ETSI GS MEC 010-2 2.2.1, clause 7.7.6.3.1 + ... ETSI GS MEC 010-2 2.2.1, Table 6.2.2.21.2-1 #ConfigPlatformForAppRequest + + Request to configure Platform ${NOT_EXISTING_APP_INSTANCE_ID} ConfigPlatformForAppRequest + Check HTTP Response Status Code Is 404 + + + +*** Keywords *** +Request to configure Platform + [Argument] ${appInstanceId} ${content} + Log Request to configure platform + Set Headers {"Accept":"application/json"} + Set Headers {"Content-Type":"application/json"} + Set Headers {"Authorization":"${TOKEN}"} + ${file}= Catenate SEPARATOR= jsons/ ${content} .json + ${body}= Get File ${file} + Post ${apiRoot}/${apiName}/${apiVersion}/app_instances/${appInstanceId}/configure_platform_for_app ${body} + ${output}= Output response + Set Suite Variable ${response} ${output} + \ No newline at end of file diff --git a/MEC010p2/MEPM/LCM/environment/variables.txt b/MEC010p2/MEPM/LCM/environment/variables.txt new file mode 100644 index 0000000..4385a0b --- /dev/null +++ b/MEC010p2/MEPM/LCM/environment/variables.txt @@ -0,0 +1,44 @@ +*** Variables *** +# Generic variables +${MEPM_SCHEMA} http +${MEPM_HOST} 127.0.0.1 +${MEPM_PORT} 8081 +${response} {} +${TOKEN} Basic YWxhZGRpbjpvcGVuc2VzYW1l +${apiRoot} +${apiName} apmi +${apiVersion} v1 + +# Specific variables +${APP_PKG_NAME} APP_PKG_NAME +${APP_PKG_VERSION} APP_PKG_VERSION +${CHECKSUM} CHECKSUM +${OPERATIONAL_STATE} OPERATIONAL_STATE +${USAGE_STATE} USAGE_STATE +${ON_BOARDED_APP_PKG_ID} 5abe4782-2c70-4e47-9a4e-0ee3a1a0fd1f +${APPD_ID} e0deee2b-6e50-4f33-ab09-8bf0585025d3 +${MALFORMED_FILTER_NAME} operationalStatus +${FILTER_VALUE} NOT_IN_USE +${NON_EXISTENT_APP_PKG_ID} NON_EXISTENT_APP_PKG_ID +${OPERATION_VALUE} DISABLE + +${ACCEPTED_CONTENT_TYPE} text/plain +${SUBSCRIPTION_ID} e0deee2b-6e50-4f33-ab09-8bf0585025d3 +${NON_EXISTENT_SUBSCRIPTION_ID} NON_EXISTENT_SUBSCRIPTION_ID + + + + +${SUBSCRIPTION_TYPE} MobilityProcedureSubscription + + + +# 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 \ No newline at end of file -- GitLab