Commit e681c0a7 authored by Elian Kraja's avatar Elian Kraja

Minor fixies on variables

parent ebc7ed76
Pipeline #1820 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 ***
......@@ -54,113 +53,4 @@ Check HTTP Response Contain Header with value
Check HTTP Response Header Contains ${HEADER_TOCHECK}
Should Be Equal As Strings ${value} ${response['headers']['Content-Type']}
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}
......@@ -6,6 +6,7 @@ Resource environment/variables.txt
Resource ../../pics.txt
Resource ../../GenericKeywords.robot
Resource resources/UeAppsContextAPI.robot
Library String
Library REST ${MEC-APP_SCHEMA}://${MEC-APP_HOST}:${MEC-APP_PORT} ssl_verify=false
......@@ -43,7 +44,7 @@ Update of the application context
Should Be True ${PIC_SERVICES} == 1
Create an application context
# Test Body
${CREATE_APP_CTX['callbackReference']}= ${CALLBACK_REFERENCE_1}
${CREATE_APP_CTX}= Set Variable ${CALLBACK_REFERENCE_1}
Update application context ${APP_CTX_ID} ${CREATE_APP_CTX}
Check HTTP Response Status Code Is 204
Check HTTP Response Body Json Schema Is AppContext
......@@ -62,7 +63,7 @@ Update of the application context with wrong parameters
Should Be True ${PIC_SERVICES} == 1
Create an application context
# Test Body
${CREATE_APP_CTX['callbackReference']}= '' # Empty string
${CREATE_APP_CTX}= Set Variable '' # Empty string
Update application context ${APP_CTX_ID} ${CREATE_APP_CTX}
Check HTTP Response Status Code Is 400
Check ProblemDetails 400
......@@ -80,7 +81,7 @@ Update of the application context with unknown URI
Should Be True ${PIC_SERVICES} == 1
Create an application context
# Test Body
${CREATE_APP_CTX['callbackReference']}= ${CALLBACK_REFERENCE_1}
${CREATE_APP_CTX}= Set Variable ${CALLBACK_REFERENCE_1}
Update application context ${NON_EXISTENT_APP_CTX_ID} ${CREATE_APP_CTX}
Check HTTP Response Status Code Is 404
Check ProblemDetails 404
......@@ -102,7 +103,7 @@ Delete of the application context
Check HTTP Response Status Code Is 204
Delete of the application context
Delete of the application context with non esistent APP CTX ID
[Documentation] TC_MEC_MEO_UEAPPCTX_003_NF
... 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 016 V1.1.1, clause 7.5.3.5
......
......@@ -46,7 +46,7 @@ Get the list of the application contexts with wrong parameter
Delete an application context ${APP_CTX_ID}
Get the list of the application contexts with wrong parameter
Get the list of the application contexts with non esistent parameter
[Documentation] TC_MEC_MEO_UEAPPS_001_NF
... 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 016 V1.1.1, clause 7.3.3.1
......
This diff is collapsed.
*** Variables ***
# Generic variables
${SCHEMA} http
${HOST} 10.192.2.172
${PORT} 8081
${response} {}
${TOKEN} Basic YWxhZGRpbjpvcGVuc2VzYW1l
${apiRoot}
${apiName} mec_service_mgmt
${apiVersion} v1
# Specific variables
${APP_INSTANCE_ID} 5abe4782-2c70-4e47-9a4e-0ee3a1a0fd1f
${INSTANCE_ID} instance_id
${FAKE_INSTANCE_ID_VALUE} 5
${NON_EXISTENT_APP_INSTANCE_ID} NON_ESISTENT_APP_INSTANCE_ID
${SERVICE_ID} e0deee2b-6e50-4f33-ab09-8bf0585025d3
${NON_EXISTENT_SERVICE_ID} NON_EXISTENT_SERVICE_ID
${INVALID_ETAG} INVALID_ETAG
# ${SUBSCRIPTION_TYPE} MobilityProcedureSubscription
# ${SUBSCRIPTION_ID} e0deee2b-6e50-4f33-ab09-8bf0585025d3
# ${NON_EXISTENT_SUBSCRIPTION_ID} NON_EXISTENT_SUBSCRIPTION_ID
# ${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
\ No newline at end of file
{
"type": "array",
"items": {
"type": "object",
"required": [
"serInstanceId",
"version",
"state",
"transportInfo",
"serializer"
],
"properties": {
"serInstanceId": {
"type": "string"
},
"serName": {
"type": "string"
},
"serCategory": {
"type": "string"
},
"version": {
"type": "string"
},
"state": {
"type": "string",
"enum": [
"ACTIVE",
"INACTIVE"
]
},
"transportInfo": {
"type": "string"
},
"serializer": {
"type": "string"
},
"scopeOfLocality": {
"type": "string"
},
"consumedLocalOnly": {
"type": "string"
},
"isLocal": {
"type": "string"
}
}
}
}
......@@ -4,16 +4,16 @@ Documentation
... A test suite for validating Application Subscriptions (APPSUB) operations.
Resource ../../GenericKeywords.robot
Resource environment/variables.txt
Library REST ${SCHEMA}://${HOST}:${PORT} ssl_verify=false
Library OperatingSystem
Default Tags TP_MEC_SRV_APPSUB
*** Variables ***
Default Tags TC_MEC_SRV_APPSUB
*** Test Cases ***
TP_MEC_SRV_APPSUB_001_OK
TC_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
......@@ -22,13 +22,12 @@ TP_MEC_SRV_APPSUB_001_OK
... 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
Get Subscriptions list ${APP_INSTANCE_ID}
Check HTTP Response Status Code Is 200
Check HTTP Response Body Json Schema Is SubscriptionLinkList
TP_MEC_SRV_APPSUB_001_NF
TC_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
......@@ -36,12 +35,11 @@ TP_MEC_SRV_APPSUB_001_NF
... 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
Get Subscriptions list ${NON_EXISTENT_APP_INSTANCE_ID}
Check HTTP Response Status Code Is 404
TP_MEC_SRV_APPSUB_002_OK
TC_MEC_SRV_APPSUB_002_OK
[Documentation]
... Check that the IUT acknowledges the subscription by a MEC Application
... to notifications on service availability events
......@@ -50,8 +48,7 @@ TP_MEC_SRV_APPSUB_002_OK
... 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}
Create new subscription ${APP_INSTANCE_ID} AppTerminationNotificationSubscription
Check HTTP Response Status Code Is 201
Check HTTP Response Body Json Schema Is AppTerminationNotificationSubscription
Check HTTP Response Header Contains Location
......@@ -59,7 +56,7 @@ TP_MEC_SRV_APPSUB_002_OK
Check Result Contains ${response['body']['AppTerminationNotificationSubscription']} callbackReference ${APP_TERM_NOTIF_CALLBACK_URI}
TP_MEC_SRV_APPSUB_003_OK
TC_MEC_SRV_APPSUB_003_OK
[Documentation]
... Check that the IUT responds with the information on a specific subscription
... when queried by a MEC Application
......@@ -68,14 +65,13 @@ TP_MEC_SRV_APPSUB_003_OK
... 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}
Get individual subscription ${APP_INSTANCE_ID} ${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
TC_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
......@@ -83,12 +79,11 @@ TP_MEC_SRV_APPSUB_003_NF
... 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}
Get individual subscription ${APP_INSTANCE_ID} ${NON_EXISTENT_SUBSCRIPTION_ID}
Check HTTP Response Status Code Is 404
TP_MEC_SRV_APPSUB_004_OK
TC_MEC_SRV_APPSUB_004_OK
[Documentation]
... Check that the IUT acknowledges the unsubscribe from service availability event notifications
... when commanded by a MEC Application
......@@ -96,12 +91,11 @@ TP_MEC_SRV_APPSUB_004_OK
... 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}
Remove subscription ${APP_INSTANCE_ID} ${SUBSCRIPTION_ID}
Check HTTP Response Status Code Is 204
TP_MEC_SRV_APPSUB_004_NF
TC_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
......@@ -109,6 +103,43 @@ TP_MEC_SRV_APPSUB_004_NF
... 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}
Remove subscription ${NON_EXISTENT_APP_INSTANCE_ID} ${SUBSCRIPTION_ID}
Check HTTP Response Status Code Is 404
*** Keywords ***
Get Subscriptions List
[Arguments] ${appInstanceId}
Set Headers {"Accept":"application/json"}
Set Headers {"Authorization":"${TOKEN}"}
Get ${apiRoot}/${apiName}/${apiVersion}/applications/${appInstanceId}/subscriptions
${output}= Output response
Set Suite Variable ${response} ${output}
Create new subscription
[Arguments] ${appInstanceId} ${content}
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}/applications/${appInstanceId}/subscriptions ${body}
${output}= Output response
Set Suite Variable ${response} ${output}
Get individual subscription
[Arguments] ${appInstanceId} ${subscriptionId}
Set Headers {"Accept":"application/json"}
Set Headers {"Authorization":"${TOKEN}"}
Get ${apiRoot}/${apiName}/${apiVersion}/applications/${appInstanceId}/subscriptions/${subscriptionId}
${output}= Output response
Set Suite Variable ${response} ${output}
Remove subscription
[Arguments] ${appInstanceId} ${subscriptionId}
Set Headers {"Accept":"application/json"}
Set Headers {"Authorization":"${TOKEN}"}
Delete ${apiRoot}/${apiName}/${apiVersion}/applications/${appInstanceId}/subscriptions/${subscriptionId}
${output}= Output response
Set Suite Variable ${response} ${output}
\ No newline at end of file
*** Variables ***
# Generic variables
${SCHEMA} http
${HOST} 10.192.2.172
${PORT} 8081
${response} {}
${TOKEN} Basic YWxhZGRpbjpvcGVuc2VzYW1l
${apiRoot}
${apiName} mec_app_support
${apiVersion} v1
# Specific variables
${APP_INSTANCE_ID} 5abe4782-2c70-4e47-9a4e-0ee3a1a0fd1f
${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
# ${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
\ No newline at end of file
This diff is collapsed.
*** Variables ***
${MEC-APP_SCHEMA} http
#${MEC-APP_HOST} 172.28.4.87
#${MEC-APP_HOST} 127.0.0.1
${MEC-APP_HOST} 192.168.56.1
${MEC-APP_PORT} 8081
${INVALID_ETAG} invalid_etag
${APP_INSTANCE_ID} appInst01
${NON_EXISTENT_APP_INSTANCE_ID} appInst99
${ALLOCATION_ID} allInst01
${NON_EXISTENT_ALLOCATION_ID} allInst99
${FIXED_ALLOCATION} fixed_allocation
${REQUEST_FOR_BW_REQUIREMENTS} { "appInsId": "${APP_INSTANCE_ID}", "requestType": "APPLICATION_SPECIFIC_BW_ALLOCATION", "fixedBWPriority": "not defined in the present document", "fixedAllocation": "${FIXED_ALLOCATION}", "allocationDirection": "00 = Downlink (towards the UE)"}
${REQUEST_FOR_BW_REQUIREMENTS_BR} { "appInsId": "${APP_INSTANCE_ID}", "requestType": "UNKMOWN", "fixedBWPriority": "not defined in the present document", "fixedAllocation": "${FIXED_ALLOCATION}", "allocationDirection": "00 = Downlink (towards the UE)"}
${REQUEST_FOR_DELTAS_CHANGES} { "appInsId": "${APP_INSTANCE_ID}", "requestType": "APPLICATION_SPECIFIC_BW_ALLOCATION", "fixedBWPriority": "not defined in the present document", "fixedAllocation": "string", "allocationDirection": "00 = Downlink (towards the UE)"}
${REQUEST_FOR_DELTAS_CHANGES_BR} { "appInsId": "${APP_INSTANCE_ID}", "requestType": "UNKNOWN", "fixedBWPriority": "not defined in the present document", "fixedAllocation": "string", "allocationDirection": "00 = Downlink (towards the UE)"}
# Generic variables
${SCHEMA} http
${HOST} 10.192.2.172
${PORT} 8081
${response} {}
${TOKEN} Basic YWxhZGRpbjpvcGVuc2VzYW1l
${apiRoot}
${apiName} bwm
${apiVersion} v1
# Specific variables
${APP_INSTANCE_ID} 5abe4782-2c70-4e47-9a4e-0ee3a1a0fd1f
${NON_EXISTENT_APP_INSTANCE_ID} NON_EXISTENT_INSTANCE_ID
${APP_SRVSUB_NOTIF_CALLBACK_URI} http://127.0.0.1/subscribe
${SUBSCRIPTION_ID} e0deee2b-6e50-4f33-ab09-8bf0585025d3
${NON_EXISTENT_SUBSCRIPTION_ID} NON_EXISTENT_SUBSCRIPTION_ID
${ALLOCATION_ID} 59ab1593-d330-4087-85ec-4e484092f306
${NON_EXISTENT_ALLOCATION_ID} NON_EXISTENT_ALLOCATION_ID
${INVALID_ETAG}
${ETAG_VALUE}
${ETAG}
\ No newline at end of file
*** Settings ***
Resource ../environment/variables.txt
Resource ../../../pics.txt
Resource ../../../GenericKeywords.robot
Library REST ${MEC-APP_SCHEMA}://${MEC-APP_HOST}:${MEC-APP_PORT} ssl_verify=false
Library JSONSchemaLibrary schemas/
*** Keywords ***
Register Bandwidth Management Service
... Register a Bandwidth Management Service
Should Be True ${PIC_MEC_PLAT} == 1
Should Be True ${PIC_SERVICES} == 1
Set Headers {"Accept":"application/json"}
Set Headers {"Content-Type":"application/json"}
Set Headers {"Authorization":"${TOKEN}"}
Set Headers {"Content-Length":"0"}
Post /exampleAPI/bwm/v1/bw_allocations ${REQUEST_FOR_BW_REQUIREMENTS}
${output}= Output response
Set Suite Variable ${response} ${output}
Check HTTP Response Status Code Is 201
Check HTTP Response Body Json Schema Is bwInfo
# Extract ETAG_VALUE
Set Suite Variable ${ETAG_VALUE} ${response['status']['ETag']}
Should Not Be Empty ${ETAG_VALUE}
# TODO Extract allocationId not possible, information is missing in the standard doc
Set Suite Variable ${ALLOCATION_ID} ${response['body']['bwInfo']['allocationId']}
Should Not Be Empty ${ALLOCATION_ID}
Unregister Bandwidth Management Service
... Unregister a Bandwidth Management Service
[Arguments] ${value}
Should Be True ${PIC_MEC_PLAT} == 1
Should Be True ${PIC_SERVICES} == 1
Set Headers {"Accept":"application/json"}
Set Headers {"Content-Type":"application/json"}
Set Headers {"Authorization":"${TOKEN}"}
Set Headers {"Content-Length":"0"}
Delete /exampleAPI/bwm/v1/bw_allocations/${value}
${output}= Output response
Set Suite Variable ${response} ${output}
Check HTTP Response Status Code Is 204
Check AppInstanceId
[Arguments] ${value}
Log Check AppInstanceId for bwInfo element
Should be Equal ${response['body']['bwInfo']['appInsId']} ${value}
Log AppInstanceId OK
Check AllocationId
[Arguments] ${value}
Log Check AllocationId for bwInfo element
Should be Equal ${response['body']['bwInfo']['fixedAllocation']} ${value}
Log AllocationId OK
......@@ -4,8 +4,11 @@ Documentation
... A test suite for validating DNS rules (DNS) operations.
Resource ../../GenericKeywords.robot
Resource environment/variables.txt
Library REST ${SCHEMA}://${HOST}:${PORT} ssl_verify=false
Library OperatingSystem
Default Tags TP_MEC_SRV_DNS
Default Tags TC_MEC_SRV_DNS
*** Variables ***
......@@ -13,7 +16,7 @@ Default Tags TP_MEC_SRV_DNS
*** Test Cases ***
TP_MEC_SRV_DNS_001_OK
TC_MEC_SRV_DNS_001_OK
[Documentation]
... Check that the IUT responds with a list of active DNS rules
... when queried by a MEC Application
......@@ -22,13 +25,12 @@ TP_MEC_SRV_DNS_001_OK
... 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
Get list of active DNS rules ${APP_INSTANCE_ID}
Check HTTP Response Status Code Is 200
Check HTTP Response Body Json Schema Is DnsRuleList
TP_MEC_SRV_DNS_002_OK
TC_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
......@@ -37,14 +39,13 @@ TP_MEC_SRV_DNS_002_OK
... 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}
Get individual DNS rule ${APP_INSTANCE_ID} ${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
TC_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
......@@ -52,12 +53,11 @@ TP_MEC_SRV_DNS_002_NF
... 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}
Get individual DNS rule ${APP_INSTANCE_ID} ${NON_ESISTENT_DNS_RULE_ID}
Check HTTP Response Status Code Is 404
TP_MEC_SRV_DNS_003_OK
TC_MEC_SRV_DNS_003_OK
[Documentation]
... Check that the IUT updates a specific DNS rule
... when commanded by a MEC Application
......@@ -66,15 +66,14 @@ TP_MEC_SRV_DNS_003_OK
... 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}
Update a DNS Rule ${APP_INSTANCE_ID} ${DNS_RULE_ID} DnsRuleUpdate
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}
# 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
TC_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
......@@ -83,12 +82,11 @@ TP_MEC_SRV_DNS_003_BR
... 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}
Update a DNS Rule ${APP_INSTANCE_ID} ${DNS_RULE_ID} DnsRuleUpdateError
Check HTTP Response Status Code Is 400
TP_MEC_SRV_DNS_003_NF
TC_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
......@@ -97,12 +95,11 @@ TP_MEC_SRV_DNS_003_NF
... 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}
Update a DNS Rule ${APP_INSTANCE_ID} ${NON_ESISTENT_DNS_RULE_ID} DnsRuleUpdate
Check HTTP Response Status Code Is 404
TP_MEC_SRV_DNS_003_PF
TC_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
......@@ -111,7 +108,40 @@ TP_MEC_SRV_DNS_003_PF
... 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}
Update a DNS Rule with invalid etag ${APP_INSTANCE_ID} ${DNS_RULE_ID} DnsRuleUpdate
Check HTTP Response Status Code Is 412
*** Keywords ***
Get list of active DNS rules
[Arguments] ${appInstanceId}
Set Headers {"Accept":"application/json"}
Set Headers {"Authorization":"${TOKEN}"}
Get ${apiRoot}/${apiName}/${apiVersion}/applications/${appInstanceId}/dns_rules
${output}= Output response
Set Suite Variable ${response} ${output}