Commit b684e8ae authored by Elian Kraja's avatar Elian Kraja

Added PKG (mm1 and mm3), LCM and generic errors

parent 9614fd21
......@@ -45,4 +45,10 @@ Check HTTP Response Header Contains
Check HTTP Response Body is Empty
Should Be Empty ${response['body']}
Log Body is empty
\ No newline at end of file
Log Body is empty
Check HTTP Response Contain Header with value
[Arguments] ${HEADER_TOCHECK} ${VALUE}
Check HTTP Response Header Contains ${HEADER_TOCHECK}
Should Be Equal As Strings ${value} ${response['headers']['Content-Type']}
\ No newline at end of file
......@@ -5,9 +5,7 @@
Resource environment/variables.txt
Resource ../../GenericKeywords.robot
Library REST ${MEO_SCHEMA}://${MEO_HOST}:${MEO_PORT} ssl_verify=false
Library BuiltIn
Library OperatingSystem
Library MockServerLibrary
......@@ -91,9 +89,9 @@ Create a GRANT request
Set Headers {"Accept":"application/json"}
Set Headers {"Content-Type":"application/json"}
Set Headers {"Authorization":"${TOKEN}"}
${file}= Catenate SEPARATOR= json/ ${content} .json
${file}= Catenate SEPARATOR= jsons/ ${content} .json
${body}= Get File ${file}
Post ${apiRoot}/${apiName}/${apiVersion}/grants ${body}
Post ${apiRoot}/${apiName}/${apiVersion}/grants ${body} allow_redirects=false
${output}= Output response
Set Suite Variable ${response} ${output}
......@@ -103,7 +101,7 @@ Get an individual grant
Set Headers {"Accept":"application/json"}
Set Headers {"Content-Type":"application/json"}
Set Headers {"Authorization":"${TOKEN}"}
Get ${apiRoot}/${apiName}/${apiVersion}/grants/${grantId}
Get ${apiRoot}/${apiName}/${apiVersion}/grants/${grantId} allow_redirects=false
${output}= Output response
Set Suite Variable ${response} ${output}
......
This diff is collapsed.
*** Variables ***
# Generic variables
${MEO_SCHEMA} http
${MEO_HOST} 10.192.2.172
${MEO_PORT} 8081
${response} {}
${TOKEN} Basic YWxhZGRpbjpvcGVuc2VzYW1l
${apiRoot}
${apiName} apmi
${apiVersion} v1
# Specific variables
${APP_PKG_NAME} APP_PKG_NAME // Should be the same as in AppPkg.json
${APP_PKG_VERSION} APP_PKG_VERSION // Should be the same as in AppPkg.json
${CHECKSUM} CHECKSUM // Should be the same as in AppPkg.json
${OPERATIONAL_STATE} OPERATIONAL_STATE // Should be the same as in AppPkg.json
${USAGE_STATE} USAGE_STATE // Should be the same as in AppPkg.json
${ON_BOARDED_APP_PKG_ID} 5abe4782-2c70-4e47-9a4e-0ee3a1a0fd1f
${APPD_ID} e0deee2b-6e50-4f33-ab09-8bf0585025d3
${MALFORMED_FILTER_NAME} operationalStatus // Should be operationalState
${FILTER_VALUE} NOT_IN_USE
${NON_EXISTENT_APP_PKG_ID} NON_EXISTENT_APP_PKG_ID
${OPERATION_VALUE} DISABLE
${ACCEPTED_CONTENT_TYPE} text/plain // Should refer to the type of AppD
${SUBSCRIPTION_ID} e0deee2b-6e50-4f33-ab09-8bf0585025d3
${SUBSCRIPTION_TYPE} MobilityProcedureSubscription
${NON_EXISTENT_SUBSCRIPTION_ID} NON_EXISTENT_SUBSCRIPTION_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
\ No newline at end of file
{}
\ No newline at end of file
This diff is collapsed.
*** Variables ***
# Generic variables
${MEPM_SCHEMA} http
${MEPM_HOST} 10.192.2.172
${MEPM_PORT} 8081
${response} {}
${TOKEN} Basic YWxhZGRpbjpvcGVuc2VzYW1l
${apiRoot}
${apiName} apmi
${apiVersion} v1
# Specific variables
${APP_PKG_NAME} APP_PKG_NAME // Should be the same as in AppPkg.json
${APP_PKG_VERSION} APP_PKG_VERSION // Should be the same as in AppPkg.json
${CHECKSUM} CHECKSUM // Should be the same as in AppPkg.json
${OPERATIONAL_STATE} OPERATIONAL_STATE // Should be the same as in AppPkg.json
${USAGE_STATE} USAGE_STATE // Should be the same as in AppPkg.json
${ON_BOARDED_APP_PKG_ID} 5abe4782-2c70-4e47-9a4e-0ee3a1a0fd1f
${APPD_ID} e0deee2b-6e50-4f33-ab09-8bf0585025d3
${MALFORMED_FILTER_NAME} operationalStatus // Should be operationalState
${FILTER_VALUE} NOT_IN_USE
${NON_EXISTENT_APP_PKG_ID} NON_EXISTENT_APP_PKG_ID
${OPERATION_VALUE} DISABLE
${ACCEPTED_CONTENT_TYPE} text/plain // Should refer to the type of AppD
${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
{}
\ No newline at end of file
*** Settings ***
Resource environment/variables.txt
Resource ../../GenericKeywords.robot
Library REST ${PROVIDER_SCHEMA}://${PROVIDER_HOST}:${PROVIDER_PORT} ssl_verify=false
Library BuiltIn
Library OperatingSystem
*** Test Cases ***
Request access to a generic resource not using token
[Documentation] TP_MEC_MEX_ANY_001_NT
... Check that a MEC API provider responds with an error when it
... receives a request without token
... ETSI GS MEC 009 1.1.1, clause 6.16.1
[Tags] GENERIC_TESTS INCLUDE_UNDEFINED_SCHEMAS
Set Headers {"Accept":"application/json"}
Set Headers {"Content-Type":"application/json"}
Get ${apiRoot}/${apiName}/${apiVersion}/app_packages
${output}= Output response
Should Be Equal As Strings 401 ${output['status']}
Request access to a generic resource using an invalid token
[Documentation] TP_MEC_MEX_ANY_001_WT
... Check that a MEC API provider responds with an error
... when it receives a request with a wrong token
... ETSI GS MEC 009 1.1.1, clause 6.16.1
[Tags] GENERIC_TESTS INCLUDE_UNDEFINED_SCHEMAS
Set Headers {"Accept":"application/json"}
Set Headers {"Content-Type":"application/json"}
Set Headers {"Authorization":"${INVALID_TOKEN}"}
Get ${apiRoot}/${apiName}/${apiVersion}/app_packages
${output}= Output response
Should Be Equal As Strings 401 ${output['status']}
*** Variables ***
# Generic variables
${PROVIDER_SCHEMA} http
${PROVIDER_HOST} 10.192.2.172
${PROVIDER_PORT} 8081
${response} {}
${TOKEN} Basic YWxhZGRpbjpvcGVuc2VzYW1l
${apiRoot}
${apiName} apmi
${apiVersion} v1
${INVALID_TOKEN} INVALID_TOKEN
\ No newline at end of file
{}
\ No newline at end of file
This diff is collapsed.
*** Variables ***
# Generic variables
${MEX_SCHEMA} http
${MEX_HOST} 10.192.2.172
${MEX_PORT} 8081
${response} {}
${TOKEN} Basic YWxhZGRpbjpvcGVuc2VzYW1l
${apiRoot}
${apiName} alcmi
${apiVersion} v1
# Specific variables
${APPD_ID} e0deee2b-6e50-4f33-ab09-8bf0585025d3
${INSTANTIATION_STATE} NOT_INSTANTIATED
${APP_INSTANCE_ID} 5abe4782-2c70-4e47-9a4e-0ee3a1a0fd1f
${NON_EXISTENT_APP_INSTANCE_ID} NON_EXISTENT_APP_INSTANCE_ID
${APP_LCM_OP_OCC_ID} 65c4d1ff-f63b-46ef-bfe3-a6b330b60180
${NON_EXISTANT_APP_LCM_OP_OCC_ID} NON_EXISTANT_APP_LCM_OP_OCC_ID
${APP_PKG_NAME} APP_PKG_NAME // Should be the same as in AppPkg.json
${APP_PKG_VERSION} APP_PKG_VERSION // Should be the same as in AppPkg.json
${CHECKSUM} CHECKSUM // Should be the same as in AppPkg.json
${OPERATIONAL_STATE} OPERATIONAL_STATE // Should be the same as in AppPkg.json
${USAGE_STATE} USAGE_STATE // Should be the same as in AppPkg.json
${ON_BOARDED_APP_PKG_ID} 5abe4782-2c70-4e47-9a4e-0ee3a1a0fd1f
${MALFORMED_FILTER_NAME} operationalStatus // Should be operationalState
${FILTER_VALUE} NOT_IN_USE
${NON_EXISTENT_APP_PKG_ID} NON_EXISTENT_APP_PKG_ID
${OPERATION_VALUE} DISABLE
${ACCEPTED_CONTENT_TYPE} text/plain // Should refer to the type of AppD
${SUBSCRIPTION_ID} e0deee2b-6e50-4f33-ab09-8bf0585025d3
${SUBSCRIPTION_TYPE} MobilityProcedureSubscription
${NON_EXISTENT_SUBSCRIPTION_ID} NON_EXISTENT_SUBSCRIPTION_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
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment