diff --git a/SRV/RNIS/RnisQuery_BV.robot b/SRV/RNIS/RnisQuery_BV.robot index f720677982a0489ee575f5a3c90542e49607ee77..92a3b89917a628b30b8e438c83946bd90a949b2d 100644 --- a/SRV/RNIS/RnisQuery_BV.robot +++ b/SRV/RNIS/RnisQuery_BV.robot @@ -11,46 +11,45 @@ Library REST ${MEC-APP_SCHEMA}://${MEC-APP_HOST}:${MEC-APP_PORT} ssl_v *** Test Cases *** -Request RNIS subscription list - [Documentation] TC_MEC_SRV_RNIS_011_OK - ... Check that the RNIS service sends the list of links to the relevant RNIS subscriptions when requested - ... ETSI GS MEC 012 2.0.4, clause 7.6.3.1 - ... Reference https://forge.etsi.org/gitlab/mec/gs012-rnis-api/blob/master/RniAPI.yaml#/definitions/SubscriptionLinkList - Get RNIS subscription list +Request RabInfo info + [Documentation] TC_MEC_SRV_RNIS_016_OK + ... Check that the RNIS service returns the RAB information when requested + ... ETSI GS MEC 012 2.0.4, clause 7.3.3.1 + ... Reference https://forge.etsi.org/gitlab/mec/gs012-rnis-api/blob/master/RniAPI.yaml#/definitions/RabInfo + Get RabInfo info Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is RadioNetworkInformationAPI - Check Subscription ${response['body']['SubscriptionLinkList']} ${SUBSCRIPTION_VALUE} + Check RabInfo ${response['body']['RabInfo']} -Create RNIS subscription - [Documentation] TC_MEC_SRV_RNIS_012_OK - ... Check that the RNIS service creates a new RNIS subscription - ... ETSI GS MEC 012 2.0.4, clause 7.6.3.4 - ... Reference https://forge.etsi.org/gitlab/mec/gs012-rnis-api/blob/master/RniAPI.yaml - Post RNIS subscription request {"CellChangeSubscription": {"subscriptionType": CELL_CHANGE, "callbackReference": "${HREF}", "_links": {"self": "${LINKS_SELF}"}, "filterCriteria": {"appInsId": "01", "associateId": [{"type": "UE_IPV4_ADDRESS", "value": 1}], "plmn": {"mcc": "01", "mnc": "001"}, "cellId": ["800000"], "hoStatus": "COMPLETED"}, "expiryDeadline": {"seconds": 1577836800, "nanoSeconds": 0}}} - Check HTTP Response Status Code Is 201 +Request Plmn info + [Documentation] TC_MEC_SRV_RNIS_017_OK + ... Check that the RNIS service returns the PLMN information when requested + ... ETSI GS MEC 012 2.0.4, clause 7.4.3.1 + ... Reference https://forge.etsi.org/gitlab/mec/gs012-rnis-api/blob/master/RniAPI.yaml#/definitions/PlmnInfo + Get PLMN info + Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is RadioNetworkInformationAPI - Check CellChangeSubscription ${response['body']['CellChangeSubscription']} + Check PlmnInfo ${response['body']['PlmnInfo']} *** Keywords *** -Get RNIS subscription list +Get RabInfo info Should Be True ${PIC_RNIS_SPECIFIC_SUBSCRIPTION} == 1 Set Headers {"Accept":"application/json"} Set Headers {"Content-Type":"application/json"} Set Headers {"Authorization":"${TOKEN}"} Set Headers {"Content-Length":"0"} - Get /exampleAPI/rni/v2/subscriptions?subscription_type=${SUBSCRIPTION_HREF_VALUE} + Get /exampleAPI/rni/v2/queries?cell_id=${CELL_ID} ${output}= Output response Set Suite Variable ${response} ${output} - -Post RNIS subscription request - [Arguments] ${content} +Get Plmn info Should Be True ${PIC_RNIS_SPECIFIC_SUBSCRIPTION} == 1 Set Headers {"Accept":"application/json"} Set Headers {"Content-Type":"application/json"} Set Headers {"Authorization":"${TOKEN}"} - Post /exampleAPI/rni/v2/subscriptions ${content} + Set Headers {"Content-Length":"0"} + Get /exampleAPI/rni/v2/queries?plmn_info=${APP_INS_ID} ${output}= Output response Set Suite Variable ${response} ${output} diff --git a/SRV/RNIS/RnisSpecificSubscription_BI_BO.robot b/SRV/RNIS/RnisSpecificSubscription_BI_BO.robot index d0ddb2a56dc1a9dcf2de0f6597c6b100150cea2a..f8c4d02b72c45f17ddb670e2a0e00ec6da6d13c5 100644 --- a/SRV/RNIS/RnisSpecificSubscription_BI_BO.robot +++ b/SRV/RNIS/RnisSpecificSubscription_BI_BO.robot @@ -26,7 +26,7 @@ Create RNIS subscription using bad parameters ... Check that the RNIS service responds with an error when it receives a request to create a new RNIS subscription with a wrong format ... ETSI GS MEC 012 2.0.4, clause 7.6.3.4 ... Reference https://forge.etsi.org/gitlab/mec/gs012-rnis-api/blob/master/RniAPI.yaml - Post RNIS subscription request {"CellChangeSubscription": {"subscriptionType": WRONG_PARAMETER, "callbackReference": "${HREF}", "_links": {"self": "${LINKS_SELF}"}, "filterCriteria": {"appInsId": "01", "associateId": [{"type": "UE_IPV4_ADDRESS", "value": 1}], "plmn": {"mcc": "01", "mnc": "001"}, "cellId": ["800000"], "hoStatus": "COMPLETED"}, "expiryDeadline": {"seconds": 1577836800, "nanoSeconds": 0}}} + Post RNIS subscription request {"CellChangeSubscription": {"subscriptionType": "CelCangeSubscription", "callbackReference": "${HREF}", "_links": {"self": "${LINKS_SELF}"}, "filterCriteria": {"appInsId": "01", "associateId": [{"type": "UE_IPV4_ADDRESS", "value": 1}], "plmn": {"mcc": "01", "mnc": "001"}, "cellId": ["800000"], "hoStatus": "COMPLETED"}, "expiryDeadline": {"seconds": 1577836800, "nanoSeconds": 0}}} Check HTTP Response Status Code Is 400 Check ProblemDetails 400 @@ -38,6 +38,17 @@ Get RNIS subscription list with wrong parameter Set Headers {"Content-Type":"application/json"} Set Headers {"Authorization":"${TOKEN}"} Set Headers {"Content-Length":"0"} - Post /exampleAPI/rni/v2/subscriptions?subscription_type=InvalidSubscriptionRef + Get /exampleAPI/rni/v2/subscriptions?subscription_type=wrongSubscriptionType + ${output}= Output response + Set Suite Variable ${response} ${output} + + +Post RNIS subscription request + [Arguments] ${content} + Should Be True ${PIC_RNIS_SPECIFIC_SUBSCRIPTION} == 1 + Set Headers {"Accept":"application/json"} + Set Headers {"Content-Type":"application/json"} + Set Headers {"Authorization":"${TOKEN}"} + Post /exampleAPI/rni/v2/subscriptions ${content} ${output}= Output response Set Suite Variable ${response} ${output} diff --git a/SRV/RNIS/RnisSpecificSubscription_BV.robot b/SRV/RNIS/RnisSpecificSubscription_BV.robot index 4c3dfc78abfd0f8725e490cc89d1e236e94e4f42..501201edba0781eb0f9002c5119047975452251a 100644 --- a/SRV/RNIS/RnisSpecificSubscription_BV.robot +++ b/SRV/RNIS/RnisSpecificSubscription_BV.robot @@ -27,7 +27,7 @@ Create RNIS subscription ... Check that the RNIS service creates a new RNIS subscription ... ETSI GS MEC 012 2.0.4, clause 7.6.3.4 ... Reference https://forge.etsi.org/gitlab/mec/gs012-rnis-api/blob/master/RniAPI.yaml - Post RNIS subscription request {"CellChangeSubscription": {"subscriptionType": CELL_CHANGE, "callbackReference": "${HREF}", "_links": {"self": "${LINKS_SELF}"}, "filterCriteria": {"appInsId": "01", "associateId": [{"type": "UE_IPV4_ADDRESS", "value": 1}], "plmn": {"mcc": "01", "mnc": "001"}, "cellId": ["800000"], "hoStatus": "COMPLETED"}, "expiryDeadline": {"seconds": 1577836800, "nanoSeconds": 0}}} + Post RNIS subscription request {"CellChangeSubscription": {"subscriptionType": "CELL_CHANGE", "callbackReference": "${HREF}", "_links": {"self": "${LINKS_SELF}"}, "filterCriteria": {"appInsId": "01", "associateId": [{"type": "UE_IPV4_ADDRESS", "value": 1}], "plmn": {"mcc": "01", "mnc": "001"}, "cellId": ["800000"], "hoStatus": "COMPLETED"}, "expiryDeadline": {"seconds": 1577836800, "nanoSeconds": 0}}} Check HTTP Response Status Code Is 201 Check HTTP Response Body Json Schema Is RadioNetworkInformationAPI Check CellChangeSubscription ${response['body']['CellChangeSubscription']} diff --git a/SRV/RNIS/environment/variables.txt b/SRV/RNIS/environment/variables.txt index 8e2f49e960f7abc2fd02271a2fcb1a0f5f091a9c..917508089616097461ca41e8473efd6976d33bb0 100644 --- a/SRV/RNIS/environment/variables.txt +++ b/SRV/RNIS/environment/variables.txt @@ -11,5 +11,7 @@ ${SUBSCRIPTION_HREF_VALUE} cell_changed ${SUBSCRIPTION_TYPE} CELL_CHANGE ${HREF} http://meAppClient.example.com/rni/v1/notifications/cell_change/77777 ${SUBSCRIPTION_VALUE} {'href': '${HREF}', 'subscriptionType': '${SUBSCRIPTION_TYPE}'} +${CELL_ID} 0x800000A +${APP_INS_ID} 01 ${response} {} ${TOKEN} Basic YWxhZGRpbjpvcGVuc2VzYW1l diff --git a/SRV/RNIS/resources/RadioNetworkInformationAPI.robot b/SRV/RNIS/resources/RadioNetworkInformationAPI.robot index 946be1c2ad425a28612ada281fc5f811e67186a7..90eb6c9f5b90709ce0527bbddf84ebbd73cacbbf 100644 --- a/SRV/RNIS/resources/RadioNetworkInformationAPI.robot +++ b/SRV/RNIS/resources/RadioNetworkInformationAPI.robot @@ -1,7 +1,7 @@ *** Settings *** Resource ../environment/variables.txt -Resource ../environment/pics.txt -Resource GenericKeywords.robot +Resource ../../../pics.txt +Resource ../../../GenericKeywords.robot Library REST ${MEC-APP_SCHEMA}://${MEC-APP_HOST}:${MEC-APP_PORT} ssl_verify=false Library JSONSchemaLibrary schemas/ @@ -19,3 +19,20 @@ Check Subscription Check CellChangeSubscription [Arguments] ${received_value} Should Be Equal ${received_value['_links']['self']} ${LINKS_SELF} + + +Check RabInfo + [Arguments] ${received_value} + Should Be Equal ${received_value['appInsId']} ${APP_INS_ID} + Should Not Contain ${received_value['requestId']} "" + Should Be Equal ${received_value['cellUserInfo']['ecgi']['cellId']} ${CELL_ID} + # TODO How to check the presence of a field + + +Check PlmnInfo + [Arguments] ${received_value} + Should Be Equal ${received_value['appInsId']} ${APP_INS_ID} + Should Be Equal ${received_value['ecgi']['cellId']} ${CELL_ID} + Should Not Contain ${received_value['ecgi']['plmn']['mcc']} "" + Should Not Contain ${received_value['ecgi']['plmn']['mnc']} "" + # TODO How to check the presence of a field