Commit 71a9d199 authored by YannGarcia's avatar YannGarcia
Browse files

Finalyse RadioNetworkLocationAPI test cases

parent 835ae35e
......@@ -49,6 +49,7 @@ LogEventTypes:= Yes
[TESTPORT_PARAMETERS]
# In this section you can specify parameters that are passed to Test Ports.
system.httpPort.params := "HTTP(codecs=json:json_codec)/TCP(debug=1,server=172.22.1.6,port=31007,use_ssl=0)"
#system.httpPort.params := "HTTP(codecs=json:json_codec)/TCP(debug=1,server=172.28.4.253,port=30007,use_ssl=0)"
system.httpPort_notif.params := "HTTP(codecs=json:json_codec)/TCP(debug=1,server_mode=1,local_port=8081,use_ssl=0)"
[DEFINE]
......@@ -82,10 +83,10 @@ system.httpPort_notif.params := "HTTP(codecs=json:json_codec)/TCP(debug=1,server
#AtsMec_UEidentityAPI_TestCases.TC_MEC_SRV_UETAG_002_BR
#AtsMec_UEidentityAPI_TestCases.TC_MEC_SRV_UETAG_002_PF
#AtsMec_LocationAPI_TestCases.TC_MEC_SRV_UELOCLOOK_001_OK
# ETSI GS MEC 013
AtsMec_LocationAPI_TestCases.TC_MEC_SRV_UELOCLOOK_001_OK
#AtsMec_LocationAPI_TestCases.TC_MEC_SRV_UELOCLOOK_001_BR
AtsMec_LocationAPI_TestCases.TC_MEC_SRV_UELOCLOOK_001_NF
#AtsMec_LocationAPI_TestCases.TC_MEC_SRV_UELOCLOOK_001_NF
#AtsMec_LocationAPI_TestCases.TC_MEC_SRV_UELOCSUB_001_OK
#AtsMec_LocationAPI_TestCases.TC_MEC_SRV_UELOCSUB_001_BR
......@@ -106,6 +107,8 @@ AtsMec_LocationAPI_TestCases.TC_MEC_SRV_UELOCLOOK_001_NF
#AtsMec_LocationAPI_TestCases.TC_MEC_SRV_UEINFSUB_002_OK
#AtsMec_LocationAPI_TestCases.TC_MEC_SRV_UEINFSUB_002_NF
#AtsMec_RadioNodeLocationAPI_TestCases.TP_MEC_SRV_RLOCLOOK_001_OK
#AtsMec_RnisAPI_TestCases.TC_MEC_SRV_RNIS_011_OK
#AtsMec_RnisAPI_TestCases.TC_MEC_SRV_RNIS_012_OK
#AtsMec_RnisAPI_TestCases.TC_MEC_SRV_RNIS_011_BR
......
......@@ -177,7 +177,7 @@ module AtsMec_LocationAPI_TestCases {
httpPort.send(
m_http_request(
m_http_request_get(
"/" & PICS_ROOT_API & PX_ME_APP_Q_USERS_LIST_URI & "?zoneId=" & oct2char(unichar2oct(NON_EXISTENT_ZONE_ID, "UTF-8")),
"/" & PICS_ROOT_API & PX_ME_APP_Q_USERS_LIST_URI & "?zoneId=" & oct2char(unichar2oct(PX_NON_EXISTENT_ZONE_ID, "UTF-8")),
v_headers
)
)
......@@ -259,7 +259,7 @@ module AtsMec_LocationAPI_TestCases {
mw_http_response_201_created(
mw_http_message_body_json(
mw_body_json_user_tracking_subscription(
mw_user_tracking_subscription_response(
mw_user_tracking_subscription(
PX_CLIENT_ID,
PX_CALLBACK_REF_URL,
PX_USER
......@@ -367,7 +367,7 @@ module AtsMec_LocationAPI_TestCases {
httpPort.send(
m_http_request(
m_http_request_delete(
"/" & PICS_ROOT_API & PX_ME_APP_Q_USERS_LOC_SUB_URI & "/" & PX_SUBSCRIPTION_ID, // TODO Shall be extract from Subscription request
"/" & PICS_ROOT_API & PX_ME_APP_Q_USERS_LOC_SUB_URI & "/" & oct2char(unichar2oct(PX_SUBSCRIPTION_ID, "UTF-8")), // TODO Shall be extract from Subscription request
v_headers
)
)
......@@ -421,7 +421,7 @@ module AtsMec_LocationAPI_TestCases {
httpPort.send(
m_http_request(
m_http_request_delete(
"/" & PICS_ROOT_API & PX_ME_APP_Q_USERS_LOC_SUB_URI & "/" & PX_SUBSCRIPTION_ID_UNKNOWN, // TODO Shall be extract from Subscription request
"/" & PICS_ROOT_API & PX_ME_APP_Q_USERS_LOC_SUB_URI & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_SUBSCRIPTION_ID, "UTF-8")), // TODO Shall be extract from Subscription request
v_headers
)
)
......@@ -479,7 +479,7 @@ module AtsMec_LocationAPI_TestCases {
httpPort.send(
m_http_request(
m_http_request_post(
"/" & PICS_ROOT_API & PX_ME_APP_Q_USERS_TRACK_SUB_URI & "/" & PX_SUBSCRIPTION_ID,
"/" & PICS_ROOT_API & PX_ME_APP_Q_USERS_TRACK_SUB_URI & "/" & oct2char(unichar2oct(PX_SUBSCRIPTION_ID, "UTF-8")),
v_headers
)
)
......@@ -494,7 +494,7 @@ module AtsMec_LocationAPI_TestCases {
mw_http_response_201_created(
mw_http_message_body_json(
mw_body_json_user_tracking_subscription(
mw_user_tracking_subscription_response(
mw_user_tracking_subscription(
PX_CLIENT_ID,
PX_CALLBACK_REF_URL,
PX_USER
......@@ -602,7 +602,7 @@ module AtsMec_LocationAPI_TestCases {
httpPort.send(
m_http_request(
m_http_request_delete(
"/" & PICS_ROOT_API & PX_ME_APP_Q_USERS_TRACK_SUB_URI & "/" & PX_SUBSCRIPTION_ID,
"/" & PICS_ROOT_API & PX_ME_APP_Q_USERS_TRACK_SUB_URI & "/" & oct2char(unichar2oct(PX_SUBSCRIPTION_ID, "UTF-8")),
v_headers
)
)
......@@ -656,7 +656,7 @@ module AtsMec_LocationAPI_TestCases {
httpPort.send(
m_http_request(
m_http_request_delete(
"/" & PICS_ROOT_API & PX_ME_APP_Q_USERS_TRACK_SUB_URI & "/" & PX_SUBSCRIPTION_ID_UNKNOWN,
"/" & PICS_ROOT_API & PX_ME_APP_Q_USERS_TRACK_SUB_URI & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_SUBSCRIPTION_ID, "UTF-8")),
v_headers
)
)
......
......@@ -45,7 +45,7 @@ module AtsMec_RadioNodeLocationAPI_TestCases {
* @desc 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
* @see https://forge.etsi.org/gitlab/mec/gs013-location-api/blob/master/LocationAPI.yaml#/definitions/AccessPointList
*/
testcase TP_MEC_SRV_RLOCLOOK_001_OK() runs on HttpComponent system HttpTestAdapter {
testcase TC_MEC_SRV_RLOCLOOK_001_OK() runs on HttpComponent system HttpTestAdapter {
// Local variables
var HeaderLines v_headers;
var HttpMessage v_response;
......@@ -98,12 +98,12 @@ module AtsMec_RadioNodeLocationAPI_TestCases {
// Postamble
f_cf_01_http_down();
} // End of testcase TP_MEC_SRV_RLOCLOOK_001_OK
} // End of testcase TC_MEC_SRV_RLOCLOOK_001_OK
/**
* @desc 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
*/
testcase TP_MEC_SRV_RLOCLOOK_001_NF() runs on HttpComponent system HttpTestAdapter {
testcase TC_MEC_SRV_RLOCLOOK_001_NF() runs on HttpComponent system HttpTestAdapter {
// Local variables
var HeaderLines v_headers;
......@@ -124,7 +124,7 @@ module AtsMec_RadioNodeLocationAPI_TestCases {
httpPort.send(
m_http_request(
m_http_request_get(
PX_ME_APP_Q_ZONE_ID_URI & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_ZONE_ID, "UTF-8")) & "/accessPoints",
"/" & PICS_ROOT_API & PX_ME_APP_Q_ZONE_ID_URI & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_ZONE_ID, "UTF-8")) & "/accessPoints",
v_headers
)
)
......@@ -151,7 +151,7 @@ module AtsMec_RadioNodeLocationAPI_TestCases {
// Postamble
f_cf_01_http_down();
} // End of testcase TP_MEC_SRV_RLOCLOOK_001_NF
} // End of testcase TC_MEC_SRV_RLOCLOOK_001_NF
} // End of group radioNodeLocationLookup
......@@ -165,7 +165,7 @@ module AtsMec_RadioNodeLocationAPI_TestCases {
/**
* @desc Check that the IUT acknowledges the UE area change subscription request when commanded by a MEC Application and notifies it when the UE enters the specified circle
*/
testcase TP_MEC_SRV_UEAREASUB_001_OK() runs on HttpComponent system HttpTestAdapter {
testcase TC_MEC_SRV_UEAREASUB_001_OK() runs on HttpComponent system HttpTestAdapter {
// Local variables
var HeaderLines v_headers;
var HttpMessage v_response;
......@@ -187,14 +187,14 @@ module AtsMec_RadioNodeLocationAPI_TestCases {
httpPort.send(
m_http_request(
m_http_request_post(
PX_UE_AREA_SUB_URI,
"/" & PICS_ROOT_API & oct2char(unichar2oct(PX_UE_AREA_SUB_URI, "UTF-8")),
v_headers,
m_http_message_body_json(
m_body_json_circle_notif_subscription(
m_circle_notif_subscription(
m_body_json_circle_notification_subscription(
m_circle_notification_subscription(
PX_CLIENT_ID, //clientCorrelator
PX_AREA_SUB_CALLBACK_URI, // callbackReference
PX_UE_IP_ADDRESS // address
PX_IP_ADDRESS // address
)
)
)
......@@ -210,14 +210,12 @@ module AtsMec_RadioNodeLocationAPI_TestCases {
mw_http_response(
mw_http_response_201_created(
mw_http_message_body_json(
mw_body_json_circle_notif_subscription(
mw_circle_notif_subscription(
mw_body_json_circle_notification_subscription(
mw_circle_notification_subscription(
PX_CLIENT_ID, //clientCorrelator
PX_AREA_SUB_CALLBACK_URI, // callbackReference
PX_UE_IP_ADDRESS // address
)
)
)))) {
PX_IP_ADDRESS // address
)))))) -> value v_response {
// TODO how to send this when the UE enters the area? The TP has the IUT doing this immediately. Do we want this or will it be discarded as part of the test?
// // MEC 013, clause 7.3.11.3
// the IUT entity sends a vPOST containing,
......@@ -231,7 +229,6 @@ module AtsMec_RadioNodeLocationAPI_TestCases {
// ;
// ;
// to the MEC_APP entity
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with a circleNotificationSubscription ***");
......@@ -245,15 +242,14 @@ module AtsMec_RadioNodeLocationAPI_TestCases {
// Postamble
f_cf_01_http_down();
} // End of testcase TP_MEC_SRV_UEAREASUB_001_OK
} // End of testcase TC_MEC_SRV_UEAREASUB_001_OK
/**
* @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application
*/
testcase TP_MEC_SRV_UEAREASUB_001_BR() runs on HttpComponent system HttpTestAdapter {
testcase TC_MEC_SRV_UEAREASUB_001_BR() runs on HttpComponent system HttpTestAdapter {
// Local variables
var HeaderLines v_headers;
var HttpMessage v_response;
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) {
......@@ -272,16 +268,16 @@ module AtsMec_RadioNodeLocationAPI_TestCases {
httpPort.send(
m_http_request(
m_http_request_post(
PX_UE_AREA_SUB_URI,
"/" & PICS_ROOT_API & oct2char(unichar2oct(PX_UE_AREA_SUB_URI, "UTF-8")),
v_headers,
m_http_message_body_json(
m_body_json_circle_notif_subscription(
m_circle_notif_subscription(
m_body_json_circle_notification_subscription(
m_circle_notification_subscription(
PX_CLIENT_ID, //clientCorrelator
// TODO the TP uses a wrong field name to trigger an error response. Do we create a new data structure just for this or
// change the test to use another trigger (e.g.: invalid IP address)?
PX_AREA_SUB_CALLBACK_URI, // callbackReference
PX_UE_IP_ADDRESS // address
PX_IP_ADDRESS // address
)
)
)
......@@ -295,9 +291,8 @@ module AtsMec_RadioNodeLocationAPI_TestCases {
alt {
[] httpPort.receive(
mw_http_response(
mw_http_response_400_bad_request()
mw_http_response_400_bad_request
)) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with 400 Bad Request ***");
......@@ -311,15 +306,14 @@ module AtsMec_RadioNodeLocationAPI_TestCases {
// Postamble
f_cf_01_http_down();
} // End of testcase TP_MEC_SRV_UEAREASUB_001_BR
} // End of testcase TC_MEC_SRV_UEAREASUB_001_BR
/**
* @desc Check that the IUT acknowledges the cancellation of UE area change notifications when commanded by a MEC Application
*/
testcase TP_MEC_SRV_UEAREASUB_002_OK() runs on HttpComponent system HttpTestAdapter {
testcase TC_MEC_SRV_UEAREASUB_002_OK() runs on HttpComponent system HttpTestAdapter {
// Local variables
var HeaderLines v_headers;
var HttpMessage v_response;
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) {
......@@ -338,8 +332,8 @@ module AtsMec_RadioNodeLocationAPI_TestCases {
httpPort.send(
m_http_request(
m_http_request_delete(
PX_UE_AREA_SUB_URI & oct2char(unichar2oct(PX_SUBSCRIPTION_ID, "UTF-8")),
v_headers,
"/" & PICS_ROOT_API & oct2char(unichar2oct(PX_UE_AREA_SUB_URI, "UTF-8")) & oct2char(unichar2oct(PX_SUBSCRIPTION_ID, "UTF-8")),
v_headers
)
)
);
......@@ -350,7 +344,7 @@ module AtsMec_RadioNodeLocationAPI_TestCases {
alt {
[] httpPort.receive(
mw_http_response(
mw_http_response_204_no_content()
mw_http_response_204_no_content
)) {
tc_ac.stop;
......@@ -366,15 +360,14 @@ module AtsMec_RadioNodeLocationAPI_TestCases {
// Postamble
f_cf_01_http_down();
} // End of testcase TP_MEC_SRV_UEAREASUB_002_OK
} // End of testcase TC_MEC_SRV_UEAREASUB_002_OK
/**
* @desc 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
*/
testcase TP_MEC_SRV_UEAREASUB_002_NF() runs on HttpComponent system HttpTestAdapter {
testcase TC_MEC_SRV_UEAREASUB_002_NF() runs on HttpComponent system HttpTestAdapter {
// Local variables
var HeaderLines v_headers;
var HttpMessage v_response;
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) {
......@@ -393,8 +386,8 @@ module AtsMec_RadioNodeLocationAPI_TestCases {
httpPort.send(
m_http_request(
m_http_request_delete(
PX_UE_AREA_SUB_URI & oct2char(unichar2oct(PX_NON_EXISTENT_SUBSCRIPTION_ID, "UTF-8")),
v_headers,
"/" & PICS_ROOT_API & oct2char(unichar2oct(PX_UE_AREA_SUB_URI, "UTF-8")) & oct2char(unichar2oct(PX_NON_EXISTENT_SUBSCRIPTION_ID, "UTF-8")),
v_headers
)
)
);
......@@ -405,7 +398,7 @@ module AtsMec_RadioNodeLocationAPI_TestCases {
alt {
[] httpPort.receive(
mw_http_response(
mw_http_response_404_not_found()
mw_http_response_404_not_found
)) {
tc_ac.stop;
......@@ -420,12 +413,10 @@ module AtsMec_RadioNodeLocationAPI_TestCases {
// Postamble
f_cf_01_http_down();
} // End of testcase TP_MEC_SRV_UEAREASUB_002_NF
} // End of testcase TC_MEC_SRV_UEAREASUB_002_NF
} // End of group ueAreaSubscribe
/*
* UE Distance Lookup (UEDISTLOOK)
*/
......@@ -434,10 +425,9 @@ module AtsMec_RadioNodeLocationAPI_TestCases {
/**
* @desc Check that the IUT responds with the distance to a UE when queried by a MEC Application
*/
testcase TP_MEC_SRV_UEDISTLOOK_001_OK() runs on HttpComponent system HttpTestAdapter {
testcase TC_MEC_SRV_UEDISTLOOK_001_OK() runs on HttpComponent system HttpTestAdapter {
// Local variables
var HeaderLines v_headers;
var HttpMessage v_response;
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) {
......@@ -456,7 +446,7 @@ module AtsMec_RadioNodeLocationAPI_TestCases {
httpPort.send(
m_http_request(
m_http_request_get(
PX_UE_LOC_QRY_URI & "?address=" & oct2char(unichar2oct(PX_UE_ADDRESS, "UTF-8")) & "&latitude=" & oct2char(unichar2oct(PX_UE_COORD_LAT, "UTF-8")) & "&longitude=" & oct2char(unichar2oct(PX_UE_COORD_LONG, "UTF-8"))
"/" & PICS_ROOT_API & oct2char(unichar2oct(PX_UE_LOC_QRY_URI, "UTF-8")) & "?address=" & oct2char(unichar2oct(PX_IP_ADDRESS, "UTF-8")) & "&latitude=" & float2str(PX_UE_COORD_LAT) & "&longitude=" & float2str(PX_UE_COORD_LONG),
v_headers
)
)
......@@ -468,12 +458,11 @@ module AtsMec_RadioNodeLocationAPI_TestCases {
alt {
[] httpPort.receive(
mw_http_response(
mw_http_response_200_ok(
mw_http_response_ok(
mw_http_message_body_json(
mw_body_json_terminal_distance(
mw_terminal_distance(?)
)
)))) {
mw_terminal_distance
))))) {
tc_ac.stop;
......@@ -488,15 +477,14 @@ module AtsMec_RadioNodeLocationAPI_TestCases {
// Postamble
f_cf_01_http_down();
} // End of testcase TP_MEC_SRV_UEDISTLOOK_001_OK
} // End of testcase TC_MEC_SRV_UEDISTLOOK_001_OK
/**
* @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application
*/
testcase TP_MEC_SRV_UEDISTLOOK_001_BR() runs on HttpComponent system HttpTestAdapter {
testcase TC_MEC_SRV_UEDISTLOOK_001_BR() runs on HttpComponent system HttpTestAdapter {
// Local variables
var HeaderLines v_headers;
var HttpMessage v_response;
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) {
......@@ -515,7 +503,7 @@ module AtsMec_RadioNodeLocationAPI_TestCases {
httpPort.send(
m_http_request(
m_http_request_get(
PX_UE_LOC_QRY_URI & "?address=" & oct2char(unichar2oct(PX_UE_ADDRESS, "UTF-8")) & "&lat=" & oct2char(unichar2oct(PX_UE_COORD_LAT, "UTF-8")) & "&longitude=" & oct2char(unichar2oct(PX_UE_COORD_LONG, "UTF-8"))
"/" & PICS_ROOT_API & oct2char(unichar2oct(PX_UE_LOC_QRY_URI, "UTF-8")) & "?address=" & oct2char(unichar2oct(PX_IP_ADDRESS, "UTF-8")) & "&lat=" & float2str(PX_UE_COORD_LAT) & "&longitude=" & float2str(PX_UE_COORD_LONG),
v_headers
)
)
......@@ -527,7 +515,7 @@ module AtsMec_RadioNodeLocationAPI_TestCases {
alt {
[] httpPort.receive(
mw_http_response(
mw_http_response_400_bad_request()
mw_http_response_400_bad_request
)) {
tc_ac.stop;
......@@ -543,12 +531,10 @@ module AtsMec_RadioNodeLocationAPI_TestCases {
// Postamble
f_cf_01_http_down();
} // End of testcase TP_MEC_SRV_UEDISTLOOK_001_BR
} // End of testcase TC_MEC_SRV_UEDISTLOOK_001_BR
} // End of group ueDistanceLookup
/*
* UE Distance Subscribe (UEDISTSUB)
*/
......@@ -557,7 +543,7 @@ module AtsMec_RadioNodeLocationAPI_TestCases {
/**
* @desc Check that the IUT acknowledges the UE distance subscription request when commanded by a MEC Application and notifies it when (all) the requested UE(s) is (are) within the specified distance
*/
testcase TP_MEC_SRV_UEDISTSUB_001_OK() runs on HttpComponent system HttpTestAdapter {
testcase TC_MEC_SRV_UEDISTSUB_001_OK() runs on HttpComponent system HttpTestAdapter {
// Local variables
var HeaderLines v_headers;
var HttpMessage v_response;
......@@ -579,15 +565,15 @@ module AtsMec_RadioNodeLocationAPI_TestCases {
httpPort.send(
m_http_request(
m_http_request_post(
PX_UE_DIST_SUB_URI,
"/" & PICS_ROOT_API & oct2char(unichar2oct(PX_UE_DIST_SUB_URI, "UTF-8")),
v_headers,
m_http_message_body_json(
m_body_json_distance_notif_subscription(
m_distance_notif_subscription(
m_body_json_distance_notification_subscription(
m_distance_notification_subscription(
PX_CLIENT_ID, //clientCorrelator
PX_UE_DIST_SUB_CALLBACK_URI, // callbackReference
PX_UE_MONITORED_IP_ADDRESS, // monitoredAddress
PX_UE_IP_ADDRESS // address
PX_IP_ADDRESS // address
)
)
)
......@@ -603,17 +589,16 @@ module AtsMec_RadioNodeLocationAPI_TestCases {
mw_http_response(
mw_http_response_201_created(
mw_http_message_body_json(
mw_body_json_distance_notif_subscription(
mw_distance_notif_subscription(
mw_body_json_distance_notification_subscription(
mw_distance_notification_subscription(
PX_CLIENT_ID, //clientCorrelator
PX_UE_DIST_SUB_CALLBACK_URI, // callbackReference
PX_UE_MONITORED_IP_ADDRESS, // monitoredAddress
PX_UE_IP_ADDRESS // address
)
)
)))) {
PX_IP_ADDRESS // address
)))))) -> value v_response {
// TODO how to send this when the UE enters the area? The TP has the IUT doing this immediately. Do we want this or will it be discarded as part of the test?
// // MEC 013, clause 7.3.11.3
//
// MEC 013, clause 7.3.11.3
// the IUT entity sends a vPOST containing, // uri indicating value CALLBACK_URL
// body containing
// subscriptionNotification containing
......@@ -638,15 +623,14 @@ module AtsMec_RadioNodeLocationAPI_TestCases {
// Postamble
f_cf_01_http_down();
} // End of testcase TP_MEC_SRV_UEDISTSUB_001_OK
} // End of testcase TC_MEC_SRV_UEDISTSUB_001_OK
/**
* @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application
*/
testcase TP_MEC_SRV_UEDISTSUB_001_BR() runs on HttpComponent system HttpTestAdapter {
testcase TC_MEC_SRV_UEDISTSUB_001_BR() runs on HttpComponent system HttpTestAdapter {
// Local variables
var HeaderLines v_headers;
var HttpMessage v_response;
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) {
......@@ -665,17 +649,17 @@ module AtsMec_RadioNodeLocationAPI_TestCases {
httpPort.send(
m_http_request(
m_http_request_post(
PX_UE_DIST_SUB_URI,
"/" & PICS_ROOT_API & oct2char(unichar2oct(PX_UE_DIST_SUB_URI, "UTF-8")),
v_headers,
m_http_message_body_json(
m_body_json_distance_notif_subscription(
m_body_json_distance_notification_subscription(
// TODO the TP uses a wrong field name to trigger an error response. Do we create a new data structure just for this or
// change the test to use another trigger (e.g.: invalid IP address)?
m_distance_notif_subscription(
m_distance_notification_subscription(
PX_CLIENT_ID, //clientCorrelator
PX_UE_DIST_SUB_CALLBACK_URI, // callbackReference
PX_UE_MONITORED_IP_ADDRESS, // monitoredAddress
PX_UE_IP_ADDRESS // address
PX_IP_ADDRESS // address
)
)
)
......@@ -689,7 +673,7 @@ module AtsMec_RadioNodeLocationAPI_TestCases {
alt {
[] httpPort.receive(
mw_http_response(
mw_http_response_400_bad_request()
mw_http_response_400_bad_request
)) {
tc_ac.stop;
......@@ -705,15 +689,14 @@ module AtsMec_RadioNodeLocationAPI_TestCases {
// Postamble
f_cf_01_http_down();
} // End of testcase TP_MEC_SRV_UEDISTSUB_001_BR
} // End of testcase TC_MEC_SRV_UEDISTSUB_001_BR
/**
* @desc Check that the IUT acknowledges the cancellation of UE distance notifications when commanded by a MEC Application
*/
testcase TP_MEC_SRV_UEDISTSUB_002_OK() runs on HttpComponent system HttpTestAdapter {
testcase TC_MEC_SRV_UEDISTSUB_002_OK() runs on HttpComponent system HttpTestAdapter {
// Local variables
var HeaderLines v_headers;
var HttpMessage v_response;
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) {
......@@ -732,8 +715,8 @@ module AtsMec_RadioNodeLocationAPI_TestCases {
httpPort.send(
m_http_request(
m_http_request_delete(
PX_UE_DIST_SUB_URI & oct2char(unichar2oct(PX_SUBSCRIPTION_ID, "UTF-8")),
v_headers,
"/" & PICS_ROOT_API & oct2char(unichar2oct(PX_UE_DIST_SUB_URI, "UTF-8")) & oct2char(unichar2oct(PX_SUBSCRIPTION_ID, "UTF-8")),
v_headers
)
)
);
......@@ -760,15 +743,14 @@ module AtsMec_RadioNodeLocationAPI_TestCases {
// Postamble
f_cf_01_http_down();
} // End of testcase TP_MEC_SRV_UEDISTSUB_002_OK
} // End of testcase TC_MEC_SRV_UEDISTSUB_002_OK
/**
* @desc 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
*/
testcase TP_MEC_SRV_UEDISTSUB_002_NF() runs on HttpComponent system HttpTestAdapter {
testcase TC_MEC_SRV_UEDISTSUB_002_NF() runs on HttpComponent system HttpTestAdapter {
// Local variables
var HeaderLines v_headers;
var HttpMessage v_response;
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) {
......@@ -787,8 +769,8 @@ module AtsMec_RadioNodeLocationAPI_TestCases {
httpPort.send(
m_http_request(
m_http_request_delete(
PX_UE_DIST_SUB_URI & oct2char(unichar2oct(PX_NON_EXISTING_SUBSCRIPTION_ID, "UTF-8")),
v_headers,
"/" & PICS_ROOT_API & oct2char(unichar2oct(PX_UE_DIST_SUB_URI, "UTF-8")) & oct2char(unichar2oct(PX_NON_EXISTENT_SUBSCRIPTION_ID, "UTF-8")),
v_headers
)
)
);
......@@ -815,12 +797,10 @@ module AtsMec_RadioNodeLocationAPI_TestCases {
// Postamble
f_cf_01_http_down();
} // End of testcase TP_MEC_SRV_UEDISTSUB_002_NF
} // End of testcase TC_MEC_SRV_UEDISTSUB_002_NF
} // End of group ueDistanceSubscribe
/*
* UE Information Lookup (UEINFOLOOK)
*/
......@@ -829,10 +809,9 @@ module AtsMec_RadioNodeLocationAPI_TestCases {
/**
* @desc Check that the IUT responds with the information pertaining to one or more UEs in a particular location when queried by a MEC Application
*/
testcase TP_MEC_SRV_UEINFOLOOK_001_OK() runs on HttpComponent system HttpTestAdapter {
testcase TC_MEC_SRV_UEINFOLOOK_001_OK() runs on HttpComponent system HttpTestAdapter {
// Local variables
var HeaderLines v_headers;
var HttpMessage v_response;
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) {
......@@ -851,7 +830,7 @@ module AtsMec_RadioNodeLocationAPI_TestCases {
httpPort.send(
m_http_request(
m_http_request_get(
PX_UE_LOC_USERS_URI & "?address=" & oct2char(unichar2oct(PX_ACR_SOME_IP, "UTF-8"))
"/" & PICS_ROOT_API & oct2char