diff --git a/MEC011/SRV/MLS/Liveness.robot b/MEC011/SRV/MLS/Liveness.robot index 7dbf1ad70fc2a74423925ef9bb0879de0f4de82c..6f3906fd9b454d43fef359b608e8e66c5d9825bd 100644 --- a/MEC011/SRV/MLS/Liveness.robot +++ b/MEC011/SRV/MLS/Liveness.robot @@ -4,7 +4,7 @@ Documentation ... A test suite for validating MEC Liveness Service (MLS) operations. Resource ../../../GenericKeywords.robot -Resource environment/variables.txt +Resource environment/variables_sandbox.txt Library REST ${SCHEMA}://${HOST}:${PORT} ssl_verify=false Library OperatingSystem @@ -34,7 +34,7 @@ TC_MEC_MEC011_SRV_MSL_001_NF ... "ETSI GS MEC 011 3.2.1, clause 8.1.2.4", ... "ETSI GS MEC 011 3.2.1, clause 8.2.10.3.1" [Tags] PIC_MEC_PLAT PIC_SERVICES - Individual MEC service liveness ${NOT_EXISING_URL_SERVICE_MEC_LIVENESS} + Individual MEC service liveness ${NOT_EXISTING_URL_SERVICE_MEC_LIVENESS} Check HTTP Response Status Code Is 404 @@ -66,7 +66,6 @@ TC_MEC_MEC011_SRV_MSL_002_OK_02 ... "ETSI GS MEC 011 3.2.1, clause 8.2.10.3.3" [Tags] PIC_MEC_PLAT PIC_SERVICES Set Headers {"Authorization":"${TOKEN}"} - ${file}= Catenate SEPARATOR= jsons/ ServiceLivenessUpdate .json ${body}= Get File ${file} Update MEC service liveness ${URL_SERVICE_MEC_LIVENESS} ${body} @@ -77,8 +76,8 @@ TC_MEC_MEC011_SRV_MSL_002_BR [Documentation] ... Check that the IUT responds with an error when ... incorrect parameters were sent by a MEC Application - ... Reference "ETSI GS MEC 011 3.2.1, clause 8.1.2.5", - ... "ETSI GS MEC 011 3.2.1, clause 8.2.10.3.3", + ... Reference "ETSI GS MEC 011 3.2.1, clause 5.2.12", + ... "ETSI GS MEC 011 3.2.1, clause 8.1.2.5", ... "ETSI GS MEC 011 3.2.1, clause 8.2.10.3.3" [Tags] PIC_MEC_PLAT PIC_SERVICES Set Headers {"Authorization":"${TOKEN}"} @@ -89,6 +88,21 @@ TC_MEC_MEC011_SRV_MSL_002_BR Check HTTP Response Status Code Is 400 +TC_MEC_MEC011_SRV_MSL_002_NF + [Documentation] + ... Check that the IUT responds with an error when + ... a request for an URI that cannot be mapped to a valid + ... resource URI is sent by a MEC Application + ... Reference "ETSI GS MEC 011 3.2.1, clause 5.2.12", + ... "ETSI GS MEC 011 3.2.1, clause 8.1.2.5", + ... "ETSI GS MEC 011 3.2.1, clause 8.2.10.3.3" + [Tags] PIC_MEC_PLAT PIC_SERVICES + Set Headers {"Authorization":"${TOKEN}"} + ${file}= Catenate SEPARATOR= jsons/ ServiceLivenessUpdateError .json + ${body}= Get File ${file} + Update MEC service liveness ${NOT_EXISTING_URL_SERVICE_MEC_LIVENESS} ${body} + Check HTTP Response Status Code Is 404 + *** Keywords *** Create new service [Arguments] ${content} ${appInstanceId} @@ -98,7 +112,8 @@ Create new service Set Headers {"Authorization":"${TOKEN}"} ${file}= Catenate SEPARATOR= jsons/ ${content} .json ${body}= Get File ${file} - POST http://${HOST_APP_SAQ}:${PORT_APP_SAQ}/${apiRoot_APP_SAQ}${apiName_APP_SAQ}/${apiVersion_APP_SAQ}/applications/${appInstanceId}/services ${body} + POST ${SCHEMA_APP_SAQ}://${HOST_APP_SAQ}:${PORT_APP_SAQ}/${apiRoot_APP_SAQ}${apiName_APP_SAQ}/${apiVersion_APP_SAQ}/applications/${appInstanceId}/services ${body} + Log ${SCHEMA_APP_SAQ}://${HOST_APP_SAQ}:${PORT_APP_SAQ}/${apiRoot_APP_SAQ}${apiName_APP_SAQ}/${apiVersion_APP_SAQ}/applications/${appInstanceId}/services ${output}= Output response Set Suite Variable ${response} ${output} Set Suite Variable ${LIVENESS_URI} ${response['body']['_links']['liveness']['href']} @@ -111,7 +126,7 @@ Remove individual service Set Headers {"Accept":"application/json"} Set Headers {"Authorization":"${TOKEN}"} Set Headers {"Content-Type":"*/*"} - DELETE http://${HOST_APP_SAQ}:${PORT_APP_SAQ}/${apiRoot_APP_SAQ}${apiName_APP_SAQ}/${apiVersion_APP_SAQ}/applications/${appInstanceId}/services/${serviceName} + DELETE ${SCHEMA_APP_SAQ}://${HOST_APP_SAQ}:${PORT_APP_SAQ}/${apiRoot_APP_SAQ}${apiName_APP_SAQ}/${apiVersion_APP_SAQ}/applications/${appInstanceId}/services/${serviceName} ${output}= Output response Set Suite Variable ${response} ${output} diff --git a/MEC011/SRV/MLS/environment/variables.txt b/MEC011/SRV/MLS/environment/variables.txt index c421169fe919e840c9c3f0300efe89e5b3caccfe..53aa16a48af4641ff7e5a1e8d435be149bcfce1e 100644 --- a/MEC011/SRV/MLS/environment/variables.txt +++ b/MEC011/SRV/MLS/environment/variables.txt @@ -9,10 +9,11 @@ ${apiRoot} # Specific variables ${URL_SERVICE_MEC_LIVENESS} /link/to/individual/mecServiceLiveness -${NOT_EXISING_URL_SERVICE_MEC_LIVENESS} /not_existing_link/to/individual/mecServiceLiveness +${NOT_EXISTING_URL_SERVICE_MEC_LIVENESS} /not_existing_link/to/individual/mecServiceLiveness #Variables for test setups and teardowns +${SCHEMA_APP_SAQ} http ${HOST_APP_SAQ} 127.0.0.1 ${PORT_APP_SAQ} 8082 ${apiRoot_APP_SAQ} diff --git a/MEC011/SRV/MLS/environment/variables_sandbox.txt b/MEC011/SRV/MLS/environment/variables_sandbox.txt new file mode 100644 index 0000000000000000000000000000000000000000..0c4a2a2b1495fd2e36218fe0e9c466dd1bd78c10 --- /dev/null +++ b/MEC011/SRV/MLS/environment/variables_sandbox.txt @@ -0,0 +1,35 @@ +*** 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 +${APP_INSTANCE_ID} b8ae165a-a1e3-4d6c-86d9-52c59ad314b6 + +${SCHEMA_APP_SAQ} https +${HOST_APP_SAQ} try-mec.etsi.org +${PORT_APP_SAQ} 443 +${apiRoot_APP_SAQ} sbxjbxjt4s/mep1/ +${apiName_APP_SAQ} mec_service_mgmt +${apiVersion_APP_SAQ} v1 +${APP_INSTANCE_ID} appInstanceId +${SERVICE_NAME} + +#### + +# Specific variables +${URL_SERVICE_MEC_LIVENESS} /link/to/individual/mecServiceLiveness +${NOT_EXISTING_URL_SERVICE_MEC_LIVENESS} /not_existing_link/to/individual/mecServiceLiveness + + +#Variables for test setups and teardowns +#${HOST_APP_SAQ} 127.0.0.1 +#${PORT_APP_SAQ} 8082 +#${apiRoot_APP_SAQ} +#${apiName_APP_SAQ} mec_service_mgmt +#${apiVersion_APP_SAQ} v1 +#${APP_INSTANCE_ID} appInstanceId +#${SERVICE_NAME} diff --git a/MEC011/SRV/MLS/jsons/ServiceInfo.json b/MEC011/SRV/MLS/jsons/ServiceInfo.json index 1cc5adf0fdf9a457da473ac49f1422925478a5c0..135d02e1363315076733256a4e143affdece0f2c 100644 --- a/MEC011/SRV/MLS/jsons/ServiceInfo.json +++ b/MEC011/SRV/MLS/jsons/ServiceInfo.json @@ -3,6 +3,6 @@ "version": "0.1", "state": "INACTIVE", "serializer": "XML", - "serInstanceId": "3F897E85-ABCD-FFFF-A957-FCF0CCE649FD", - "transportId": "transportId" + "transportId": "transportId", + "livenessInterval":10 } \ No newline at end of file