Commit 97709b8a authored by Filipe Ferreira's avatar Filipe Ferreira

MEC 011, 013 & 029 behaviour.

parent a69f1e4a
Pipeline #1591 failed with stage
in 0 seconds
*** Settings ***
Library JSONSchemaLibrary schemas/
Library BuiltIn
Library REST ${AMS_SCHEMA}://${AMS_HOST}:${AMS_PORT} ssl_verify=false
Library OperatingSystem
*** Variables ***
${response}
......@@ -51,4 +53,114 @@ 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
vGET
[Arguments] ${uri}
Set Headers {"Accept":"application/json"}
Set Headers {"Content-Type":"application/json"}
Set Headers {"Authorization":"${TOKEN}"}
GET ${uri}
${output}= Output response
Set Suite Variable ${response} ${output}
vPOST
[Arguments] ${uri} ${content}
${file}= Catenate SEPARATOR= json/ ${content} .json
${body}= Get File ${file}
Set Headers {"Accept":"application/json"}
Set Headers {"Content-Type":"application/json"}
Set Headers {"Authorization":"${TOKEN}"}
POST ${uri} ${body}
${output}= Output response
Set Suite Variable ${response} ${output}
vPUT
[Arguments] ${uri} ${content}
${file}= Catenate SEPARATOR= json/ ${content} .json
${body}= Get File ${file}
# Retrieve the e-tag value to ensure a proper update.
vGET ${uri}
Set Headers {"If-Match":"${response['headers']['If-Match']}"}
Set Headers {"Accept":"application/json"}
Set Headers {"Content-Type":"application/json"}
Set Headers {"Authorization":"${TOKEN}"}
PUT ${uri} ${body}
${output}= Output response
Set Suite Variable ${response} ${output}
vPUT without e-tag
[Arguments] ${uri} ${content}
${file}= Catenate SEPARATOR= json/ ${content} .json
${body}= Get File ${file}
Set Headers {"Accept":"application/json"}
Set Headers {"Content-Type":"application/json"}
Set Headers {"Authorization":"${TOKEN}"}
PUT ${uri} ${body}
${output}= Output response
Set Suite Variable ${response} ${output}
vPUT invalid e-tag
[Arguments] ${uri} ${content}
${file}= Catenate SEPARATOR= json/ ${content} .json
${body}= Get File ${file}
Set Headers {"Accept":"application/json"}
Set Headers {"Content-Type":"application/json"}
Set Headers {"Authorization":"${TOKEN}"}
Set Headers {"If-Match":"__some_invalid_value__"}
PUT ${uri} ${body}
${output}= Output response
Set Suite Variable ${response} ${output}
vDELETE
[Arguments] ${uri}
# Retrieve the e-tag value to ensure a proper delete.
vGET ${uri}
Set Headers {"If-Match":"${response['headers']['If-Match']}"}
Set Headers {"Accept":"application/json"}
Set Headers {"Content-Type":"application/json"}
Set Headers {"Authorization":"${TOKEN}"}
DELETE ${uri}
${output}= Output response
Set Suite Variable ${response} ${output}
vDELETE without e-tag
[Arguments] ${uri}
Set Headers {"Accept":"application/json"}
Set Headers {"Content-Type":"application/json"}
Set Headers {"Authorization":"${TOKEN}"}
DELETE ${uri}
${output}= Output response
Set Suite Variable ${response} ${output}
vDELETE invalid e-tag
[Arguments] ${uri}
Set Headers {"Accept":"application/json"}
Set Headers {"Content-Type":"application/json"}
Set Headers {"Authorization":"${TOKEN}"}
Set Headers {"If-Match":"__some_invalid_value__"}
DELETE ${uri}
${output}= Output response
Set Suite Variable ${response} ${output}
This diff is collapsed.
*** Settings ***
Documentation
... A test suite for validating Application Subscriptions (APPSUB) operations.
Resource ../../GenericKeywords.robot
Default Tags TP_MEC_SRV_APPSUB
*** Variables ***
*** Test Cases ***
TP_MEC_SRV_APPSUB_001_OK
[Documentation]
... Check that the IUT responds with a list of subscriptions for notifications
... on services availability when queried by a MEC Application
...
... Reference ETSI GS MEC 011 V2.0.9, clause 7.2.3.3.1
... OpenAPI https://forge.etsi.org/rep/mec/gs011-app-enablement-api/blob/v2.0.9/MecAppSupportApi.yaml#/definitions/MecAppSuptApiSubscriptionLinkList
[Tags] PIC_MEC_PLAT PIC_SERVICES
vGET /${PX_ME_APP_SUPPORT_URI}/${APP_INSTANCE_ID}/subscriptions
Check HTTP Response Status Code Is 200
Check HTTP Response Body Json Schema Is SubscriptionLinkList
TP_MEC_SRV_APPSUB_001_NF
[Documentation]
... Check that the IUT responds with an error when
... a request for an unknown URI is sent by a MEC Application
...
... Reference ETSI GS MEC 011 V2.0.9, clause 7.2.3.3.1
[Tags] PIC_MEC_PLAT PIC_SERVICES
vGET /${PX_ME_APP_SUPPORT_URI}/${NON_EXISTENT_APP_INSTANCE_ID}/subscriptions
Check HTTP Response Status Code Is 404
TP_MEC_SRV_APPSUB_002_OK
[Documentation]
... Check that the IUT acknowledges the subscription by a MEC Application
... to notifications on service availability events
...
... Reference ETSI GS MEC 011 V2.0.9, clause 7.2.3.3.4
... OpenAPI https://forge.etsi.org/rep/mec/gs011-app-enablement-api/blob/v2.0.9/MecAppSupportApi.yaml#/definitions/AppTerminationNotificationSubscription
[Tags] PIC_MEC_PLAT PIC_SERVICES
vPOST /${PX_ME_APP_SUPPORT_URI}/${APP_INSTANCE_ID}/subscriptions ${APP_TERM_NOTIF_SUB}
Check HTTP Response Status Code Is 201
Check HTTP Response Body Json Schema Is AppTerminationNotificationSubscription
Check HTTP Response Header Contains Location
Check Result Contains ${response['body']['AppTerminationNotificationSubscription']} subscriptionType "AppTerminationNotificationSubscription"
Check Result Contains ${response['body']['AppTerminationNotificationSubscription']} callbackReference ${APP_TERM_NOTIF_CALLBACK_URI}
TP_MEC_SRV_APPSUB_003_OK
[Documentation]
... Check that the IUT responds with the information on a specific subscription
... when queried by a MEC Application
...
... Reference ETSI GS MEC 011 V2.0.9, clause 7.2.4.3.1
... OpenAPI https://forge.etsi.org/rep/mec/gs011-app-enablement-api/blob/v2.0.9/MecAppSupportApi.yaml#/definitions/AppTerminationNotificationSubscription
[Tags] PIC_MEC_PLAT PIC_SERVICES
vGET /${PX_ME_APP_SUPPORT_URI}/${APP_INSTANCE_ID}/subscriptions/${SUBSCRIPTION_ID}
Check HTTP Response Status Code Is 200
Check HTTP Response Body Json Schema Is AppTerminationNotificationSubscription
Check Result Contains ${response['body']['AppTerminationNotificationSubscription']} subscriptionType "AppTerminationNotificationSubscription"
TP_MEC_SRV_APPSUB_003_NF
[Documentation]
... Check that the IUT responds with an error when
... a request for an unknown URI is sent by a MEC Application
...
... Reference ETSI GS MEC 011 V2.0.9, clause 7.2.4.3.1
[Tags] PIC_MEC_PLAT PIC_SERVICES
vGET /${PX_ME_APP_SUPPORT_URI}/${APP_INSTANCE_ID}/subscriptions/${NON_EXISTENT_SUBSCRIPTION_ID}
Check HTTP Response Status Code Is 404
TP_MEC_SRV_APPSUB_004_OK
[Documentation]
... Check that the IUT acknowledges the unsubscribe from service availability event notifications
... when commanded by a MEC Application
...
... Reference ETSI GS MEC 011 V2.0.9, clause 7.2.4.3.5
[Tags] PIC_MEC_PLAT PIC_SERVICES
vDELETE without e-tag /${PX_ME_APP_SUPPORT_URI}/${APP_INSTANCE_ID}/subscriptions/${SUBSCRIPTION_ID}
Check HTTP Response Status Code Is 204
TP_MEC_SRV_APPSUB_004_NF
[Documentation]
... Check that the IUT responds with an error when
... a request for an unknown URI is sent by a MEC Application
...
... Reference ETSI GS MEC 011 V2.0.9, clause 7.2.4.3.5
[Tags] PIC_MEC_PLAT PIC_SERVICES
vDELETE without e-tag /${PX_ME_APP_SUPPORT_URI}/${NON_EXISTENT_APP_INSTANCE_ID}/subscriptions/${SUBSCRIPTION_ID}
Check HTTP Response Status Code Is 404
*** Settings ***
Documentation
... A test suite for validating DNS rules (DNS) operations.
Resource ../../GenericKeywords.robot
Default Tags TP_MEC_SRV_DNS
*** Variables ***
*** Test Cases ***
TP_MEC_SRV_DNS_001_OK
[Documentation]
... Check that the IUT responds with a list of active DNS rules
... when queried by a MEC Application
...
... Reference ETSI GS MEC 011 V2.0.9, clause 7.2.9.3.1
... OpenAPI https://forge.etsi.org/rep/mec/gs011-app-enablement-api/blob/v2.0.9/MecAppSupportApi.yaml#/definitions/DnsRule
[Tags] PIC_MEC_PLAT PIC_SERVICES
vGET /${PX_ME_APP_SUPPORT_URI}/${APP_INSTANCE_ID}/dns_rules
Check HTTP Response Status Code Is 200
Check HTTP Response Body Json Schema Is DnsRuleList
TP_MEC_SRV_DNS_002_OK
[Documentation]
... Check that the IUT responds with the information on a specific DNS rule
... when queried by a MEC Application
...
... Reference ETSI GS MEC 011 V2.0.9, clause 7.2.10.3.1
... OpenAPI https://forge.etsi.org/rep/mec/gs011-app-enablement-api/blob/v2.0.9/MecAppSupportApi.yaml#/definitions/DnsRule
[Tags] PIC_MEC_PLAT PIC_SERVICES
vGET /${PX_ME_APP_SUPPORT_URI}/${APP_INSTANCE_ID}/dns_rules/${DNS_RULE_ID}
Check HTTP Response Status Code Is 200
Check HTTP Response Body Json Schema Is DnsRule
Check Result Contains ${response['body']['DnsRule']} dnsRuleId ${DNS_RULE_ID}
TP_MEC_SRV_DNS_002_NF
[Documentation]
... Check that the IUT responds with an error when
... a request for an unknown URI is sent by a MEC Application
...
... Reference ETSI GS MEC 011 V2.0.9, clause 7.2.10.3.1
[Tags] PIC_MEC_PLAT PIC_SERVICES
vGET /${PX_ME_APP_SUPPORT_URI}/${APP_INSTANCE_ID}/dns_rules/${NON_EXISTENT_DNS_RULE_ID}
Check HTTP Response Status Code Is 404
TP_MEC_SRV_DNS_003_OK
[Documentation]
... Check that the IUT updates a specific DNS rule
... when commanded by a MEC Application
...
... Reference ETSI GS MEC 011 V2.0.9, clause 7.2.10.3.2
... OpenAPI https://forge.etsi.org/rep/mec/gs011-app-enablement-api/blob/v2.0.9/MecAppSupportApi.yaml#/definitions/DnsRule
[Tags] PIC_MEC_PLAT PIC_SERVICES
vPUT /${PX_ME_APP_SUPPORT_URI}/${APP_INSTANCE_ID}/dns_rules/${DNS_RULE_ID} ${MEC_APP_DNSRULE_UPDT_DATA}
Check HTTP Response Status Code Is 200
Check HTTP Response Body Json Schema Is DnsRule
Check Result Contains ${response['body']['DnsRule']} dnsRuleId ${DNS_RULE_NAME}
Check Result Contains ${response['body']['DnsRule']} ipAddress ${SOME_IP_ADDRESS}
TP_MEC_SRV_DNS_003_BR
[Documentation]
... Check that the IUT responds with an error when
... a request with incorrect parameters is sent by a MEC Application
...
... Reference ETSI GS MEC 011 V2.0.9, clause 7.2.10.3.2
... OpenAPI https://forge.etsi.org/rep/mec/gs011-app-enablement-api/blob/v2.0.9/MecAppSupportApi.yaml#/definitions/DnsRule
[Tags] PIC_MEC_PLAT PIC_SERVICES
vPUT /${PX_ME_APP_SUPPORT_URI}/${APP_INSTANCE_ID}/dns_rules/${DNS_RULE_ID} ${MEC_APP_DNSRULE_UPDT_DATA_BR}
Check HTTP Response Status Code Is 400
TP_MEC_SRV_DNS_003_NF
[Documentation]
... Check that the IUT responds with an error when
... a request for an unknown URI is sent by a MEC Application
...
... Reference ETSI GS MEC 011 V2.0.9, clause 7.2.10.3.2
... OpenAPI https://forge.etsi.org/rep/mec/gs011-app-enablement-api/blob/v2.0.9/MecAppSupportApi.yaml#/definitions/DnsRule
[Tags] PIC_MEC_PLAT PIC_SERVICES
vPUT /${PX_ME_APP_SUPPORT_URI}/${APP_INSTANCE_ID}/dns_rules/${NON_EXISTENT_DNS_RULE_ID} ${MEC_APP_DNSRULE_UPDT_DATA}
Check HTTP Response Status Code Is 404
TP_MEC_SRV_DNS_003_PF
[Documentation]
... Check that the IUT responds with an error when
... a request sent by a MEC Application doesn't comply with a required condition
...
... Reference ETSI GS MEC 011 V2.0.9, clause 7.2.10.3.2
... OpenAPI https://forge.etsi.org/rep/mec/gs011-app-enablement-api/blob/v2.0.9/MecAppSupportApi.yaml#/definitions/DnsRule
[Tags] PIC_MEC_PLAT PIC_SERVICES
vPUT invalid e-tag /${PX_ME_APP_SUPPORT_URI}/${APP_INSTANCE_ID}/dns_rules/${DNS_RULE_ID} ${MEC_APP_DNSRULE_UPDT_DATA}
Check HTTP Response Status Code Is 412
This diff is collapsed.
*** Settings ***
Documentation
... A test suite for validating Radio Node Location Lookup (RLOCLOOK) operations.
Resource ../../GenericKeywords.robot
Default Tags TP_MEC_SRV_RLOCLOOK
*** Variables ***
*** Test Cases ***
TP_MEC_SRV_RLOCLOOK_001_OK
[Documentation]
... Check that the IUT responds with the list of radio nodes currently associated with the MEC host and the location of each radio node
... when queried by a MEC Application
...
... Reference ETSI GS MEC 013 V2.1.1, clause 7.3.7
... OpenAPI https://forge.etsi.org/gitlab/mec/gs013-location-api/blob/master/LocationAPI.yaml#/definitions/AccessPointList
[Tags] PIC_MEC_PLAT PIC_SERVICES
vGET /${PX_ME_APP_Q_ZONE_ID_URI}/${ZONE_ID}/accessPoints
Check HTTP Response Status Code Is 200
Check HTTP Response Body Json Schema Is accessPointList
Check Result Contains ${response['body']['accessPointList']} zoneId ${ZONE_ID}
TP_MEC_SRV_RLOCLOOK_001_NF
[Documentation]
... Check that the IUT responds with an error when
... a request for an unknown URI is sent by a MEC Application
...
... Reference ETSI GS MEC 013 V2.1.1, clause 7.3.7
[Tags] PIC_MEC_PLAT PIC_SERVICES
vGET /${PX_ME_APP_Q_ZONE_ID_URI}/${NON_EXISTENT_ZONE_ID}/accessPoints
Check HTTP Response Status Code Is 404
*** Settings ***
Documentation
... A test suite for validating Service Availability Query (SAQ) operations.
Resource ../../GenericKeywords.robot
Default Tags TP_MEC_SRV_SAQ
*** Variables ***
*** Test Cases ***
TP_MEC_SRV_SAQ_001_OK
[Documentation]
... Check that the IUT responds with a list of available MEC services
... when queried by a MEC Application
...
... Reference ETSI GS MEC 011 V2.0.9, clause 8.2.3.3.1
... OpenAPI https://forge.etsi.org/rep/mec/gs011-app-enablement-api/blob/v2.0.9/MecServiceMgmtApi.yaml#/definitions/ServiceInfoList
[Tags] PIC_MEC_PLAT PIC_SERVICES
vGET /${PX_MEC_SVC_MGMT_SVC_URI}
Check HTTP Response Status Code Is 200
Check HTTP Response Body Json Schema Is ServiceInfoList
TP_MEC_SRV_SAQ_001_BR
[Documentation]
... Check that the IUT responds with an error when
... a request with incorrect parameters is sent by a MEC Application
...
... Reference ETSI GS MEC 011 V2.0.9, clause 8.2.3.3.1
[Tags] PIC_MEC_PLAT PIC_SERVICES
vGET /${PX_MEC_SVC_MGMT_SVC_URI}?instance_id=__any_value__
Check HTTP Response Status Code Is 400
TP_MEC_SRV_SAQ_002_OK
[Documentation]
... Check that the IUT responds with the information on a specific service
... when queried by a MEC Application
...
... Reference ETSI GS MEC 011 V2.0.9, clause 8.2.4.3.1
... OpenAPI https://forge.etsi.org/rep/mec/gs011-app-enablement-api/blob/v2.0.9/MecServiceMgmtApi.yaml#/definitions/ServiceInfoList
[Tags] PIC_MEC_PLAT PIC_SERVICES
vGET /${PX_MEC_SVC_MGMT_SVC_URI}/${SERVICE_ID}
Check HTTP Response Status Code Is 200
Check HTTP Response Body Json Schema Is ServiceInfoList
Check Result Contains ${response['body']['ServiceInfoList']} serInstanceId ${SERVICE_ID}
TP_MEC_SRV_SAQ_002_NF
[Documentation]
... Check that the IUT responds with an error when
... a request for an unknown URI is sent by a MEC Application
...
... Reference ETSI GS MEC 011 V2.0.9, clause 8.2.4.3.1
[Tags] PIC_MEC_PLAT PIC_SERVICES
vGET /${PX_MEC_SVC_MGMT_SVC_URI}/${NON_EXISTENT_SERVICE_ID}
Check HTTP Response Status Code Is 404
*** Settings ***
Documentation
... A test suite for validating Service Subscriptions (SRVSUB) operations.
Resource ../../GenericKeywords.robot
Default Tags TP_MEC_SRV_SRVSUB
*** Variables ***
*** Test Cases ***
TP_MEC_SRV_SRVSUB_001_OK
[Documentation]
... Check that the IUT responds with a list of subscriptions for notifications
... on services availability when queried by a MEC Application
...
... Reference ETSI GS MEC 011 V2.0.9, clause 8.2.8.3.1
... OpenAPI https://forge.etsi.org/rep/mec/gs011-app-enablement-api/blob/v2.0.9/MecServiceMgmtApi.yaml#/definitions/MecServiceMgmtApiSubscriptionLinkList
[Tags] PIC_MEC_PLAT PIC_SERVICES
vGET /${PX_MEC_SVC_MGMT_APPS_URI}/${APP_INSTANCE_ID}/subscriptions
Check HTTP Response Status Code Is 200
Check HTTP Response Body Json Schema Is SubscriptionLinkList
TP_MEC_SRV_SRVSUB_001_NF
[Documentation]
... Check that the IUT responds with an error when
... a request for an unknown URI is sent by a MEC Application
...
... Reference ETSI GS MEC 011 V2.0.9, clause 8.2.8.3.1
[Tags] PIC_MEC_PLAT PIC_SERVICES
vGET /${PX_MEC_SVC_MGMT_APPS_URI}/${NON_EXISTENT_APP_INSTANCE_ID}/subscriptions
Check HTTP Response Status Code Is 404
TP_MEC_SRV_SRVSUB_002_OK
[Documentation]
... Check that the IUT acknowledges the subscription by a MEC Application
... to notifications on service availability events
...
... Reference ETSI GS MEC 011 V2.0.9, clause 8.2.8.3.4
... OpenAPI https://forge.etsi.org/rep/mec/gs011-app-enablement-api/blob/v2.0.9/MecServiceMgmtApi.yaml#/definitions/SerAvailabilityNotificationSubscription
[Tags] PIC_MEC_PLAT PIC_SERVICES
vPOST /${PX_MEC_SVC_MGMT_APPS_URI}/${APP_INSTANCE_ID}/subscriptions ${MEC_APP_SRVSUB_DATA}
Check HTTP Response Status Code Is 201
Check HTTP Response Body Json Schema Is SerAvailabilityNotificationSubscription
Check HTTP Response Header Contains Location
Check Result Contains ${response['body']['SerAvailabilityNotificationSubscription']} subscriptionType "SerAvailabilityNotificationSubscription"
Check Result Contains ${response['body']['SerAvailabilityNotificationSubscription']} callbackReference ${APP_SRVSUB_NOTIF_CALLBACK_URI}
TP_MEC_SRV_SRVSUB_002_BR
[Documentation]
... Check that the IUT responds with an error when
... a request with incorrect parameters is sent by a MEC Application
...
... Reference ETSI GS MEC 011 V2.0.9, clause 8.2.8.3.4
... OpenAPI https://forge.etsi.org/rep/mec/gs011-app-enablement-api/blob/v2.0.9/MecServiceMgmtApi.yaml#/definitions/SerAvailabilityNotificationSubscription
[Tags] PIC_MEC_PLAT PIC_SERVICES
vPOST /${PX_MEC_SVC_MGMT_APPS_URI}/${APP_INSTANCE_ID}/subscriptions ${MEC_APP_SRVSUB_DATA_BR}
Check HTTP Response Status Code Is 400
TP_MEC_SRV_SRVSUB_003_OK
[Documentation]
... Check that the IUT responds with the information on a specific subscription
... when queried by a MEC Application
...
... Reference ETSI GS MEC 011 V2.0.9, clause 8.2.9.3.1
... OpenAPI https://forge.etsi.org/rep/mec/gs011-app-enablement-api/blob/v2.0.9/MecServiceMgmtApi.yaml#/definitions/SerAvailabilityNotificationSubscription
[Tags] PIC_MEC_PLAT PIC_SERVICES
vGET /${PX_MEC_SVC_MGMT_APPS_URI}/${APP_INSTANCE_ID}/subscriptions/${SUBSCRIPTION_ID}
Check HTTP Response Status Code Is 200
Check HTTP Response Body Json Schema Is SerAvailabilityNotificationSubscription
Check Result Contains ${response['body']['SerAvailabilityNotificationSubscription']} subscriptionType "SerAvailabilityNotificationSubscription"
TP_MEC_SRV_SRVSUB_003_NF
[Documentation]
... Check that the IUT responds with an error when
... a request for an unknown URI is sent by a MEC Application
...
... Reference ETSI GS MEC 011 V2.0.9, clause 8.2.9.3.1
[Tags] PIC_MEC_PLAT PIC_SERVICES
vGET /${PX_MEC_SVC_MGMT_APPS_URI}/${APP_INSTANCE_ID}/subscriptions/${NON_EXISTENT_SUBSCRIPTION_ID}
Check HTTP Response Status Code Is 404
TP_MEC_SRV_SRVSUB_004_OK
[Documentation]
... Check that the IUT acknowledges the unsubscribe from service availability event notifications
... when commanded by a MEC Application
...
... Reference ETSI GS MEC 011 V2.0.9, clause 8.2.9.3.5
[Tags] PIC_MEC_PLAT PIC_SERVICES
vDELETE without e-tag /${PX_MEC_SVC_MGMT_APPS_URI}/${APP_INSTANCE_ID}/subscriptions/${SUBSCRIPTION_ID}
Check HTTP Response Status Code Is 204
TP_MEC_SRV_SRVSUB_004_NF
[Documentation]
... Check that the IUT responds with an error when
... a request for an unknown URI is sent by a MEC Application
...
... Reference ETSI GS MEC 011 V2.0.9, clause 8.2.9.3.5
[Tags] PIC_MEC_PLAT PIC_SERVICES
vDELETE without e-tag /${PX_MEC_SVC_MGMT_APPS_URI}/${NON_EXISTENT_APP_INSTANCE_ID}/subscriptions/${SUBSCRIPTION_ID}
Check HTTP Response Status Code Is 404
*** Settings ***
Documentation
... A test suite for validating Timing capabilities (TIME) operations.
Resource ../../GenericKeywords.robot
Default Tags TP_MEC_SRV_TIME
*** Variables ***
*** Test Cases ***
TP_MEC_SRV_TIME_001_OK
[Documentation]
... Check that the IUT responds with timing capabilities
... when queried by a MEC Application
...
... Reference ETSI GS MEC 011 V2.0.9, clause 7.7.3.1
... OpenAPI https://forge.etsi.org/rep/mec/gs011-app-enablement-api/blob/v2.0.8/Mp1.yaml#/definitions/TimingCaps
[Tags] PIC_MEC_PLAT PIC_SERVICES
vGET /${PX_ME_APP_SUPPORT_TIMING_CAPS_URI}
Check HTTP Response Status Code Is 200
Check HTTP Response Body Json Schema Is TimingCaps
TP_MEC_SRV_TIME_002_OK
[Documentation]
... Check that the IUT responds with current time
... when queried by a MEC Application
...
... Reference ETSI GS MEC 011 V2.0.9, clause 7.8.3.1
... OpenAPI https://forge.etsi.org/rep/mec/gs011-app-enablement-api/blob/v2.0.8/Mp1.yaml#/definitions/CurrentTime
[Tags] PIC_MEC_PLAT PIC_SERVICES
vGET /${PX_ME_APP_SUPPORT_TIMING_CURRENT_URI}
Check HTTP Response Status Code Is 200
Check HTTP Response Body Json Schema Is CurrentTime
*** Settings ***
Documentation
... A test suite for validating Traffic rules (TRAF) operations.
Resource ../../GenericKeywords.robot
Default Tags TP_MEC_SRV_TRAF
*** Variables ***
*** Test Cases ***
TP_MEC_SRV_TRAF_001_OK
[Documentation]
... Check that the IUT responds with a list of available traffic rules
... when queried by a MEC Application
...
... Reference ETSI GS MEC 011 V2.0.9, clause 7.10.3.1
... OpenAPI https://forge.etsi.org/rep/mec/gs011-app-enablement-api/blob/v2.0.8/Mp1.yaml#/definitions/TrafficRule
[Tags] PIC_MEC_PLAT PIC_SERVICES
vGET /${PX_ME_APP_SUPPORT_URI}/${APP_INSTANCE_ID}/traffic_rules
Check HTTP Response Status Code Is 200
Check HTTP Response Body Json Schema Is TrafficRuleList
TP_MEC_SRV_TRAF_001_NF
[Documentation]
... Check that the IUT responds with an error when
... a request for an unknown URI is sent by a MEC Application
...
... Reference ETSI GS MEC 011 V2.0.9, clause 7.10.3.1
[Tags] PIC_MEC_PLAT PIC_SERVICES
vGET /${PX_ME_APP_SUPPORT_URI}/${NON_EXISTENT_APP_INSTANCE_ID}/traffic_rules
Check HTTP Response Status Code Is 404
TP_MEC_SRV_TRAF_002_OK
[Documentation]
... Check that the IUT responds with the information on a specific traffic rule
... when queried by a MEC Application
...
... Reference ETSI GS MEC 011 V2.0.9, clause 7.11.3.1
... OpenAPI https://forge.etsi.org/rep/mec/gs011-app-enablement-api/blob/v2.0.8/Mp1.yaml#/definitions/TrafficRule
[Tags] PIC_MEC_PLAT PIC_SERVICES
vGET /${PX_ME_APP_SUPPORT_URI}/${APP_INSTANCE_ID}/traffic_rules/${TRAFFIC_RULE_ID}
Check HTTP Response Status Code Is 200
Check HTTP Response Body Json Schema Is TrafficRule
Check Result Contains ${response['body']['TrafficRule']} trafficRuleId ${TRAFFIC_RULE_ID}
TP_MEC_SRV_TRAF_003_OK
[Documentation]
... Check that the IUT updates a specific traffic rule
... when commanded by a MEC Application
...
... Reference ETSI GS MEC 011 V2.0.9, clause 7.11.3.2
... OpenAPI https://forge.etsi.org/rep/mec/gs011-app-enablement-api/blob/v2.0.8/Mp1.yaml#/definitions/TrafficRule
[Tags] PIC_MEC_PLAT PIC_SERVICES
vPUT /${PX_ME_APP_SUPPORT_URI}/${APP_INSTANCE_ID}/traffic_rules/${TRAFFIC_RULE_ID} ${MEC_APP_TRAF_DATA}
Check HTTP Response Status Code Is 200
Check HTTP Response Body Json Schema Is TrafficRule
Check Result Contains ${response['body']['TrafficRule']} trafficRuleId ${TRAFFIC_RULE_ID}
Check Result Contains ${response['body']['TrafficRule']} action "DROP"
TP_MEC_SRV_TRAF_003_BR
[Documentation]
... Check that the IUT responds with an error when
... a request with incorrect parameters is sent by a MEC Application
...
... Reference ETSI GS MEC 011 V2.0.9, clause 7.11.3.2
... OpenAPI https://forge.etsi.org/rep/mec/gs011-app-enablement-api/blob/v2.0.8/Mp1.yaml#/definitions/TrafficRule
[Tags] PIC_MEC_PLAT PIC_SERVICES
vPUT /${PX_ME_APP_SUPPORT_URI}/${APP_INSTANCE_ID}/traffic_rules/${TRAFFIC_RULE_ID} ${MEC_APP_TRAF_DATA_BR}
Check HTTP Response Status Code Is 400
TP_MEC_SRV_TRAF_003_NF
[Documentation]
... Check that the IUT responds with an error when
... a request for an unknown URI is sent by a MEC Application
...
... Reference ETSI GS MEC 011 V2.0.9, clause 7.11.3.2
... OpenAPI https://forge.etsi.org/rep/mec/gs011-app-enablement-api/blob/v2.0.8/Mp1.yaml#/definitions/TrafficRule
[Tags] PIC_MEC_PLAT PIC_SERVICES
vPUT /${PX_ME_APP_SUPPORT_URI}/${APP_INSTANCE_ID}/traffic_rules/${TRAFFIC_RULE_ID} ${NON_EXISTENT_TRAFFIC_RULE_ID}
Check HTTP Response Status Code Is 404
TP_MEC_SRV_TRAF_003_PF