Commit a1188564 authored by YannGarcia's avatar YannGarcia
Browse files

Add first TRANS test case

parent b65c5626
......@@ -31,16 +31,28 @@ This file provides the list of the TODOs related to the STF 569.
### TRANS
Draft ETSI GS MEC 011 V2.0.9 (2018-10)
https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/remove-401s/Test%20Purposes/SRV/TRANS/PlatTransport.tplan2
- TC_MEC_SRV_TRANS_001_OK <font color="color:green">To be tested</font>
### UEAREASUB
Draft ETSI GS MEC 013 V2.0.3 (2018-10)
https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/remove-401s/Test%20Purposes/SRV/UEDISTSUB/PlatUeAreaSubscription.tplan2
TODO CircleNotificationSubscription data structure not found
### UEDISTLOOK
Draft ETSI GS MEC 013 V2.0.3 (2018-10)
https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/remove-401s/Test%20Purposes/SRV/UEDISTSUB/PlatUeDistanceSubscription.tplan2
TODO TerminalDistance data structure not found
https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/remove-401s/Test%20Purposes/SRV/UEDISTLOOK/PlatUeDistanceSubscription.tplan2
TODO TerminalDistance data structure not found
### UEDISTSUB
......@@ -50,7 +62,6 @@ https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/remove-401s/Test%20
TODO DistanceNotificationSubscription data structure not found
### UEINFLOOK
Draft ETSI GS MEC 013 V2.0.3 (2018-10)
......
/**
* @author ETSI / STF569
* @version $URL:$
* $ID:$
* @desc This module provides the MEC test cases.
* @copyright ETSI Copyright Notification
* No part may be reproduced except as authorized by written permission.
* The copyright and the foregoing restriction extend to reproduction in all media.
* All rights reserved.
* @see ETSI GS MEC 003, Draft ETSI GS MEC 011 V2.0.9 (2018-10)
*/
module AtsMec_AppEnablementAPI_TestCases {
// Libcommon
import from LibCommon_Time all;
import from LibCommon_VerdictControl all;
import from LibCommon_Sync all;
// LibHttp
import from LibItsHttp_TypesAndValues all;
import from LibItsHttp_Functions all;
import from LibItsHttp_Templates all;
import from LibItsHttp_JsonTemplates all;
import from LibItsHttp_TestSystem all;
// LibMec_AppEnablementAPI
import from AppEnablementAPI_Templates all;
import from AppEnablementAPI_Pics all;
import from AppEnablementAPI_Pixits all;
// LibMec
import from LibMec_Functions all;
import from LibMec_Pics all;
import from LibMec_Pixits all;
group transport_info {
/**
* @desc Check that the IUT responds with a list of available transports when queried by a MEC Application
* @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/TRANS/PlatTransport.tplan2
*/
testcase TC_MEC_SRV_TRANS_001_OK() runs on HttpComponent system HttpTestAdapter {
// Local variables
var HeaderLines v_headers;
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_ENABLE_APP_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cf_01_http_up();
// Test adapter configuration
// Preamble
f_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_get(
"/" & PICS_ROOT_API & PX_SVC_MGMT_TRANS_URI,
v_headers
)
)
);
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
tc_ac.start;
alt {
[] httpPort.receive(
mw_http_response(
mw_http_response_ok(
mw_http_message_body_json(
mw_body_json_transport_info_list(
{ *, mw_transport_info, * }
))))) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with a UeIdentityTag ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: Expected message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
} // End of 'alt' statement
// Postamble
f_cf_01_http_down();
} // End of testcase TC_MEC_SRV_TRANS_001_OK
} // End of group transport_info
} // End of module AtsMec_AppEnablementAPI_TestCases
......@@ -8,6 +8,8 @@ module AtsMec_TestControl {
import from RnisAPI_Pics all;
// LibMec/BwManagementAPI
import from BwManagementAPI_Pics all;
// LibMec/AppEnablementAPI
import from AppEnablementAPI_Pics all;
// LibMec
import from LibMec_Pics all;
......@@ -56,6 +58,10 @@ module AtsMec_TestControl {
execute(TC_MEC_PLAT_RLOC_001_OK());
}
if (PICS_ENABLE_APP_API_SUPPORTED) {
execute(TC_MEC_SRV_TRANS_001_OK());
}
}
if (PICS_RNIS) {
......
{
"openapi": "3.0.2",
"servers": [
{
"url": "http://127.0.0.1:8081/mp1/v1"
},
{
"url": "https://127.0.0.1:8081/mp1/v1"
}
],
"info": {
"title": "UE Application Interface API",
"title": "Mp1 API",
"version": "1.1.1",
"description": "The ETSI MEC ISG MEC016 UE Application Interface API described using OpenAPI",
"description": "The ETSI MEC ISG MEC011 Application Enablement API described using OpenAPI",
"license": {
"name": "ETSI Forge copyright notice",
"url": "https://forge.etsi.org/etsi-forge-copyright-notice.txt"
......@@ -13,130 +21,204 @@
}
},
"externalDocs": {
"description": "ETSI GS MEC016 UE Application Interface API, V1.1.1",
"url": "http://www.etsi.org/deliver/etsi_gs/MEC/001_099/016/01.01.01_60/gs_MEC016v010101p.pdf"
"description": "ETSI GS MEC011 Application Enablement API, V1.1.1",
"url": "http://www.etsi.org/deliver/etsi_gs/MEC/001_099/011/01.01.01_60/gs_mec011v010101p.pdf"
},
"security": [
"tags": [
{
"OauthSecurity": [
"all"
]
}
],
"servers": [
"name": "trafficRules"
},
{
"url": "http://127.0.0.1:8081/mx2/v1"
"name": "dnsRules"
},
{
"url": "https://127.0.0.1:8081/mx2/v1"
}
],
"tags": [
"name": "subscriptions"
},
{
"name": "services"
},
{
"name": "timing"
},
{
"name": "appList"
"name": "transports"
},
{
"name": "appContext"
"name": "callbacks"
}
],
"paths": {
"/app_list": {
"/applications/{appInstanceId}/dns_rules": {
"parameters": [
{
"$ref": "#/components/parameters/Path.AppInstanceId"
}
],
"get": {
"description": "Used to query information about the available MEC applications.",
"operationId": "AppList_GET",
"description": "This method retrieves information about all the DNS rules associated with a mobile edge application instance.",
"operationId": "ApplicationsDnsRules_GET",
"tags": [
"appList"
"trafficRules"
],
"parameters": [
{
"$ref": "#/components/parameters/Query.AppName"
},
{
"$ref": "#/components/parameters/Query.AppProvider"
"responses": {
"200": {
"$ref": "#/components/responses/ApplicationsDnsRules.200"
},
{
"$ref": "#/components/parameters/Query.AppSoftVersion"
"400": {
"$ref": "#/components/responses/Error.400"
},
{
"$ref": "#/components/parameters/Query.ServiceCont"
"403": {
"$ref": "#/components/responses/Error.403"
},
{
"$ref": "#/components/parameters/Query.VendorId"
"404": {
"$ref": "#/components/responses/Error.404"
}
}
}
},
"/applications/{appInstanceId}/dns_rules/{dnsRuleId}": {
"parameters": [
{
"$ref": "#/components/parameters/Path.AppInstanceId"
},
{
"$ref": "#/components/parameters/Path.DnsRuleId"
}
],
"get": {
"description": "This method retrieves information about a DNS rule associated with a mobile edge application instance.",
"operationId": "ApplicationsDnsRule_GET",
"tags": [
"dnsRules"
],
"responses": {
"200": {
"$ref": "#/components/responses/AppList"
"$ref": "#/components/responses/ApplicationsDnsRule.200"
},
"400": {
"$ref": "#/components/responses/Error.400"
},
"401": {
"$ref": "#/components/responses/Error.401"
"403": {
"$ref": "#/components/responses/Error.403"
},
"404": {
"$ref": "#/components/responses/Error.404"
}
}
},
"put": {
"description": "This method activates, de-activates or updates a traffic rule.",
"operationId": "ApplicationsDnsRule_PUT",
"tags": [
"dnsRules"
],
"responses": {
"200": {
"$ref": "#/components/responses/ApplicationsDnsRule.200"
},
"400": {
"$ref": "#/components/responses/Error.400"
},
"403": {
"$ref": "#/components/responses/Error.403"
},
"404": {
"$ref": "#/components/responses/Error.404"
},
"412": {
"$ref": "#/components/responses/Error.412"
}
},
"requestBody": {
"$ref": "#/components/requestBodies/ApplicationsDnsRule"
}
}
},
"/app_contexts": {
"/applications/{appInstanceId}/subscriptions": {
"parameters": [
{
"$ref": "#/components/parameters/Path.AppInstanceId"
}
],
"get": {
"description": "The GET method may be used to request information about all subscriptions for this requestor. Upon success, the response contains entity body with all the subscriptions for the requestor.",
"operationId": "ApplicationsSubscriptions_GET",
"tags": [
"subscriptions"
],
"responses": {
"200": {
"$ref": "#/components/responses/ApplicationsSubscriptions.200"
},
"400": {
"$ref": "#/components/responses/Error.400"
},
"403": {
"$ref": "#/components/responses/Error.403"
},
"404": {
"$ref": "#/components/responses/Error.404"
}
}
},
"post": {
"description": "The POST method can be used to create a new application context. Upon success, the response contains entity body describing the created application context.",
"operationId": "AppContext_POST",
"description": "The POST method may be used to create a new subscription. One example use case is to create a new subscription to the mobile edge service availability notifications. Upon success, the response contains entity body describing the created subscription.",
"operationId": "ApplicationsSubscriptions_POST",
"tags": [
"appContext"
"subscriptions"
],
"requestBody": {
"$ref": "#/components/requestBodies/AppContext"
},
"responses": {
"201": {
"$ref": "#/components/responses/AppContext"
"$ref": "#/components/responses/ApplicationsSubscriptions.201"
},
"400": {
"$ref": "#/components/responses/Error.400"
},
"401": {
"$ref": "#/components/responses/Error.401"
},
"403": {
"$ref": "#/components/responses/Error.403"
},
"404": {
"$ref": "#/components/responses/Error.404"
}
},
"requestBody": {
"$ref": "#/components/requestBodies/ApplicationsSubscriptions"
},
"callbacks": {
"appTerminationNotification": {
"$ref": "#/components/callbacks/AppTerminationNotification"
},
"serviceAvailabilityNotification": {
"$ref": "#/components/callbacks/ServiceAvailabilityNotification"
}
}
}
},
"/app_contexts/{contextId}": {
"/applications/{appInstanceId}/subscriptions/{subscriptionType}/{subscriptionId}": {
"parameters": [
{
"$ref": "#/components/parameters/Path.ContextId"
"$ref": "#/components/parameters/Path.AppInstanceId"
},
{
"$ref": "#/components/parameters/Path.SubscriptionType"
},
{
"$ref": "#/components/parameters/Path.SubscriptionId"
}
],
"put": {
"description": "The PUT method is used to update the callback reference of the existing application context. Upon successful operation, the target resource is updated with new callback reference.",
"operationId": "AppContextId_PUT",
"get": {
"description": "The GET method requests information about a subscription for this requestor. Upon success, the response contains entity body with the subscription for the requestor.",
"operationId": "ApplicationsSubscription_GET",
"tags": [
"appContext"
"subscriptions"
],
"requestBody": {
"$ref": "#/components/requestBodies/AppContext"
},
"responses": {
"204": {
"description": "No Content."
"200": {
"$ref": "#/components/responses/ApplicationsSubscription.200"
},
"400": {
"$ref": "#/components/responses/Error.400"
},
"401": {
"$ref": "#/components/responses/Error.401"
},
"403": {
"$ref": "#/components/responses/Error.403"
},
......@@ -146,155 +228,1874 @@
}
},
"delete": {
"description": "The DELETE method is used to delete the resource that represents the existing application context.",
"operationId": "AppContextId_DEL",
"description": "This method deletes a meMp1Subscription. This method is typically used in \"Unsubscribing from service availability event notifications\" procedure.",
"operationId": "ApplicationsSubscription_DELETE",
"tags": [
"appContext"
"subscriptions"
],
"responses": {
"204": {
"description": "No Content"
},
"403": {
"$ref": "#/components/responses/Error.403"
},
"404": {
"$ref": "#/components/responses/Error.404"
}
}
}
},
"/applications/{appInstanceId}/traffic_rules": {
"parameters": [
{
"$ref": "#/components/parameters/Path.AppInstanceId"
}
],
"get": {
"description": "This method retrieves information about all the traffic rules associated with a mobile edge application instance.",
"operationId": "ApplicationsTrafficRules_GET",
"tags": [
"trafficRules"
],
"responses": {
"200": {
"$ref": "#/components/responses/ApplicationsTrafficRules.200"
},
"400": {
"$ref": "#/components/responses/Error.400"
},
"403": {
"$ref": "#/components/responses/Error.403"
},
"404": {
"$ref": "#/components/responses/Error.404"
}
}
}
},
"/applications/{appInstanceId}/traffic_rules/{trafficRuleId}": {
"parameters": [
{
"$ref": "#/components/parameters/Path.AppInstanceId"
},
{
"$ref": "#/components/parameters/Path.TrafficRuleId"
}
],
"get": {
"description": "This method retrieves information about all the traffic rules associated with a mobile edge application instance.",
"operationId": "ApplicationsTrafficRule_GET",
"tags": [
"trafficRules"
],
"responses": {
"200": {
"$ref": "#/components/responses/ApplicationsTrafficRule.200"
},
"400": {
"$ref": "#/components/responses/Error.400"
},
"401": {
"$ref": "#/components/responses/Error.401"
"403": {
"$ref": "#/components/responses/Error.403"
},
"404": {
"$ref": "#/components/responses/Error.404"
}
}
},
"put": {
"description": "This method retrieves information about all the traffic rules associated with a mobile edge application instance.",
"operationId": "ApplicationsTrafficRule_PUT",
"tags": [
"trafficRules"
],
"responses": {
"200": {
"$ref": "#/components/responses/ApplicationsTrafficRule.200"
},
"400": {
"$ref": "#/components/responses/Error.400"
},
"403": {
"$ref": "#/components/responses/Error.403"
},
"404": {
"$ref": "#/components/responses/Error.404"
},
"412": {
"$ref": "#/components/responses/Error.412"
}
},
"requestBody": {
"$ref": "#/components/requestBodies/ApplicationsTrafficRule"
}
}
}
},
"components": {
"parameters": {
"Query.AppName": {
"name": "appName",
"in": "query",
"description": "Name to identify the MEC application",
"required": false,
"schema": {
"type": "array",
"items": {
"type": "string"
},
"/services": {
"get": {
"description": "This method retrieves information about a list of meService resources. This method is typically used in \"service availability query\" procedure",
"operationId": "Services_GET",
"tags": [
"services"
],
"parameters": [
{
"$ref": "#/components/parameters/Query.Ser_instance_id"
},
{
"$ref": "#/components/parameters/Query.Ser_name"
},
{
"$ref": "#/components/parameters/Query.Ser_category_id"
}
],
"responses": {
"200": {
"$ref": "#/components/responses/Services.200"
},
"400": {
"$ref": "#/components/responses/Error.400"
},
"403": {
"$ref": "#/components/responses/Error.403"
},
"404": {
"$ref": "#/components/responses/Error.404"
}
}
},
"Query.AppProvider": {