diff --git a/MEC012/SRV/RNIS/RnisAllSubscriptions.robot b/MEC012/SRV/RNIS/RnisAllSubscriptions.robot index 2bdc4f8f6d728808fc1860582d6702a712ca32ab..465efd75af14ede302faf68a4bed66ed44179047 100644 --- a/MEC012/SRV/RNIS/RnisAllSubscriptions.robot +++ b/MEC012/SRV/RNIS/RnisAllSubscriptions.robot @@ -2,7 +2,7 @@ ... Test Suite to validate RNIS/Subscription (RNIS) operations. *** Settings *** -Resource environment/variables.txt +Resource environment/variables_sandbox.txt Resource ../../../pics.txt Resource ../../../GenericKeywords.robot #Resource resources/RadioNetworkInformationAPI.robot @@ -54,7 +54,7 @@ TC_MEC_MEC012_SRV_RNIS_012_OK ... Check that the RNIS service creates a new RNIS subscription ... ETSI GS MEC 012 2.2.1, clause 7.6.3.4 ... Reference https://forge.etsi.org/rep/mec/gs012-rnis-api/blob/automatic_generation/RniAPI.yaml - [Setup] Send a request for a subscription and get sub ID CellChangeSubscription + Send a request for a subscription and get sub ID CellChangeSubscription ${sub_type} Get value entry from JSON file CellChangeSubscription subscriptionType ${callback_ref} Get value entry from JSON file CellChangeSubscription callbackReference Check HTTP Response Status Code Is 201 @@ -89,7 +89,7 @@ Send a request for a subscription and get sub ID [Arguments] ${content} Send a request for a subscription ${content} ${elements} = Split String ${response['headers']['Location']} / - Set Suite Variable ${SUB_ID} ${elements[4]} + Set Suite Variable ${SUB_ID} ${elements[-1]} Send a request for a subscription @@ -99,6 +99,7 @@ Send a request for a subscription Set Headers {"Authorization":"${TOKEN}"} ${file}= Catenate SEPARATOR= jsons/ ${content} .json ${body}= Get File ${file} + Log ${apiRoot}/${apiName}/${apiVersion}/subscriptions Post ${apiRoot}/${apiName}/${apiVersion}/subscriptions ${body} ${output}= Output response Set Suite Variable ${response} ${output} diff --git a/MEC012/SRV/RNIS/RnisNotifications.robot b/MEC012/SRV/RNIS/RnisNotifications.robot index 984ac7636b6204d07bd03fef870dc78ed6816b5d..d02296eb219101d0d6a0bf28610feef5ab78a8c9 100644 --- a/MEC012/SRV/RNIS/RnisNotifications.robot +++ b/MEC012/SRV/RNIS/RnisNotifications.robot @@ -2,7 +2,6 @@ ... Test Suite to validate RNIS/Notification (RNIS) operations. *** Settings *** - Resource environment/variables.txt Resource ../../../pics.txt Resource ../../../GenericKeywords.robot diff --git a/MEC012/SRV/RNIS/RnisQuery.robot b/MEC012/SRV/RNIS/RnisQuery.robot index 4bddb1d3362bcff4196e4d75b908cca6ba4a8707..ea28910298294ebe9b802349c363fea331864f3a 100644 --- a/MEC012/SRV/RNIS/RnisQuery.robot +++ b/MEC012/SRV/RNIS/RnisQuery.robot @@ -2,7 +2,7 @@ ... Test Suite to validate RNIS/Subscription (RNIS) operations. *** Settings *** -Resource environment/variables.txt +Resource environment/variables_sandbox.txt Resource ../../../pics.txt Resource ../../../GenericKeywords.robot Resource resources/RadioNetworkInformationAPI.robot @@ -13,7 +13,8 @@ Library REST ${MEC-APP_SCHEMA}://${MEC-APP_HOST}:${MEC-APP_PORT} ssl_v *** Test Cases *** TC_MEC_MEC012_SRV_RNIS_016_BR [Documentation] Request RabInfo info using wrong parameters - ... Check that the RNIS service returns an error when the RAB information is requested with a malformatted message + ... Check that the RNIS service returns an error when the RAB + ... information is requested with a malformatted message ... ETSI GS MEC 012 2.2.1, clause 7.3.3.1 ... Reference https://forge.etsi.org/gitlab/mec/gs012-rnis-api/blob/master/RniAPI.yaml#/definitions/RabInfo Get RabInfo info using wrong parameters @@ -83,7 +84,7 @@ TC_MEC_MEC012_SRV_RNIS_019_NF ... ETSI GS MEC 012 2.2.1, clause 7.5a.3.1 ... Reference https://forge.etsi.org/gitlab/mec/gs012-rnis-api/blob/master/RniAPI.yaml#/definitions/S1BearerInfo Get L2Meas info using non existing cell id - Check HTTP Response Status Code Is 200 + Check HTTP Response Status Code Is 404 TC_MEC_MEC012_SRV_RNIS_016_OK diff --git a/MEC012/SRV/RNIS/RnisSpecificSubscription.robot b/MEC012/SRV/RNIS/RnisSpecificSubscription.robot index 20617a7997487d7c8f1318702b8139f14681e503..13a6dc9eff7b5df91e3a5b9bb33e492fd6ce66d3 100644 --- a/MEC012/SRV/RNIS/RnisSpecificSubscription.robot +++ b/MEC012/SRV/RNIS/RnisSpecificSubscription.robot @@ -3,7 +3,7 @@ *** Settings *** Library OperatingSystem -Resource environment/variables.txt +Resource environment/variables_sandbox.txt Resource ../../../GenericKeywords.robot Resource resources/RadioNetworkInformationAPI.robot Library REST ${MEC-APP_SCHEMA}://${MEC-APP_HOST}:${MEC-APP_PORT} ssl_verify=false @@ -31,7 +31,7 @@ TC_MEC_MEC012_SRV_RNIS_014_BR ... Reference https://forge.etsi.org/rep/mec/gs012-rnis-api/blob/automatic_generation/RniAPI.yaml [Setup] Post RNIS subscription request CellChangeSubscription ${elements} = Split String ${response['headers']['Location']} / - Set Suite Variable ${SUB_ID} ${elements[4]} + Set Suite Variable ${SUB_ID} ${elements[-1]} Update Individual RNIS Subscription ${SUB_ID} UpdateCellChangeSubscriptionRequestBr Check HTTP Response Status Code Is 400 [TearDown] Delete Individual RNIS Subscription ${SUB_ID} @@ -43,7 +43,7 @@ TC_MEC_MEC012_SRV_RNIS_014_NF ... ETSI GS MEC 012 2.2.1, clause 7.8.3.2 ... Reference https://forge.etsi.org/rep/mec/gs012-rnis-api/blob/automatic_generation/RniAPI.yaml [Setup] Delete Individual RNIS Subscription ${NON_EXISTENT_SUBSCRIPTION_ID} - Update Individual RNIS Subscription ${NON_EXISTENT_SUBSCRIPTION_ID} UpdateCellChangeSubscriptionRequest + Update Individual RNIS Subscription ${NON_EXISTENT_SUBSCRIPTION_ID} UpdateCellChangeSubscriptionRequestNf Check HTTP Response Status Code Is 404 TC_MEC_MEC012_SRV_RNIS_015_NF @@ -63,7 +63,7 @@ TC_MEC_MEC012_SRV_RNIS_013_OK ... Reference https://forge.etsi.org/rep/mec/gs012-rnis-api/blob/automatic_generation/RniAPI.yaml [Setup] Post RNIS subscription request CellChangeSubscription ${elements} = Split String ${response['headers']['Location']} / - Set Suite Variable ${SUB_ID} ${elements[4]} + Set Suite Variable ${SUB_ID} ${elements[-1]} Get Individual RNIS Subscription ${SUB_ID} Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is CellChangeSubscription @@ -162,6 +162,6 @@ Delete Individual RNIS Subscription Set Headers {"Content-Type":"application/json"} Set Headers {"Authorization":"${TOKEN}"} Set Headers {"Content-Length":"0"} - Delete ${apiRoot}/rni/${apiVersion}/subscriptions/${SUBSCRIPTION_ID} + Delete ${apiRoot}/rni/${apiVersion}/subscriptions/${subscription_id} ${output}= Output response Set Suite Variable ${response} ${output} \ No newline at end of file diff --git a/MEC012/SRV/RNIS/environment/variables.txt b/MEC012/SRV/RNIS/environment/variables.txt index da47b01259af508794fb68f563c8b25c32b6d9cf..f655911dc5c9251b10196a08aa6247bbdad193de 100644 --- a/MEC012/SRV/RNIS/environment/variables.txt +++ b/MEC012/SRV/RNIS/environment/variables.txt @@ -20,9 +20,11 @@ ${NOTIFICATION_SERVER_URI} /callback_url ${NOTIFICATION_SERVER_TIMEOUT} 5 +${NON_EXISTENT_SUBSCRIPTION_ID} 123456789 ${APP_INS_ID} appInsId ${NOT_EXISTENT_APP_INS_ID} NOT_EXISTENT_APP_INS_ID ${NOT_EXISTENT_CELL_ID} 0x8000099 ${CELL_ID} 6060606 - +${HREF} +${LINKS_SELF} ${PIC_PROBLEM_DETAILS_ON_4xx} 0 \ No newline at end of file diff --git a/MEC012/SRV/RNIS/environment/variables_sandbox.txt b/MEC012/SRV/RNIS/environment/variables_sandbox.txt new file mode 100644 index 0000000000000000000000000000000000000000..baa76a15463f0387567fd308851aaf6841adea5b --- /dev/null +++ b/MEC012/SRV/RNIS/environment/variables_sandbox.txt @@ -0,0 +1,33 @@ +*** Variables *** +####Env variable for the ETSI MEC Sandbox +${MEC-APP_SCHEMA} https +${MEC-APP_HOST} try-mec.etsi.org +${MEC-APP_PORT} 443 +#${TOKEN} Basic YWxhZGRpbjpvcGVuc2VzYW1l +${apiRoot} //mep1 +${apiName} rni +${apiVersion} v2 + + + +${response} {} +${TOKEN} Basic YWxhZGRpbjpvcGVuc2VzYW1l +${SUB_ID} 15 + + +##Notification Server variables +${NOTIFICATION_SERVER_IP} 127.0.0.1 +${NOTIFICATION_SERVER_PORT} 8888 +${NOTIFICATION_SERVER_HTTP_METHOD} POST +${NOTIFICATION_SERVER_URI} /callback_url +${NOTIFICATION_SERVER_TIMEOUT} 5 + + +${NON_EXISTENT_SUBSCRIPTION_ID} 123456789 +${APP_INS_ID} appInsId +${NOT_EXISTENT_APP_INS_ID} NOT_EXISTENT_APP_INS_ID +${NOT_EXISTENT_CELL_ID} 0xffff8000099 +${CELL_ID} 6060606 +${HREF} +${LINKS_SELF} +${PIC_PROBLEM_DETAILS_ON_4xx} 0 \ No newline at end of file diff --git a/MEC012/SRV/RNIS/jsons/CellChangeSubscription.json b/MEC012/SRV/RNIS/jsons/CellChangeSubscription.json index 2e8a4cfe7f0eb46e9a98ecbf72ae958a395049ad..8997a182ef046e6762984645b342e76b8c263fea 100644 --- a/MEC012/SRV/RNIS/jsons/CellChangeSubscription.json +++ b/MEC012/SRV/RNIS/jsons/CellChangeSubscription.json @@ -8,7 +8,10 @@ }, "filterCriteriaAssocHo": { "associateId": [ - "associatedId" + { + "type":0, + "value":"associatedId" + } ] } } \ No newline at end of file diff --git a/MEC012/SRV/RNIS/jsons/NrMeasRepUeSubscription.json b/MEC012/SRV/RNIS/jsons/NrMeasRepUeSubscription.json index 96805195920dc515ce118480fc1f9961c567b1da..51bdb65803e2e409fabf80389007ef65c367be47 100644 --- a/MEC012/SRV/RNIS/jsons/NrMeasRepUeSubscription.json +++ b/MEC012/SRV/RNIS/jsons/NrMeasRepUeSubscription.json @@ -2,6 +2,7 @@ "subscriptionType": "NrMeasRepUeSubscription", "callbackReference": "http://10.30.8.189:8888/callback_url", "filterCriteriaNrMrs": { - "appInstanceId": "appInstanceId" + "appInstanceId": "appInstanceId", + "associateId":["assoicateId01"] } } \ No newline at end of file diff --git a/MEC012/SRV/RNIS/jsons/UpdateCellChangeSubscriptionRequestNf.json b/MEC012/SRV/RNIS/jsons/UpdateCellChangeSubscriptionRequestNf.json new file mode 100644 index 0000000000000000000000000000000000000000..8910d5bf0a09834132a667ba5e65a0aced8a467f --- /dev/null +++ b/MEC012/SRV/RNIS/jsons/UpdateCellChangeSubscriptionRequestNf.json @@ -0,0 +1,10 @@ +{ + "subscriptionType": "CellChangeSubscription", + "callbackReference": "http://10.30.8.189:8888/new_callback_url", + "_links": { + "self": { + "href": "${LINKS_SELF}" + } + }, + "filterCriteriaAssocHo": {} +} \ No newline at end of file diff --git a/MEC012/SRV/RNIS/resources/RadioNetworkInformationAPI.robot b/MEC012/SRV/RNIS/resources/RadioNetworkInformationAPI.robot index 0bf36397ba6e31c386463f601e48e31cb140cd00..47a3eb3bdebfd2c0be9bd76bb1e6217279de2b6b 100644 --- a/MEC012/SRV/RNIS/resources/RadioNetworkInformationAPI.robot +++ b/MEC012/SRV/RNIS/resources/RadioNetworkInformationAPI.robot @@ -44,4 +44,5 @@ Check S1BearerInfo Check L2MeasInfo [Arguments] ${received_value} log ${received_value} - Should Be Equal As Strings ${received_value['cellInfo'][0]['ecgi'][0]['cellId']} ${CELL_ID} + #Should Be Equal As Strings ${received_value['cellInfo'][0]['ecgi'][0]['cellId']} ${CELL_ID} + Should Be Equal As Strings ${received_value['cellInfo'][0]['ecgi']['cellId']} ${CELL_ID}