From c3a387cdb19e2dd69027f26db06b6f8c7edbbcbd Mon Sep 17 00:00:00 2001 From: Gabriele Scivoletto Date: Fri, 16 Feb 2024 17:37:16 +0100 Subject: [PATCH] fixed some bugs in MEC028 (bad filters) --- MEC021/SRV/AMS/AMSService.robot | 74 ++++++++++++++++---- MEC021/SRV/AMS/environment/variables.txt | 4 +- MEC028/WAI/AP_INFO/WaiApInfo.robot | 4 +- MEC028/WAI/AP_INFO/environment/variables.txt | 6 +- 4 files changed, 70 insertions(+), 18 deletions(-) diff --git a/MEC021/SRV/AMS/AMSService.robot b/MEC021/SRV/AMS/AMSService.robot index f37cd12..27a88f5 100644 --- a/MEC021/SRV/AMS/AMSService.robot +++ b/MEC021/SRV/AMS/AMSService.robot @@ -57,7 +57,7 @@ TC_MEC_MEC021_SRV_AMS_001_OK_02 [Setup] Create two new application mobility service ${APP_MOBILITY_SERVICE_ID} ${APP_INS_ID} ${APP_MOBILITY_SERVICE_ID2} ${APP_INS_ID} - Get Registered AMS information using attribute-selector filter ${APP_MOBILITY_SERVICE_FILTER} + Get Registered AMS information using attribute-selector filter ${APP_MOBILITY_SERVICE_FILTER_APP_MOBILITY_SERVICE_ID} Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is AppMobilityServiceInfos @@ -73,40 +73,90 @@ TC_MEC_MEC021_SRV_AMS_001_OK_02 [TearDown] Delete two specific AMS services ${APP_MOBILITY_SERVICE_ID} ${APP_MOBILITY_SERVICE_ID2} -TC_MEC_MEC021_SRV_AMS_002_OK - [Documentation] Request Registered AMS information using attribute-selector - ... Check that the AMS service returns information about the registered application mobility services when requested +TC_MEC_MEC021_SRV_AMS_001_OK_03 + [Documentation] Request Registered AMS information + ... Check that the AMS service returns information about the a specific registered application mobility service when requested - filter ... ETSI GS MEC 021 3.3.1, clause 8.3.3.1 ... Reference https://forge.etsi.org/rep/mec/gs021-amsi-api/-/blob/master/MEC021_AppMobilityService.yaml [Tags] PIC_AMS INCLUDE_UNDEFINED_SCHEMAS - Get Registered AMS information using attribute-selector appMobilityServiceId ${APP_MOBILITY_SERVICE_ID} + + [Setup] Create two new application mobility service ${APP_MOBILITY_SERVICE_ID} ${APP_INS_ID} ${APP_MOBILITY_SERVICE_ID2} ${APP_INS_ID} + + Get Registered AMS information using attribute-selector filter ${APP_MOBILITY_SERVICE_FILTER_SERVICE_CONSUMER_ID} Check HTTP Response Status Code Is 200 - Check HTTP Response Body Json Schema Is AppMobilityServiceInfos + Check HTTP Response Body Json Schema Is AppMobilityServiceInfos + FOR ${app} IN @{response['body']} - ${passed} Run Keyword And Return Status Should Be Equal As Strings ${app['appMobilityServiceId']} ${APP_MOBILITY_SERVICE_ID} - Exit For Loop If ${passed} + ${passed_appMobilityServiceId} Run Keyword And Return Status Should Be Equal As Strings ${app['appMobilityServiceId']} ${APP_MOBILITY_SERVICE_ID} + ${passed_appInstanceId} Run Keyword And Return Status Should Be Equal As Strings ${app['serviceConsumerId']['appInstanceId']} ${APP_INS_ID} + Exit For Loop If ${passed_appMobilityServiceId} and ${passed_appInstanceId} END - + + [TearDown] Delete two specific AMS services ${APP_MOBILITY_SERVICE_ID} ${APP_MOBILITY_SERVICE_ID2} + + +TC_MEC_MEC021_SRV_AMS_001_OK_04 + [Documentation] Request Registered AMS information + ... Check that the AMS service returns information about the a specific registered application mobility service when requested - filter + ... ETSI GS MEC 021 3.3.1, clause 8.3.3.1 + ... Reference https://forge.etsi.org/rep/mec/gs021-amsi-api/-/blob/master/MEC021_AppMobilityService.yaml + [Tags] PIC_AMS INCLUDE_UNDEFINED_SCHEMAS + + [Setup] Create two new application mobility service ${APP_MOBILITY_SERVICE_ID} ${APP_INS_ID} ${APP_MOBILITY_SERVICE_ID2} ${APP_INS_ID} + + Get Registered AMS information using attribute-selector filter ${APP_MOBILITY_SERVICE_FILTER_EXCLUDE_FIELDS} + Check HTTP Response Status Code Is 200 + #Check HTTP Response Body Json Schema Is AppMobilityServiceInfos + + FOR ${app} IN @{response['body']} + Should Be Equal As Strings ${app['appMobilityServiceId']} ${APP_MOBILITY_SERVICE_ID} + Should Not Contain ${app} serviceConsumerId + END + + [TearDown] Delete two specific AMS services ${APP_MOBILITY_SERVICE_ID} ${APP_MOBILITY_SERVICE_ID2} + +#TC_MEC_MEC021_SRV_AMS_001_OK_05 +# [Documentation] Request Registered AMS information +# ... Check that the AMS service returns information about the registered application mobility services when requested - No registered application mobility service +# ... ETSI GS MEC 021 3.3.1, clause 8.3.3.1 +# ... Reference https://forge.etsi.org/rep/mec/gs021-amsi-api/-/blob/master/MEC021_AppMobilityService.yaml +# [Tags] PIC_AMS INCLUDE_UNDEFINED_SCHEMAS + + TC_MEC_MEC021_SRV_AMS_001_BR [Documentation] Request Registered AMS information using bad parameters ... Check that the AMS service returns an error when receives a query about a registered application mobility service with wrong parameters ... ETSI GS MEC 021 3.3.1, clause 8.3.3.1 + ... Reference https://forge.etsi.org/rep/mec/gs021-amsi-api/-/blob/master/MEC021_AppMobilityService.yaml [Tags] PIC_AMS INCLUDE_UNDEFINED_SCHEMAS Get Registered AMS information using bad parameters Check HTTP Response Status Code Is 400 + # Post ${apiRoot}/${apiName}/${apiVersion}/app_mobility_services -TC_MEC_MEC021_SRV_AMS_003_OK +TC_MEC_MEC021_SRV_AMS_002_OK [Documentation] Register a new application mobility services ... Check that the AMS service creates a new application mobility services when requested ... ETSI GS MEC 021 3.3.1, clause 8.3.3.4 ... Reference https://forge.etsi.org/rep/mec/gs021-amsi-api/-/blob/master/MEC021_AppMobilityService.yaml [Tags] PIC_AMS INCLUDE_UNDEFINED_SCHEMAS - Create a new application mobility service ${APP_MOBILITY_SERVICE_ID} + Create a new application mobility service ${APP_MOBILITY_SERVICE_ID} ${APP_INS_ID} Check HTTP Response Status Code Is 201 Check HTTP Response Body Json Schema Is AppMobilityServiceInfo - Should Be Equal As Strings ${response['body']['appMobilityServiceId']} ${APP_MOBILITY_SERVICE_ID} + Should Be Equal As Strings ${response['body']['appMobilityServiceId']} ${APP_MOBILITY_SERVICE_ID} + Should Be Equal As Strings ${response['body']['serviceConsumerId']['appInstanceId']} ${APP_INS_ID} + + +TC_MEC_MEC021_SRV_AMS_002_BR + [Documentation] Request Registered AMS information using bad parameters + ... Check that the AMS service returns an error when receives a query about a registered application mobility service with wrong parameters + ... ETSI GS MEC 021 3.3.1, clause 8.3.3.4 + ... Reference https://forge.etsi.org/rep/mec/gs021-amsi-api/-/blob/master/MEC021_AppMobilityService.yaml + [Tags] PIC_AMS INCLUDE_UNDEFINED_SCHEMAS + + + TC_MEC_MEC021_SRV_AMS_003_BR [Documentation] Register an UE Identity Tag using invalid parameter diff --git a/MEC021/SRV/AMS/environment/variables.txt b/MEC021/SRV/AMS/environment/variables.txt index 51c7216..045ce68 100644 --- a/MEC021/SRV/AMS/environment/variables.txt +++ b/MEC021/SRV/AMS/environment/variables.txt @@ -13,7 +13,9 @@ ${apiVersion} v1 ${APP_MOBILITY_SERVICE_ID} APP_MOBILITY_SERVICE_ID ${APP_MOBILITY_SERVICE_ID2} APP_MOBILITY_SERVICE_ID2 ${MALFORMED_APP_MOBILITY_SERVICE_ID} MALFORMED_APP_MOBILITY_SERVICE_ID -${APP_MOBILITY_SERVICE_FILTER} (eq,appMobilityServiceId,APP_MOBILITY_SERVICE) +${APP_MOBILITY_SERVICE_FILTER_APP_MOBILITY_SERVICE_ID} (eq,appMobilityServiceId,APP_MOBILITY_SERVICE_ID) +${APP_MOBILITY_SERVICE_FILTER_SERVICE_CONSUMER_ID} (eq,serviceConsumerId[appInstanceId],5abe4782-2c70-4e47-9a4e-0ee3a1a0fd1f) +${APP_MOBILITY_SERVICE_FILTER_EXCLUDE_FIELDS} (eq,appMobilityServiceId,APP_MOBILITY_SERVICE_ID)&exclude_fields=[serviceConsumerId] ${APP_INS_ID} 5abe4782-2c70-4e47-9a4e-0ee3a1a0fd1f ${SUBSCRIPTION_TYPE} MobilityProcedureSubscription ${SUBSCRIPTION_ID} e0deee2b-6e50-4f33-ab09-8bf0585025d3 diff --git a/MEC028/WAI/AP_INFO/WaiApInfo.robot b/MEC028/WAI/AP_INFO/WaiApInfo.robot index 39b43c5..a6a94ab 100644 --- a/MEC028/WAI/AP_INFO/WaiApInfo.robot +++ b/MEC028/WAI/AP_INFO/WaiApInfo.robot @@ -22,7 +22,7 @@ TC_MEC_MEC028_SRV_WAI_001_OK Check HTTP Response Body Json Schema Is ApInfo ## Post condition FOR ${apInfo} IN @{response['body']} - ${passed} Run Keyword And Return Status Should Be Equal As Strings ${apInfo['apId']['macId']} ${MAC_ID} + ${passed} Run Keyword And Return Status Should Be Equal As Strings ${apInfo['apId']['bssid']} ${BSS_ID} Exit For Loop If ${passed} END Should Be True ${passed} @@ -39,7 +39,7 @@ TC_MEC_MEC028_SRV_WAI_002_OK Check HTTP Response Body Json Schema Is ApInfo ## Post condition FOR ${apInfo} IN @{response['body']} - ${passed} Run Keyword And Return Status Should Be Equal As Strings ${apInfo['apId']['macId']} ${MAC_ID} + ${passed} Run Keyword And Return Status Should Be Equal As Strings ${apInfo['apId']['bssid']} ${BSS_ID} Exit For Loop If ${passed} END Should Be True ${passed} diff --git a/MEC028/WAI/AP_INFO/environment/variables.txt b/MEC028/WAI/AP_INFO/environment/variables.txt index b368c61..c19b668 100644 --- a/MEC028/WAI/AP_INFO/environment/variables.txt +++ b/MEC028/WAI/AP_INFO/environment/variables.txt @@ -9,9 +9,9 @@ ${MEC-APP_PORT} 3001 ${TOKEN} Basic YWxhZGRpbjpvcGVuc2VzYW1l -${MAC_ID} macId01 -${filter} macId01 -${bad_filter} badMacId +${BSS_ID} bssId01 +${filter} (eq,bssid,bssId01) +${bad_filter} (eq,bss_id,bssId01) ${REGISTER_ACTION} REGISTER ${REMOVE_ACTION} REMOVE -- GitLab