From ee73a66e0b91dd220f6506fd67662b1abac46ccc Mon Sep 17 00:00:00 2001 From: Benedetta Arena Date: Mon, 15 Jun 2026 18:04:11 +0200 Subject: [PATCH 1/8] fix: refactor broker naming and centralize setup logic --- .../Entity/QueryEntities/IOP_CNF_01_01.robot | 52 +++++---- .../Entity/QueryEntities/IOP_CNF_01_02.robot | 49 ++++---- .../Entity/QueryEntities/IOP_CNF_02_01.robot | 110 +++++++++--------- .../Entity/QueryEntities/IOP_CNF_02_02.robot | 78 +++++++------ .../Entity/QueryEntities/IOP_CNF_03_01.robot | 54 ++++----- .../Entity/QueryEntities/IOP_CNF_03_02.robot | 74 ++++++------ .../Entity/QueryEntities/IOP_CNF_04_01.robot | 76 ++++++------ .../Entity/QueryEntities/IOP_CNF_04_02.robot | 76 ++++++------ .../Entity/RetrieveEntity/IOP_CNF_01_01.robot | 42 +++---- .../Entity/RetrieveEntity/IOP_CNF_01_02.robot | 41 +++---- .../Entity/RetrieveEntity/IOP_CNF_02_01.robot | 52 +++++---- .../Entity/RetrieveEntity/IOP_CNF_02_02.robot | 50 ++++---- .../Entity/RetrieveEntity/IOP_CNF_03_01.robot | 56 ++++----- .../Entity/RetrieveEntity/IOP_CNF_03_02.robot | 52 +++++---- .../Entity/RetrieveEntity/IOP_CNF_04_01.robot | 62 +++++----- .../Entity/RetrieveEntity/IOP_CNF_04_02.robot | 76 ++++++------ .../CreateEntity/IOP_CNF_01_01.robot | 34 +++--- .../CreateEntity/IOP_CNF_01_02.robot | 35 +++--- .../CreateEntity/IOP_CNF_02_01.robot | 44 +++---- .../CreateEntity/IOP_CNF_02_02.robot | 44 +++---- .../CreateEntity/IOP_CNF_03_01.robot | 44 +++---- .../CreateEntity/IOP_CNF_03_02.robot | 44 +++---- .../CreateEntity/IOP_CNF_04_01.robot | 60 +++++----- .../CreateEntity/IOP_CNF_04_02.robot | 64 +++++----- README.md | 12 +- 25 files changed, 706 insertions(+), 675 deletions(-) diff --git a/IOP_TP/NGSI-LD/Interoperability/Consumption/Entity/QueryEntities/IOP_CNF_01_01.robot b/IOP_TP/NGSI-LD/Interoperability/Consumption/Entity/QueryEntities/IOP_CNF_01_01.robot index 47dd66ac..40e2462b 100644 --- a/IOP_TP/NGSI-LD/Interoperability/Consumption/Entity/QueryEntities/IOP_CNF_01_01.robot +++ b/IOP_TP/NGSI-LD/Interoperability/Consumption/Entity/QueryEntities/IOP_CNF_01_01.robot @@ -1,6 +1,6 @@ *** Settings *** -Documentation Three brokers are set up A, B and C. A has two registrations, one inclusive for the entities created in B and one exclusive for the entity created in C. -... The client sends a HTTP GET request to check that quering the offparking type returns the entities in B and C. +Documentation Three brokers are set up A, B and C. A has two registrations, one inclusive for the entities created in B and one exclusive for the entity created in C. + Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource Resource ${EXECDIR}/resources/ApiUtils/ContextSourceDiscovery.resource @@ -17,18 +17,17 @@ ${second_entity_payload_filename} interoperability/offstreet-parkin ${third_entity_payload_filename} interoperability/offstreet-parking2-no-location-and-totalspotsnumber.jsonld ${inclusive_registration_payload_file_path} csourceRegistrations/interoperability/context-source-registration-inclusive-2.jsonld ${exclusive_registration_payload_file_path} csourceRegistrations/interoperability/context-source-registration-exclusive-2.jsonld -${b1_url} -${b2_url} -${b3_url} +${broker_A_url} +${broker_B_url} +${broker_C_url} *** Test Cases *** IOP_CNF_01_01 Query Entities Of Type OffstreetParking Via GET - [Documentation] Pre-conditions: no user context. Data only on leaves. B contains OffStreetParking1 and OffStreetParking2 without location and totalSpotsNumber. C contains OffStreetParking2. - ... Registrations established: Inclusive in A to B. Exclusive in A to C. + [Documentation] The client sends a HTTP GET request to check that quering the offparking type returns the entities in B and C. [Tags] since_v1.6.1 iop 4_3_3 cf_06 additive-inclusive proxy-exclusive 4_3_6 5_7_2 6_4_3_1 #Agent queries all entities with type OffstreetParking in A and checks for a successful response that contains the attributes of both entities in B and C. - ${response}= Query Entities entity_types=OffstreetParking broker_url=${b1_url} + ${response}= Query Entities entity_types=OffstreetParking broker_url=${broker_A_url} Check Response Status Code 200 ${response.status_code} @{payload}= Set Variable ${response.json()} Should Contain ${payload}\[OffstreetParking1] availableSpotsNumber @@ -37,12 +36,12 @@ IOP_CNF_01_01 Query Entities Of Type OffstreetParking Via GET Should Contain ${payload}\[OffstreetParking2] location #Agent queries all entities with type OffstreetParking in B and C - ${response}= Query Entities entity_types=OffstreetParking broker_url=${b2_url} + ${response}= Query Entities entity_types=OffstreetParking broker_url=${broker_B_url} @{first_expected_payload}= Set Variable ${response.json()} ${entity_ids}= Create List ${entity_id} ${second_entity_id} Check Response Body Containing Entities URIS set to ${entity_ids} ${response.json()} - ${response}= Query Entities entity_types=OffstreetParking broker_url=${b3_url} + ${response}= Query Entities entity_types=OffstreetParking broker_url=${broker_C_url} @{second_expected_payload}= Set Variable ${response.json()} Check Response Body Containing Entities URIS set to ${entity_id} ${response.json()} @@ -53,15 +52,18 @@ IOP_CNF_01_01 Query Entities Of Type OffstreetParking Via GET *** Keywords *** Setup Initial Context Source Registrations + [Documentation] Pre-conditions: B contains OffStreetParking1 and OffStreetParking2 without location and totalSpotsNumber. C contains OffStreetParking2. + ... Registration established: Inclusive in A to B. Exclusive in A to C. + ${entity_id}= Generate Random Parking Entity Id Set Suite Variable ${entity_id} ${second_entity_id}= Generate Random Parking Entity Id Set Suite Variable ${second_entity_id} - ${response}= Create Entity ${first_entity_payload_filename} ${entity_id} broker_url=${b2_url} + ${response}= Create Entity ${first_entity_payload_filename} ${entity_id} broker_url=${broker_B_url} Check Response Status Code 201 ${response.status_code} - ${response}= Create Entity ${third_entity_payload_filename} ${second_entity_id} broker_url=${b2_url} + ${response}= Create Entity ${third_entity_payload_filename} ${second_entity_id} broker_url=${broker_B_url} Check Response Status Code 201 ${response.status_code} - ${response}= Create Entity ${second_entity_payload_filename} ${entity_id} broker_url=${b3_url} + ${response}= Create Entity ${second_entity_payload_filename} ${entity_id} broker_url=${broker_C_url} Check Response Status Code 201 ${response.status_code} ${registration_id1}= Generate Random CSR Id @@ -70,9 +72,9 @@ Setup Initial Context Source Registrations ... ${registration_id1} ... ${inclusive_registration_payload_file_path} ... entity_id=${entity_id} - ... broker_url=${b2_url} + ... broker_url=${broker_B_url} ... mode=inclusive - ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${b1_url} + ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${broker_A_url} Check Response Status Code 201 ${response.status_code} ${registration_id2}= Generate Random CSR Id @@ -81,9 +83,9 @@ Setup Initial Context Source Registrations ... ${registration_id2} ... ${inclusive_registration_payload_file_path} ... entity_id=${second_entity_id} - ... broker_url=${b2_url} + ... broker_url=${broker_B_url} ... mode=inclusive - ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${b1_url} + ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${broker_A_url} Check Response Status Code 201 ${response.status_code} ${registration_id3}= Generate Random CSR Id @@ -92,15 +94,15 @@ Setup Initial Context Source Registrations ... ${registration_id3} ... ${exclusive_registration_payload_file_path} ... entity_id=${entity_id} - ... broker_url=${b3_url} + ... broker_url=${broker_C_url} ... mode=exclusive - ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${b1_url} + ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${broker_A_url} Check Response Status Code 201 ${response.status_code} Delete Entities And Delete Registrations - Delete Context Source Registration ${registration_id1} broker_url=${b1_url} - Delete Context Source Registration ${registration_id2} broker_url=${b1_url} - Delete Context Source Registration ${registration_id3} broker_url=${b1_url} - Delete Entity ${entity_id} broker_url=${b2_url} - Delete Entity ${second_entity_id} broker_url=${b2_url} - Delete Entity ${entity_id} broker_url=${b3_url} \ No newline at end of file + Delete Context Source Registration ${registration_id1} broker_url=${broker_A_url} + Delete Context Source Registration ${registration_id2} broker_url=${broker_A_url} + Delete Context Source Registration ${registration_id3} broker_url=${broker_A_url} + Delete Entity ${entity_id} broker_url=${broker_B_url} + Delete Entity ${second_entity_id} broker_url=${broker_B_url} + Delete Entity ${entity_id} broker_url=${broker_C_url} \ No newline at end of file diff --git a/IOP_TP/NGSI-LD/Interoperability/Consumption/Entity/QueryEntities/IOP_CNF_01_02.robot b/IOP_TP/NGSI-LD/Interoperability/Consumption/Entity/QueryEntities/IOP_CNF_01_02.robot index 37233bbd..c1098c0c 100644 --- a/IOP_TP/NGSI-LD/Interoperability/Consumption/Entity/QueryEntities/IOP_CNF_01_02.robot +++ b/IOP_TP/NGSI-LD/Interoperability/Consumption/Entity/QueryEntities/IOP_CNF_01_02.robot @@ -1,6 +1,5 @@ *** Settings *** Documentation Three brokers are set up A, B and C. A has two registrations, one inclusive for the entities created in B and one exclusive for the entity created in C. -... The client sends and HTTP POST request to check that the entities can be queried from all brokers. Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource @@ -18,19 +17,18 @@ ${second_entity_payload_filename} interoperability/offstreet-parkin ${third_entity_payload_filename} interoperability/offstreet-parking2-no-location-and-totalspotsnumber.jsonld ${inclusive_registration_payload_file_path} csourceRegistrations/interoperability/context-source-registration-inclusive-2.jsonld ${exclusive_registration_payload_file_path} csourceRegistrations/interoperability/context-source-registration-exclusive-2.jsonld -${b1_url} -${b2_url} -${b3_url} +${broker_A_url} +${broker_B_url} +${broker_C_url} *** Test Cases *** IOP_CNF_01_01 Query Entities Of Type OffstreetParking Via POST - [Documentation] Pre-conditions: no user context. Data only on leaves. B contains OffStreetParking1 and OffStreetParking2 without location and totalSpotsNumber. C contains OffStreetParking2. - ... Registrations established: Inclusive in A to B. Exclusive in A to C. + [Documentation] The client sends and HTTP POST request to check that the entities can be queried from all brokers. [Tags] since_v1.6.1 iop 4_3_3 cf_06 additive-inclusive proxy-exclusive 4_3_6 5_7_2 6_23_2_1 #Agent queries all entities with type OffstreetParking in A and checks for a successful response that contains the attributes of both entities in B and C. @{entities}= Create List ${entity_id} ${second_entity_id} - ${response}= Query Entities Via POST entities=${entities} broker_url=${b1_url} + ${response}= Query Entities Via POST entities=${entities} broker_url=${broker_A_url} Check Response Status Code 200 ${response.status_code} @{payload}= Set Variable ${response.json()} Should Contain ${payload}\[OffstreetParking1] availableSpotsNumber @@ -39,11 +37,11 @@ IOP_CNF_01_01 Query Entities Of Type OffstreetParking Via POST Should Contain ${payload}\[OffstreetParking2] location #Agent queries all entities with type OffstreetParking in B and C - ${response}= Query Entities Via POST entities=${entities} broker_url=${b2_url} + ${response}= Query Entities Via POST entities=${entities} broker_url=${broker_B_url} @{first_expected_payload}= Set Variable ${response.json()} Check Response Body Containing Entities URIS set to ${entities} ${response.json()} - ${response}= Query Entities Via POST entities=${entity_id} broker_url=${b3_url} + ${response}= Query Entities Via POST entities=${entity_id} broker_url=${broker_C_url} @{second_expected_payload}= Set Variable ${response.json()} Check Response Body Containing Entities URIS set to ${entity_id} ${response.json()} @@ -54,15 +52,18 @@ IOP_CNF_01_01 Query Entities Of Type OffstreetParking Via POST *** Keywords *** Setup Initial Context Source Registrations + [Documentation] Pre-conditions: no user context. Data only on leaves. B contains OffStreetParking1 and OffStreetParking2 without location and totalSpotsNumber. C contains OffStreetParking2. + ... Registrations established: Inclusive in A to B. Exclusive in A to C. + ${entity_id}= Generate Random Parking Entity Id Set Suite Variable ${entity_id} ${second_entity_id}= Generate Random Parking Entity Id Set Suite Variable ${second_entity_id} - ${response}= Create Entity ${first_entity_payload_filename} ${entity_id} broker_url=${b2_url} + ${response}= Create Entity ${first_entity_payload_filename} ${entity_id} broker_url=${broker_B_url} Check Response Status Code 201 ${response.status_code} - ${response}= Create Entity ${third_entity_payload_filename} ${second_entity_id} broker_url=${b2_url} + ${response}= Create Entity ${third_entity_payload_filename} ${second_entity_id} broker_url=${broker_B_url} Check Response Status Code 201 ${response.status_code} - ${response}= Create Entity ${second_entity_payload_filename} ${entity_id} broker_url=${b3_url} + ${response}= Create Entity ${second_entity_payload_filename} ${entity_id} broker_url=${broker_C_url} Check Response Status Code 201 ${response.status_code} ${registration_id1}= Generate Random CSR Id @@ -71,9 +72,9 @@ Setup Initial Context Source Registrations ... ${registration_id1} ... ${inclusive_registration_payload_file_path} ... entity_id=${entity_id} - ... broker_url=${b2_url} + ... broker_url=${broker_B_url} ... mode=inclusive - ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${b1_url} + ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${broker_A_url} Check Response Status Code 201 ${response.status_code} ${registration_id2}= Generate Random CSR Id @@ -82,9 +83,9 @@ Setup Initial Context Source Registrations ... ${registration_id2} ... ${inclusive_registration_payload_file_path} ... entity_id=${second_entity_id} - ... broker_url=${b2_url} + ... broker_url=${broker_B_url} ... mode=inclusive - ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${b1_url} + ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${broker_A_url} Check Response Status Code 201 ${response.status_code} ${registration_id3}= Generate Random CSR Id @@ -93,15 +94,15 @@ Setup Initial Context Source Registrations ... ${registration_id3} ... ${exclusive_registration_payload_file_path} ... entity_id=${entity_id} - ... broker_url=${b3_url} + ... broker_url=${broker_C_url} ... mode=exclusive - ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${b1_url} + ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${broker_A_url} Check Response Status Code 201 ${response.status_code} Delete Entities And Delete Registrations - Delete Context Source Registration ${registration_id1} broker_url=${b1_url} - Delete Context Source Registration ${registration_id2} broker_url=${b1_url} - Delete Context Source Registration ${registration_id3} broker_url=${b1_url} - Delete Entity ${entity_id} broker_url=${b2_url} - Delete Entity ${second_entity_id} broker_url=${b2_url} - Delete Entity ${entity_id} broker_url=${b3_url} \ No newline at end of file + Delete Context Source Registration ${registration_id1} broker_url=${broker_A_url} + Delete Context Source Registration ${registration_id2} broker_url=${broker_A_url} + Delete Context Source Registration ${registration_id3} broker_url=${broker_A_url} + Delete Entity ${entity_id} broker_url=${broker_B_url} + Delete Entity ${second_entity_id} broker_url=${broker_B_url} + Delete Entity ${entity_id} broker_url=${broker_C_url} \ No newline at end of file diff --git a/IOP_TP/NGSI-LD/Interoperability/Consumption/Entity/QueryEntities/IOP_CNF_02_01.robot b/IOP_TP/NGSI-LD/Interoperability/Consumption/Entity/QueryEntities/IOP_CNF_02_01.robot index 55db93a6..8157bd9b 100644 --- a/IOP_TP/NGSI-LD/Interoperability/Consumption/Entity/QueryEntities/IOP_CNF_02_01.robot +++ b/IOP_TP/NGSI-LD/Interoperability/Consumption/Entity/QueryEntities/IOP_CNF_02_01.robot @@ -1,6 +1,6 @@ *** Settings *** Documentation Four brokers are set up A, B, C and D. A has three registrations, one inclusive for the entities created in B, one redirect for the entities created in C and D and one redirect for the entity created in D. -... The client sends a HTTP GET request to check that quering the offparking type returns the entities in B, C and D and said entities have the same attributes as the ones queried from A. + Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource Resource ${EXECDIR}/resources/ApiUtils/ContextSourceDiscovery.resource @@ -20,64 +20,66 @@ ${second_full_entity_payload_filename} interoperability/offstreet ${inclusive_registration_payload_file_path} csourceRegistrations/interoperability/context-source-registration-inclusive-2.jsonld ${first_redirect_registration_payload_file_path} csourceRegistrations/interoperability/context-source-registration-redirect-2.jsonld ${second_redirect_registration_payload_file_path} csourceRegistrations/interoperability/context-source-registration-redirect-3.jsonld -${b1_url} -${b2_url} -${b3_url} -${b4_url} +${broker_A_url} +${broker_B_url} +${broker_C_url} +${broker_D_url} *** Test Cases *** IOP_CNF_02_01 Query Entities Of Type OffstreetParking Via GET - [Documentation] Pre-conditions: no user context. Data on every broker. B contains OffStreetParking1 without location and OffStreetParking2 without location. C contains OffStreetParking1 and OffStreetParking2. D contains OffStreetParking2 with location and name only. - ... Registrations established: Inclusive in A to B. Redirect in A to C. Redirect in A to D. + [Documentation] The client sends a HTTP GET request to check that quering the offparking type returns the entities in B, C and D and said entities have the same attributes as the ones queried from A. [Tags] since_v1.6.1 iop 4_3_3 cf_06 additive-inclusive proxy-redirect 4_3_6 5_7_2 6_4_3_1 #Agent queries all entities with type OffstreetParking in A and checks for a successful response not containing the name attribute. - ${response}= Query Entities entity_types=OffstreetParking broker_url=${b1_url} + ${response}= Query Entities entity_types=OffstreetParking broker_url=${broker_A_url} Check Response Status Code 200 ${response.status_code} - @{entities_b1}= Set Variable ${response.json()} - ${first_payload}= Get From List ${entities_b1} 0 - ${second_payload}= Get From List ${entities_b1} 1 + @{entities_A}= Set Variable ${response.json()} + ${first_payload}= Get From List ${entities_A} 0 + ${second_payload}= Get From List ${entities_A} 1 Should Not Contain ${first_payload} name Should Not Contain ${second_payload} name #Agent queries all entities with type OffstreetParking in B, C and D - ${response}= Query Entities entity_types=OffstreetParking broker_url=${b2_url} - @{entities_b2}= Set Variable ${response.json()} - ${first_b2_payload}= Get From List ${entities_b2} 0 - ${second_b2_payload}= Get From List ${entities_b2} 1 - - ${response}= Query Entities entity_types=OffstreetParking broker_url=${b3_url} - @{entities_b3}= Set Variable ${response.json()} - ${b3_payload}= Get From List ${entities_b3} 0 - - ${response}= Query Entities entity_types=OffstreetParking broker_url=${b4_url} - @{entities_b4}= Set Variable ${response.json()} - ${b4_payload}= Get From List ${entities_b4} 0 + ${response}= Query Entities entity_types=OffstreetParking broker_url=${broker_B_url} + @{entities_B}= Set Variable ${response.json()} + ${first_B_payload}= Get From List ${entities_B} 0 + ${second_B_payload}= Get From List ${entities_B} 1 + + ${response}= Query Entities entity_types=OffstreetParking broker_url=${broker_C_url} + @{entities_C}= Set Variable ${response.json()} + ${C_payload}= Get From List ${entities_C} 0 + + ${response}= Query Entities entity_types=OffstreetParking broker_url=${broker_D_url} + @{entities_D}= Set Variable ${response.json()} + ${D_payload}= Get From List ${entities_D} 0 #Agent checks that OffstreetParking1 in A has the same availableSpotsNumber and totalSpotsNumber as the one in B and the same location attribute found in C. The OffstreetParking2 entity in A contains the attributes of both OffstreetParking2 availableSpotsNumber and totalSpotsNumber in C and the same location found in D. - Should Be Equal ${first_payload}[availableSpotsNumber] ${first_b2_payload}[availableSpotsNumber] - Should Be Equal ${first_payload}[totalSpotsNumber] ${first_b2_payload}[totalSpotsNumber] - Should Be Equal ${first_payload}[location] ${b3_payload}[location] + Should Be Equal ${first_payload}[availableSpotsNumber] ${first_B_payload}[availableSpotsNumber] + Should Be Equal ${first_payload}[totalSpotsNumber] ${first_B_payload}[totalSpotsNumber] + Should Be Equal ${first_payload}[location] ${C_payload}[location] - Should Be Equal ${second_payload}[availableSpotsNumber] ${second_b2_payload}[availableSpotsNumber] - Should Be Equal ${second_payload}[totalSpotsNumber] ${second_b2_payload}[totalSpotsNumber] - Should Be Equal ${second_payload}[location] ${b4_payload}[location] + Should Be Equal ${second_payload}[availableSpotsNumber] ${second_B_payload}[availableSpotsNumber] + Should Be Equal ${second_payload}[totalSpotsNumber] ${second_B_payload}[totalSpotsNumber] + Should Be Equal ${second_payload}[location] ${D_payload}[location] *** Keywords *** Setup Initial Context Source Registrations + [Documentation] Pre-conditions: no user context. Data on every broker. B contains OffStreetParking1 without location and OffStreetParking2 without location. C contains OffStreetParking1 and OffStreetParking2. D contains OffStreetParking2 with location and name only. + ... Registrations established: Inclusive in A to B. Redirect in A to C. Redirect in A to D. + ${entity_id}= Generate Random Parking Entity Id Set Suite Variable ${entity_id} ${second_entity_id}= Generate Random Parking Entity Id Set Suite Variable ${second_entity_id} - ${response}= Create Entity ${first_entity_no_location_payload_filename} ${entity_id} broker_url=${b2_url} + ${response}= Create Entity ${first_entity_no_location_payload_filename} ${entity_id} broker_url=${broker_B_url} Check Response Status Code 201 ${response.status_code} - ${response}= Create Entity ${second_entity_no_location_payload_filename} ${second_entity_id} broker_url=${b2_url} + ${response}= Create Entity ${second_entity_no_location_payload_filename} ${second_entity_id} broker_url=${broker_B_url} Check Response Status Code 201 ${response.status_code} - ${response}= Create Entity ${first_full_entity_payload_filename} ${entity_id} broker_url=${b3_url} + ${response}= Create Entity ${first_full_entity_payload_filename} ${entity_id} broker_url=${broker_C_url} Check Response Status Code 201 ${response.status_code} - ${response}= Create Entity ${second_full_entity_payload_filename} ${second_entity_id} broker_url=${b3_url} + ${response}= Create Entity ${second_full_entity_payload_filename} ${second_entity_id} broker_url=${broker_C_url} Check Response Status Code 201 ${response.status_code} - ${response}= Create Entity ${location_name_payload_filename} ${entity_id} broker_url=${b4_url} + ${response}= Create Entity ${location_name_payload_filename} ${entity_id} broker_url=${broker_D_url} Check Response Status Code 201 ${response.status_code} ${registration_id1}= Generate Random CSR Id @@ -86,9 +88,9 @@ Setup Initial Context Source Registrations ... ${registration_id1} ... ${inclusive_registration_payload_file_path} ... entity_id=${entity_id} - ... broker_url=${b2_url} + ... broker_url=${broker_B_url} ... mode=inclusive - ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${b1_url} + ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${broker_A_url} Check Response Status Code 201 ${response.status_code} ${registration_id2}= Generate Random CSR Id @@ -97,9 +99,9 @@ Setup Initial Context Source Registrations ... ${registration_id2} ... ${inclusive_registration_payload_file_path} ... entity_id=${second_entity_id} - ... broker_url=${b2_url} + ... broker_url=${broker_B_url} ... mode=inclusive - ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${b1_url} + ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${broker_A_url} Check Response Status Code 201 ${response.status_code} ${registration_id3}= Generate Random CSR Id @@ -108,9 +110,9 @@ Setup Initial Context Source Registrations ... ${registration_id3} ... ${first_redirect_registration_payload_file_path} ... entity_id=${entity_id} - ... broker_url=${b3_url} + ... broker_url=${broker_C_url} ... mode=redirect - ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${b1_url} + ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${broker_A_url} Check Response Status Code 201 ${response.status_code} ${registration_id4}= Generate Random CSR Id @@ -119,9 +121,9 @@ Setup Initial Context Source Registrations ... ${registration_id4} ... ${first_redirect_registration_payload_file_path} ... entity_id=${second_entity_id} - ... broker_url=${b3_url} + ... broker_url=${broker_C_url} ... mode=redirect - ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${b1_url} + ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${broker_A_url} Check Response Status Code 201 ${response.status_code} ${registration_id5}= Generate Random CSR Id @@ -130,19 +132,19 @@ Setup Initial Context Source Registrations ... ${registration_id5} ... ${second_redirect_registration_payload_file_path} ... entity_id=${entity_id} - ... broker_url=${b4_url} + ... broker_url=${broker_D_url} ... mode=redirect - ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${b1_url} + ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${broker_A_url} Check Response Status Code 201 ${response.status_code} Delete Entities And Delete Registrations - Delete Context Source Registration ${registration_id1} broker_url=${b1_url} - Delete Context Source Registration ${registration_id2} broker_url=${b1_url} - Delete Context Source Registration ${registration_id3} broker_url=${b1_url} - Delete Context Source Registration ${registration_id4} broker_url=${b1_url} - Delete Context Source Registration ${registration_id5} broker_url=${b1_url} - Delete Entity ${entity_id} broker_url=${b2_url} - Delete Entity ${second_entity_id} broker_url=${b2_url} - Delete Entity ${entity_id} broker_url=${b3_url} - Delete Entity ${second_entity_id} broker_url=${b3_url} - Delete Entity ${entity_id} broker_url=${b4_url} \ No newline at end of file + Delete Context Source Registration ${registration_id1} broker_url=${broker_A_url} + Delete Context Source Registration ${registration_id2} broker_url=${broker_A_url} + Delete Context Source Registration ${registration_id3} broker_url=${broker_A_url} + Delete Context Source Registration ${registration_id4} broker_url=${broker_A_url} + Delete Context Source Registration ${registration_id5} broker_url=${broker_A_url} + Delete Entity ${entity_id} broker_url=${broker_B_url} + Delete Entity ${second_entity_id} broker_url=${broker_B_url} + Delete Entity ${entity_id} broker_url=${broker_C_url} + Delete Entity ${second_entity_id} broker_url=${broker_C_url} + Delete Entity ${entity_id} broker_url=${broker_D_url} \ No newline at end of file diff --git a/IOP_TP/NGSI-LD/Interoperability/Consumption/Entity/QueryEntities/IOP_CNF_02_02.robot b/IOP_TP/NGSI-LD/Interoperability/Consumption/Entity/QueryEntities/IOP_CNF_02_02.robot index e50c0535..362b3f27 100644 --- a/IOP_TP/NGSI-LD/Interoperability/Consumption/Entity/QueryEntities/IOP_CNF_02_02.robot +++ b/IOP_TP/NGSI-LD/Interoperability/Consumption/Entity/QueryEntities/IOP_CNF_02_02.robot @@ -1,6 +1,6 @@ *** Settings *** Documentation Four brokers are set up A, B, C and D. A has five registrations, two inclusive for the entities created in B, one redirect for the entities created in C and two redirect for the entity created in D. -... Check that the entities in B, C and D and said entities have the same attributes as the ones queried from A. + Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource Resource ${EXECDIR}/resources/ApiUtils/ContextSourceDiscovery.resource @@ -23,19 +23,18 @@ ${second_inclusive_registration_payload_file_path} csourceRegistrations/inter ${first_redirect_registration_payload_file_path} csourceRegistrations/interoperability/context-source-registration-redirect-2.jsonld ${second_redirect_registration_payload_file_path} csourceRegistrations/interoperability/context-source-registration-redirect-3.jsonld ${third_redirect_registration_payload_file_path} csourceRegistrations/interoperability/context-source-registration-redirect-4.jsonld -${b1_url} -${b2_url} -${b3_url} -${b4_url} +${broker_A_url} +${broker_B_url} +${broker_C_url} +${broker_D_url} *** Test Cases *** IOP_CNF_02_02 Query Entities Of Type OffstreetParking And Vehicle with attrs - [Documentation] Pre-conditions: no user context. Data only on leaves. B contains OffStreetParking1 and Vehicle1. C contains OffStreetParking1 with location and name only and OffStreetParking2. D contains OffStreetParking2 with location and name only and Vehicle2. - ... Registrations established: Inclusive in A to B. Redirect in A to C. Redirect in A to D. + [Documentation] Check that the entities in B, C and D and said entities have the same attributes as the ones queried from A. [Tags] since_v1.6.1 iop 4_3_3 cf_06 additive-inclusive proxy-redirect 4_3_6 5_7_2 6_4_3_1 #Client queries all entities with type OffstreetParking and Vehicle in A and checks for a successful response that contains the location attribute for all entities. - ${response}= Query Entities entity_types=OffstreetParking,Vehicle attrs=location broker_url=${b1_url} + ${response}= Query Entities entity_types=OffstreetParking,Vehicle attrs=location broker_url=${broker_A_url} Check Response Status Code 200 ${response.status_code} &{payload}= Evaluate {i['id']: i for i in ${response.json()}} ${parking1_payload}= Get From Dictionary ${payload} ${first_parking_entity_id} @@ -48,11 +47,11 @@ IOP_CNF_02_02 Query Entities Of Type OffstreetParking And Vehicle with attrs Should Contain ${vehicle2_payload} location #Client queries all entities with type OffstreetParking and Vehicle in B, C and D. - ${response}= Query Entities entity_types=OffstreetParking,Vehicle attrs=location broker_url=${b2_url} + ${response}= Query Entities entity_types=OffstreetParking,Vehicle attrs=location broker_url=${broker_B_url} &{first_expected_payload}= Evaluate {i['id']: i for i in ${response.json()}} - ${response}= Query Entities entity_types=OffstreetParking,Vehicle attrs=location broker_url=${b3_url} + ${response}= Query Entities entity_types=OffstreetParking,Vehicle attrs=location broker_url=${broker_C_url} &{second_expected_payload}= Evaluate {i['id']: i for i in ${response.json()}} - ${response}= Query Entities entity_types=OffstreetParking,Vehicle attrs=location broker_url=${b4_url} + ${response}= Query Entities entity_types=OffstreetParking,Vehicle attrs=location broker_url=${broker_D_url} &{third_expected_payload}= Evaluate {i['id']: i for i in ${response.json()}} #Client checks that the attributes of the entities in A are the same as the ones in B, C and D. @@ -67,6 +66,9 @@ IOP_CNF_02_02 Query Entities Of Type OffstreetParking And Vehicle with attrs *** Keywords *** Setup Initial Context Source Registrations + [Documentation] Pre-conditions: no user context. Data only on leaves. B contains OffStreetParking1 and Vehicle1. C contains OffStreetParking1 with location and name only and OffStreetParking2. D contains OffStreetParking2 with location and name only and Vehicle2. + ... Registrations established: Inclusive in A to B. Redirect in A to C. Redirect in A to D. + ${first_parking_entity_id}= Generate Random Parking Entity Id Set Suite Variable ${first_parking_entity_id} ${second_parking_entity_id}= Generate Random Parking Entity Id @@ -76,17 +78,17 @@ Setup Initial Context Source Registrations ${second_vehicle_entity_id}= Generate Random Vehicle Entity Id Set Suite Variable ${second_vehicle_entity_id} - ${response}= Create Entity ${first_vehicle_payload_filename} ${first_vehicle_entity_id} broker_url=${b2_url} + ${response}= Create Entity ${first_vehicle_payload_filename} ${first_vehicle_entity_id} broker_url=${broker_B_url} Check Response Status Code 201 ${response.status_code} - ${response}= Create Entity ${first_offstreet_payload_filename} ${first_parking_entity_id} broker_url=${b2_url} + ${response}= Create Entity ${first_offstreet_payload_filename} ${first_parking_entity_id} broker_url=${broker_B_url} Check Response Status Code 201 ${response.status_code} - ${response}= Create Entity ${first_parking_location_name_payload_filename} ${first_parking_entity_id} broker_url=${b3_url} + ${response}= Create Entity ${first_parking_location_name_payload_filename} ${first_parking_entity_id} broker_url=${broker_C_url} Check Response Status Code 201 ${response.status_code} - ${response}= Create Entity ${second_offstreet_payload_filename} ${second_parking_entity_id} broker_url=${b3_url} + ${response}= Create Entity ${second_offstreet_payload_filename} ${second_parking_entity_id} broker_url=${broker_C_url} Check Response Status Code 201 ${response.status_code} - ${response}= Create Entity ${second_parking_location_name_payload_filename} ${second_parking_entity_id} broker_url=${b4_url} + ${response}= Create Entity ${second_parking_location_name_payload_filename} ${second_parking_entity_id} broker_url=${broker_D_url} Check Response Status Code 201 ${response.status_code} - ${response}= Create Entity ${second_vehicle_payload_filename} ${second_vehicle_entity_id} broker_url=${b4_url} + ${response}= Create Entity ${second_vehicle_payload_filename} ${second_vehicle_entity_id} broker_url=${broker_D_url} Check Response Status Code 201 ${response.status_code} ${registration_id1}= Generate Random CSR Id @@ -95,9 +97,9 @@ Setup Initial Context Source Registrations ... ${registration_id1} ... ${first_inclusive_registration_payload_file_path} ... entity_id=${first_parking_entity_id} - ... endpoint=${b2_url} + ... endpoint=${broker_B_url} ... mode=inclusive - ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${b1_url} + ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${broker_A_url} Check Response Status Code 201 ${response.status_code} ${registration_id2}= Generate Random CSR Id @@ -106,9 +108,9 @@ Setup Initial Context Source Registrations ... ${registration_id2} ... ${second_inclusive_registration_payload_file_path} ... entity_id=${first_vehicle_entity_id} - ... endpoint=${b2_url} + ... endpoint=${broker_B_url} ... mode=inclusive - ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${b1_url} + ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${broker_A_url} Check Response Status Code 201 ${response.status_code} ${registration_id3}= Generate Random CSR Id @@ -117,8 +119,8 @@ Setup Initial Context Source Registrations ... ${registration_id3} ... ${first_redirect_registration_payload_file_path} ... entity_id=${first_parking_entity_id} - ... endpoint=${b3_url} - ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${b1_url} + ... endpoint=${broker_C_url} + ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${broker_A_url} Check Response Status Code 201 ${response.status_code} ${registration_id4}= Generate Random CSR Id @@ -127,8 +129,8 @@ Setup Initial Context Source Registrations ... ${registration_id4} ... ${second_redirect_registration_payload_file_path} ... entity_id=${second_parking_entity_id} - ... endpoint=${b4_url} - ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${b1_url} + ... endpoint=${broker_D_url} + ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${broker_A_url} Check Response Status Code 201 ${response.status_code} ${registration_id5}= Generate Random CSR Id @@ -137,19 +139,19 @@ Setup Initial Context Source Registrations ... ${registration_id5} ... ${third_redirect_registration_payload_file_path} ... entity_id=${second_vehicle_entity_id} - ... endpoint=${b4_url} - ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${b1_url} + ... endpoint=${broker_D_url} + ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${broker_A_url} Check Response Status Code 201 ${response.status_code} Delete Entities And Delete Registrations - Delete Context Source Registration ${registration_id1} broker_url=${b1_url} - Delete Context Source Registration ${registration_id2} broker_url=${b1_url} - Delete Context Source Registration ${registration_id3} broker_url=${b1_url} - Delete Context Source Registration ${registration_id4} broker_url=${b1_url} - Delete Context Source Registration ${registration_id5} broker_url=${b1_url} - Delete Entity ${first_parking_entity_id} broker_url=${b2_url} - Delete Entity ${first_vehicle_entity_id} broker_url=${b2_url} - Delete Entity ${first_parking_entity_id} broker_url=${b3_url} - Delete Entity ${second_parking_entity_id} broker_url=${b3_url} - Delete Entity ${second_vehicle_entity_id} broker_url=${b4_url} - Delete Entity ${second_parking_entity_id} broker_url=${b4_url} \ No newline at end of file + Delete Context Source Registration ${registration_id1} broker_url=${broker_A_url} + Delete Context Source Registration ${registration_id2} broker_url=${broker_A_url} + Delete Context Source Registration ${registration_id3} broker_url=${broker_A_url} + Delete Context Source Registration ${registration_id4} broker_url=${broker_A_url} + Delete Context Source Registration ${registration_id5} broker_url=${broker_A_url} + Delete Entity ${first_parking_entity_id} broker_url=${broker_B_url} + Delete Entity ${first_vehicle_entity_id} broker_url=${broker_B_url} + Delete Entity ${first_parking_entity_id} broker_url=${broker_C_url} + Delete Entity ${second_parking_entity_id} broker_url=${broker_C_url} + Delete Entity ${second_vehicle_entity_id} broker_url=${broker_D_url} + Delete Entity ${second_parking_entity_id} broker_url=${broker_D_url} \ No newline at end of file diff --git a/IOP_TP/NGSI-LD/Interoperability/Consumption/Entity/QueryEntities/IOP_CNF_03_01.robot b/IOP_TP/NGSI-LD/Interoperability/Consumption/Entity/QueryEntities/IOP_CNF_03_01.robot index 03947177..35d9fccd 100644 --- a/IOP_TP/NGSI-LD/Interoperability/Consumption/Entity/QueryEntities/IOP_CNF_03_01.robot +++ b/IOP_TP/NGSI-LD/Interoperability/Consumption/Entity/QueryEntities/IOP_CNF_03_01.robot @@ -1,6 +1,6 @@ *** Settings *** Documentation Four brokers are set up A, B, C and D. A has three registrations, one auxiliary for the entities created in B, one inclusive for the entities created in C and one inclusive for the entity created in D. -... Check that the entity returned from A match the attributes from the entity in B, C and D. + Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource Resource ${EXECDIR}/resources/ApiUtils/ContextSourceDiscovery.resource @@ -18,19 +18,18 @@ ${second_full_offstreet_payload_filename} interoperability/offstreet ${first_inclusive_registration_payload_file_path} csourceRegistrations/interoperability/context-source-registration-inclusive-1.jsonld ${second_inclusive_registration_payload_file_path} csourceRegistrations/interoperability/context-source-registration-inclusive-2.jsonld ${auxiliary_registration_payload_file_path} csourceRegistrations/interoperability/context-source-registration-auxiliary-1.jsonld -${b1_url} -${b2_url} -${b3_url} -${b4_url} +${broker_A_url} +${broker_B_url} +${broker_C_url} +${broker_D_url} *** Test Cases *** IOP_CNF_03_01 Query Entities Of Type OffstreetParking Via GET - [Documentation] Pre-conditions: No user context. Data only on leaves. B contains OffStreetParking2 without location. C contains OffStreetParking1. D contains OffStreetParking1 without location. - ... Registration established: Auxiliary in A to B. Inclusive in A to C. Inclusive in A to D. + [Documentation] Check that the entities returned from A match the attributes from the entities in B, C and D. [Tags] since_v1.6.1 iop 4_3_3 cf_06 additive-inclusive additive-auxiliary 4_3_6 5_7_2 6_4_3_1 #Client queries all entities with type OffstreetParking in A and checks for a successful response. - ${response}= Query Entities entity_types=OffstreetParking broker_url=${b1_url} + ${response}= Query Entities entity_types=OffstreetParking broker_url=${broker_A_url} Check Response Status Code 200 ${response.status_code} &{payload}= Evaluate {i['id']: i for i in ${response.json()}} @@ -38,15 +37,15 @@ IOP_CNF_03_01 Query Entities Of Type OffstreetParking Via GET ${second_parking_payload}= Get From Dictionary ${payload} OffstreetParking:2 #Client queries all entities with type OffstreetParking in B, C and D. - ${response}= Query Entities entity_types=OffstreetParking broker_url=${b2_url} + ${response}= Query Entities entity_types=OffstreetParking broker_url=${broker_B_url} ${payload}= Evaluate {i['id']: i for i in ${response.json()}} ${expected_parking1}= Get From Dictionary ${payload} OffstreetParking:2 - ${response}= Query Entities entity_types=OffstreetParking broker_url=${b3_url} + ${response}= Query Entities entity_types=OffstreetParking broker_url=${broker_C_url} ${payload}= Evaluate {i['id']: i for i in ${response.json()}} ${expected_parking2}= Get From Dictionary ${payload} OffstreetParking:1 - ${response}= Query Entities entity_types=OffstreetParking broker_url=${b4_url} + ${response}= Query Entities entity_types=OffstreetParking broker_url=${broker_D_url} ${payload}= Evaluate {i['id']: i for i in ${response.json()}} ${expected_parking3}= Get From Dictionary ${payload} OffstreetParking:2 @@ -59,14 +58,17 @@ IOP_CNF_03_01 Query Entities Of Type OffstreetParking Via GET *** Keywords *** Setup Initial Context Source Registrations + [Documentation] Pre-conditions: No user context. Data only on leaves. B contains OffStreetParking2 without location. C contains OffStreetParking1. D contains OffStreetParking1 without location. + ... Registration established: Auxiliary in A to B. Inclusive in A to C. Inclusive in A to D. + ${entity_id}= Generate Random Parking Entity Id Set Suite Variable ${entity_id} - ${response}= Create Entity ${offstreet_no_location_payload_filename} ${entity_id} broker_url=${b2_url} + ${response}= Create Entity ${offstreet_no_location_payload_filename} ${entity_id} broker_url=${broker_B_url} Check Response Status Code 201 ${response.status_code} - ${response}= Create Entity ${first_full_offstreet_payload_filename} ${entity_id} broker_url=${b3_url} + ${response}= Create Entity ${first_full_offstreet_payload_filename} ${entity_id} broker_url=${broker_C_url} Check Response Status Code 201 ${response.status_code} - ${response}= Create Entity ${second_full_offstreet_payload_filename} ${entity_id} broker_url=${b4_url} + ${response}= Create Entity ${second_full_offstreet_payload_filename} ${entity_id} broker_url=${broker_D_url} Check Response Status Code 201 ${response.status_code} ${registration_id1}= Generate Random CSR Id @@ -75,9 +77,9 @@ Setup Initial Context Source Registrations ... ${registration_id1} ... ${auxiliary_registration_payload_file_path} ... entity_id=${entity_id} - ... endpoint=${b2_url} + ... endpoint=${broker_B_url} ... mode=auxiliary - ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${b1_url} + ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${broker_A_url} Check Response Status Code 201 ${response.status_code} ${registration_id2}= Generate Random CSR Id @@ -86,9 +88,9 @@ Setup Initial Context Source Registrations ... ${registration_id2} ... ${first_inclusive_registration_payload_file_path} ... entity_id=${entity_id} - ... endpoint=${b3_url} + ... endpoint=${broker_C_url} ... mode=inclusive - ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${b1_url} + ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${broker_A_url} Check Response Status Code 201 ${response.status_code} ${registration_id3}= Generate Random CSR Id @@ -97,14 +99,14 @@ Setup Initial Context Source Registrations ... ${registration_id3} ... ${second_inclusive_registration_payload_file_path} ... entity_id=${entity_id} - ... endpoint=${b4_url} - ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${b1_url} + ... endpoint=${broker_D_url} + ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${broker_A_url} Check Response Status Code 201 ${response.status_code} Delete Entities And Delete Registrations - Delete Context Source Registration ${registration_id1} broker_url=${b1_url} - Delete Context Source Registration ${registration_id2} broker_url=${b1_url} - Delete Context Source Registration ${registration_id3} broker_url=${b1_url} - Delete Entity ${entity_id} broker_url=${b2_url} - Delete Entity ${entity_id} broker_url=${b3_url} - Delete Entity ${entity_id} broker_url=${b4_url} \ No newline at end of file + Delete Context Source Registration ${registration_id1} broker_url=${broker_A_url} + Delete Context Source Registration ${registration_id2} broker_url=${broker_A_url} + Delete Context Source Registration ${registration_id3} broker_url=${broker_A_url} + Delete Entity ${entity_id} broker_url=${broker_B_url} + Delete Entity ${entity_id} broker_url=${broker_C_url} + Delete Entity ${entity_id} broker_url=${broker_D_url} \ No newline at end of file diff --git a/IOP_TP/NGSI-LD/Interoperability/Consumption/Entity/QueryEntities/IOP_CNF_03_02.robot b/IOP_TP/NGSI-LD/Interoperability/Consumption/Entity/QueryEntities/IOP_CNF_03_02.robot index a06424c6..41cf7c5b 100644 --- a/IOP_TP/NGSI-LD/Interoperability/Consumption/Entity/QueryEntities/IOP_CNF_03_02.robot +++ b/IOP_TP/NGSI-LD/Interoperability/Consumption/Entity/QueryEntities/IOP_CNF_03_02.robot @@ -1,6 +1,6 @@ *** Settings *** Documentation Four brokers are set up A, B, C and D. A has three registrations, one auxiliary for the entities created in B, one inclusive for the entities created in C and one inclusive for the entity created in D. -... Check that queried entities returned from B, C and D match the attributes from the entities in A. + Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource Resource ${EXECDIR}/resources/ApiUtils/ContextSourceDiscovery.resource @@ -19,19 +19,18 @@ ${second_full_offstreet_payload_filename} interoperability/offstreet-parki ${parking_location_name_payload_filename} interoperability/offstreet-parking1-location-and-name.jsonld ${inclusive_registration_payload_file_path} csourceRegistrations/interoperability/context-source-registration-inclusive-1.jsonld ${auxiliary_registration_payload_file_path} csourceRegistrations/interoperability/context-source-registration-auxiliary-3.jsonld -${b1_url} -${b2_url} -${b3_url} -${b4_url} +${broker_A_url} +${broker_B_url} +${broker_C_url} +${broker_D_url} *** Test Cases *** IOP_CNF_03_02 Query Entities Of Type OffstreetParking And Vehicle with attrs - [Documentation] Pre-conditions: No user context. Data only on leaves. B contains Vehicle:1. C contains OffStreetParking:1 with location and name only. D contains OffStreetParking:1, OffStreetParking:2 and Vehicle2. - ... Registrations established: Auxiliary in A to B. Inclusive in A to C. Inclusive in A to D. + [Documentation] Check that queried entities returned from B, C and D match the attributes from the entities in A. [Tags] since_v1.6.1 iop 4_3_3 cf_06 additive-inclusive additive-auxiliary 4_3_6 5_7_2 6_4_3_1 #Client retrieves the location property from all entities with type OffstreetParking and Vehicle in A and checks for a successful response. - ${response}= Query Entities entity_types=OffstreetParking,Vehicle attrs=location broker_url=${b1_url} + ${response}= Query Entities entity_types=OffstreetParking,Vehicle attrs=location broker_url=${broker_A_url} Check Response Status Code 200 ${response.status_code} &{payload}= Evaluate {i['id']: i for i in ${response.json()}} @@ -42,15 +41,15 @@ IOP_CNF_03_02 Query Entities Of Type OffstreetParking And Vehicle with attrs Should Contain ${second_parking_payload} location #Client queries all entities with type OffstreetParking and Vehicle in B, C and D. - ${response}= Query Entities entity_types=OffstreetParking,Vehicle attrs=location broker_url=${b2_url} + ${response}= Query Entities entity_types=OffstreetParking,Vehicle attrs=location broker_url=${broker_B_url} ${payload}= Evaluate {i['id']: i for i in ${response.json()}} ${expected_entity1}= Get From Dictionary ${payload} Vehicle:1 - ${response}= Query Entities entity_types=OffstreetParking,Vehicle attrs=location broker_url=${b3_url} + ${response}= Query Entities entity_types=OffstreetParking,Vehicle attrs=location broker_url=${broker_C_url} ${payload}= Evaluate {i['id']: i for i in ${response.json()}} ${expected_entity2}= Get From Dictionary ${payload} OffstreetParking:1 - ${response}= Query Entities entity_types=OffstreetParking,Vehicle attrs=location broker_url=${b4_url} + ${response}= Query Entities entity_types=OffstreetParking,Vehicle attrs=location broker_url=${broker_D_url} ${payload}= Evaluate {i['id']: i for i in ${response.json()}} ${expected_entity3}= Get From Dictionary ${payload} OffstreetParking:1 ${expected_entity4}= Get From Dictionary ${payload} OffstreetParking:2 @@ -65,6 +64,9 @@ IOP_CNF_03_02 Query Entities Of Type OffstreetParking And Vehicle with attrs *** Keywords *** Setup Initial Context Source Registrations + [Documentation] Pre-conditions: No user context. Data only on leaves. B contains Vehicle:1. C contains OffStreetParking:1 with location and name only. D contains OffStreetParking:1, OffStreetParking:2 and Vehicle2. + ... Registrations established: Auxiliary in A to B. Inclusive in A to C. Inclusive in A to D. + ${parking_entity_id1}= Generate Random Parking Entity Id Set Suite Variable ${parking_entity_id1} ${parking_entity_id2}= Generate Random Parking Entity Id @@ -74,15 +76,15 @@ Setup Initial Context Source Registrations ${vehicle_entity_id2}= Generate Random Vehicle Entity Id Set Suite Variable ${vehicle_entity_id2} - ${response}= Create Entity ${first_vehicle_payload_filename} ${vehicle_entity_id1} broker_url=${b2_url} + ${response}= Create Entity ${first_vehicle_payload_filename} ${vehicle_entity_id1} broker_url=${broker_B_url} Check Response Status Code 201 ${response.status_code} - ${response}= Create Entity ${parking_location_name_payload_filename} ${parking_entity_id1} broker_url=${b3_url} + ${response}= Create Entity ${parking_location_name_payload_filename} ${parking_entity_id1} broker_url=${broker_C_url} Check Response Status Code 201 ${response.status_code} - ${response}= Create Entity ${first_full_offstreet_payload_filename} ${parking_entity_id1} broker_url=${b4_url} + ${response}= Create Entity ${first_full_offstreet_payload_filename} ${parking_entity_id1} broker_url=${broker_D_url} Check Response Status Code 201 ${response.status_code} - ${response}= Create Entity ${second_full_offstreet_payload_filename} ${parking_entity_id2} broker_url=${b4_url} + ${response}= Create Entity ${second_full_offstreet_payload_filename} ${parking_entity_id2} broker_url=${broker_D_url} Check Response Status Code 201 ${response.status_code} - ${response}= Create Entity ${first_vehicle_payload_filename} ${vehicle_entity_id2} broker_url=${b4_url} + ${response}= Create Entity ${first_vehicle_payload_filename} ${vehicle_entity_id2} broker_url=${broker_D_url} Check Response Status Code 201 ${response.status_code} ${registration_id1}= Generate Random CSR Id @@ -91,9 +93,9 @@ Setup Initial Context Source Registrations ... ${registration_id1} ... ${auxiliary_registration_payload_file_path} ... entity_id=${vehicle_entity_id1} - ... endpoint=${b2_url} + ... endpoint=${broker_B_url} ... mode=auxiliary - ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${b1_url} + ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${broker_A_url} Check Response Status Code 201 ${response.status_code} ${registration_id2}= Generate Random CSR Id @@ -102,9 +104,9 @@ Setup Initial Context Source Registrations ... ${registration_id2} ... ${inclusive_registration_payload_file_path} ... entity_id=${parking_entity_id1} - ... endpoint=${b3_url} + ... endpoint=${broker_C_url} ... mode=inclusive - ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${b1_url} + ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${broker_A_url} Check Response Status Code 201 ${response.status_code} ${registration_id3}= Generate Random CSR Id @@ -113,9 +115,9 @@ Setup Initial Context Source Registrations ... ${registration_id3} ... ${inclusive_registration_payload_file_path} ... entity_id=${vehicle_entity_id2} - ... endpoint=${b4_url} + ... endpoint=${broker_D_url} ... mode=inclusive - ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${b1_url} + ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${broker_A_url} Check Response Status Code 201 ${response.status_code} ${registration_id4}= Generate Random CSR Id @@ -124,8 +126,8 @@ Setup Initial Context Source Registrations ... ${registration_id4} ... ${inclusive_registration_payload_file_path} ... entity_id=${parking_entity_id1} - ... endpoint=${b3_url} - ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${b1_url} + ... endpoint=${broker_C_url} + ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${broker_A_url} Check Response Status Code 201 ${response.status_code} ${registration_id5}= Generate Random CSR Id @@ -134,19 +136,19 @@ Setup Initial Context Source Registrations ... ${registration_id5} ... ${inclusive_registration_payload_file_path} ... entity_id=${parking_entity_id2} - ... endpoint=${b4_url} + ... endpoint=${broker_D_url} ... mode=inclusive - ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${b1_url} + ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${broker_A_url} Check Response Status Code 201 ${response.status_code} Delete Entities And Delete Registrations - Delete Context Source Registration ${registration_id1} broker_url=${b1_url} - Delete Context Source Registration ${registration_id2} broker_url=${b1_url} - Delete Context Source Registration ${registration_id3} broker_url=${b1_url} - Delete Context Source Registration ${registration_id4} broker_url=${b1_url} - Delete Context Source Registration ${registration_id5} broker_url=${b1_url} - Delete Entity ${vehicle_entity_id1} broker_url=${b2_url} - Delete Entity ${parking_entity_id1} broker_url=${b3_url} - Delete Entity ${parking_entity_id1} broker_url=${b4_url} - Delete Entity ${parking_entity_id2} broker_url=${b4_url} - Delete Entity ${vehicle_entity_id2} broker_url=${b4_url} \ No newline at end of file + Delete Context Source Registration ${registration_id1} broker_url=${broker_A_url} + Delete Context Source Registration ${registration_id2} broker_url=${broker_A_url} + Delete Context Source Registration ${registration_id3} broker_url=${broker_A_url} + Delete Context Source Registration ${registration_id4} broker_url=${broker_A_url} + Delete Context Source Registration ${registration_id5} broker_url=${broker_A_url} + Delete Entity ${vehicle_entity_id1} broker_url=${broker_B_url} + Delete Entity ${parking_entity_id1} broker_url=${broker_C_url} + Delete Entity ${parking_entity_id1} broker_url=${broker_D_url} + Delete Entity ${parking_entity_id2} broker_url=${broker_D_url} + Delete Entity ${vehicle_entity_id2} broker_url=${broker_D_url} \ No newline at end of file diff --git a/IOP_TP/NGSI-LD/Interoperability/Consumption/Entity/QueryEntities/IOP_CNF_04_01.robot b/IOP_TP/NGSI-LD/Interoperability/Consumption/Entity/QueryEntities/IOP_CNF_04_01.robot index 4b8a4f66..eb22dac8 100644 --- a/IOP_TP/NGSI-LD/Interoperability/Consumption/Entity/QueryEntities/IOP_CNF_04_01.robot +++ b/IOP_TP/NGSI-LD/Interoperability/Consumption/Entity/QueryEntities/IOP_CNF_04_01.robot @@ -1,6 +1,6 @@ *** Settings *** Documentation Five brokers are set up A, B, C, D and E. A has two registrations, one auxiliary for the entity created in B, one inclusive for the entity created in C. B has two registrations, one redirect for the entity created in D and one redirect for the entity created in E. C has two exclusive registrations to E. -... Check that the entities found in B, C, D and E can be queried from A via HTTP GET and said entities have the same attributes as the ones queried from A. + Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource Resource ${EXECDIR}/resources/ApiUtils/ContextSourceDiscovery.resource @@ -22,20 +22,19 @@ ${first_exclusive_registration_payload_file_path} csourceRegistrations/inter ${second_exclusive_registration_payload_file_path} csourceRegistrations/interoperability/context-source-registration-exclusive-3.jsonld ${first_redirect_registration_payload_file_path} csourceRegistrations/interoperability/context-source-registration-redirect-1.jsonld ${second_redirect_registration_payload_file_path} csourceRegistrations/interoperability/context-source-registration-redirect-2.jsonld -${b1_url} -${b2_url} -${b3_url} -${b4_url} -${b5_url} +${broker_A_url} +${broker_B_url} +${broker_C_url} +${broker_D_url} +${broker_E_url} *** Test Cases *** IOP_CNF_04_01 Query Entities Of Type OffstreetParking Via GET - [Documentation] Pre-conditions: No user context. Data only on leaves. D contains OffStreetParking:1 with location and name only and OffStreetParking:2. E contains OffStreetParking:1 and OffStreetParking:2 with location and name only. - ... Registrations established: Auxiliary in A to B and Inclusive in A to C. Redirect in B to D and Redirect in B to E. Exclusive in C to E. + [Documentation] Check that the entities found in B, C, D and E can be queried from A via HTTP GET and said entities have the same attributes as the ones queried from A. [Tags] since_v1.6.1 iop 4_3_3 cf_06 additive-inclusive additive-auxiliary proxy-exclusive proxy-redirect 4_3_6 5_7_2 6_4_3_1 #Client queries all entities with type OffstreetParking in A and checks for a successful response. - ${response}= Query Entities entity_types=OffstreetParking broker_url=${b1_url} + ${response}= Query Entities entity_types=OffstreetParking broker_url=${broker_A_url} Check Response Status Code 200 ${response.status_code} &{payload}= Evaluate {i['id']: i for i in ${response.json()}} @@ -47,10 +46,10 @@ IOP_CNF_04_01 Query Entities Of Type OffstreetParking Via GET Should Contain ${second_parking_payload} location #Client queries all entities with type OffstreetParking in D and E. - ${response}= Query Entities entity_types=OffstreetParking broker_url=${b4_url} + ${response}= Query Entities entity_types=OffstreetParking broker_url=${broker_D_url} ${payload}= Evaluate {i['id']: i for i in ${response.json()}} ${expected_entity1}= Get From Dictionary ${payload} OffstreetParking:2 - ${response}= Query Entities entity_types=OffstreetParking broker_url=${b5_url} + ${response}= Query Entities entity_types=OffstreetParking broker_url=${broker_E_url} ${payload}= Evaluate {i['id']: i for i in ${response.json()}} ${expected_entity2}= Get From Dictionary ${payload} OffstreetParking:1 ${expected_entity3}= Get From Dictionary ${payload} OffstreetParking:2 @@ -63,16 +62,19 @@ IOP_CNF_04_01 Query Entities Of Type OffstreetParking Via GET *** Keywords *** Setup Initial Context Source Registrations + [Documentation] Pre-conditions: No user context. Data only on leaves. D contains OffStreetParking:1 with location and name only and OffStreetParking:2. E contains OffStreetParking:1 and OffStreetParking:2 with location and name only. + ... Registrations established: Auxiliary in A to B and Inclusive in A to C. Redirect in B to D and Redirect in B to E. Exclusive in C to E. + ${entity_id}= Generate Random Parking Entity Id Set Suite Variable ${entity_id} - ${response}= Create Entity ${first_parking_location_name_payload_filename} ${entity_id} broker_url=${b4_url} + ${response}= Create Entity ${first_parking_location_name_payload_filename} ${entity_id} broker_url=${broker_D_url} Check Response Status Code 201 ${response.status_code} - ${response}= Create Entity ${second_full_parking_payload_filename} ${entity_id} broker_url=${b4_url} + ${response}= Create Entity ${second_full_parking_payload_filename} ${entity_id} broker_url=${broker_D_url} Check Response Status Code 201 ${response.status_code} - ${response}= Create Entity ${first_full_parking_payload_filename} ${entity_id} broker_url=${b5_url} + ${response}= Create Entity ${first_full_parking_payload_filename} ${entity_id} broker_url=${broker_E_url} Check Response Status Code 201 ${response.status_code} - ${response}= Create Entity ${second_parking_location_name_payload_filename} ${entity_id} broker_url=${b5_url} + ${response}= Create Entity ${second_parking_location_name_payload_filename} ${entity_id} broker_url=${broker_E_url} Check Response Status Code 201 ${response.status_code} ${registration_id1}= Generate Random CSR Id @@ -81,9 +83,9 @@ Setup Initial Context Source Registrations ... ${registration_id1} ... ${auxiliary_registration_payload_file_path} ... entity_id=${entity_id} - ... endpoint=${b2_url} + ... endpoint=${broker_B_url} ... mode=auxiliary - ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${b1_url} + ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${broker_A_url} Check Response Status Code 201 ${response.status_code} ${registration_id2}= Generate Random CSR Id @@ -92,9 +94,9 @@ Setup Initial Context Source Registrations ... ${registration_id2} ... ${first_redirect_registration_payload_file_path} ... entity_id=${entity_id} - ... endpoint=${b4_url} + ... endpoint=${broker_D_url} ... mode=redirect - ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${b2_url} + ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${broker_B_url} Check Response Status Code 201 ${response.status_code} ${registration_id3}= Generate Random CSR Id @@ -103,9 +105,9 @@ Setup Initial Context Source Registrations ... ${registration_id3} ... ${second_redirect_registration_payload_file_path} ... entity_id=${entity_id} - ... endpoint=${b5_url} + ... endpoint=${broker_E_url} ... mode=redirect - ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${b2_url} + ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${broker_B_url} Check Response Status Code 201 ${response.status_code} ${registration_id4}= Generate Random CSR Id @@ -114,9 +116,9 @@ Setup Initial Context Source Registrations ... ${registration_id4} ... ${inclusive_registration_payload_file_path} ... entity_id=${entity_id} - ... endpoint=${b3_url} + ... endpoint=${broker_C_url} ... mode=inclusive - ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${b1_url} + ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${broker_A_url} Check Response Status Code 201 ${response.status_code} ${registration_id5}= Generate Random CSR Id @@ -125,9 +127,9 @@ Setup Initial Context Source Registrations ... ${registration_id5} ... ${first_exclusive_registration_payload_file_path} ... entity_id=${entity_id} - ... endpoint=${b5_url} + ... endpoint=${broker_E_url} ... mode=exclusive - ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${b3_url} + ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${broker_C_url} Check Response Status Code 201 ${response.status_code} ${registration_id6}= Generate Random CSR Id @@ -136,19 +138,19 @@ Setup Initial Context Source Registrations ... ${registration_id6} ... ${second_exclusive_registration_payload_file_path} ... entity_id=${entity_id} - ... endpoint=${b5_url} + ... endpoint=${broker_E_url} ... mode=exclusive - ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${b3_url} + ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${broker_C_url} Check Response Status Code 201 ${response.status_code} Delete Entities And Delete Registrations - Delete Context Source Registration ${registration_id1} broker_url=${b1_url} - Delete Context Source Registration ${registration_id2} broker_url=${b2_url} - Delete Context Source Registration ${registration_id3} broker_url=${b2_url} - Delete Context Source Registration ${registration_id4} broker_url=${b1_url} - Delete Context Source Registration ${registration_id5} broker_url=${b3_url} - Delete Context Source Registration ${registration_id6} broker_url=${b3_url} - Delete Entity ${entity_id} broker_url=${b4_url} - Delete Entity ${entity_id} broker_url=${b4_url} - Delete Entity ${entity_id} broker_url=${b5_url} - Delete Entity ${entity_id} broker_url=${b5_url} \ No newline at end of file + Delete Context Source Registration ${registration_id1} broker_url=${broker_A_url} + Delete Context Source Registration ${registration_id2} broker_url=${broker_B_url} + Delete Context Source Registration ${registration_id3} broker_url=${broker_B_url} + Delete Context Source Registration ${registration_id4} broker_url=${broker_A_url} + Delete Context Source Registration ${registration_id5} broker_url=${broker_C_url} + Delete Context Source Registration ${registration_id6} broker_url=${broker_C_url} + Delete Entity ${entity_id} broker_url=${broker_D_url} + Delete Entity ${entity_id} broker_url=${broker_D_url} + Delete Entity ${entity_id} broker_url=${broker_E_url} + Delete Entity ${entity_id} broker_url=${broker_E_url} \ No newline at end of file diff --git a/IOP_TP/NGSI-LD/Interoperability/Consumption/Entity/QueryEntities/IOP_CNF_04_02.robot b/IOP_TP/NGSI-LD/Interoperability/Consumption/Entity/QueryEntities/IOP_CNF_04_02.robot index 5651aa0c..1c2a4f14 100644 --- a/IOP_TP/NGSI-LD/Interoperability/Consumption/Entity/QueryEntities/IOP_CNF_04_02.robot +++ b/IOP_TP/NGSI-LD/Interoperability/Consumption/Entity/QueryEntities/IOP_CNF_04_02.robot @@ -1,6 +1,6 @@ *** Settings *** Documentation Five brokers are set up A, B, C, D and E. A has two registrations, one auxiliary for the entity created in B, one inclusive for the entity created in C. B has two registrations, one redirect for the entity created in D and one redirect for the entity created in E. C has two exclusive registrations to E. -... Check that the entities found in B, C, D and E can be queried from A via HTTP POST and said entities have the same attributes as the ones queried from A. + Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource Resource ${EXECDIR}/resources/ApiUtils/ContextSourceDiscovery.resource @@ -22,20 +22,19 @@ ${first_exclusive_registration_payload_file_path} csourceRegistrations/inter ${second_exclusive_registration_payload_file_path} csourceRegistrations/interoperability/context-source-registration-exclusive-3.jsonld ${first_redirect_registration_payload_file_path} csourceRegistrations/interoperability/context-source-registration-redirect-1.jsonld ${second_redirect_registration_payload_file_path} csourceRegistrations/interoperability/context-source-registration-redirect-2.jsonld -${b1_url} -${b2_url} -${b3_url} -${b4_url} -${b5_url} +${broker_A_url} +${broker_B_url} +${broker_C_url} +${broker_D_url} +${broker_E_url} *** Test Cases *** IOP_CNF_04_02 Query Entities Of Type OffstreetParking Via POST - [Documentation] Pre-conditions: No user context. Data only on leaves. D contains OffStreetParking:1 with location and name only and OffStreetParking2. E contains OffStreetParking:1 and OffStreetParking:2 with location and name only. - ... Registrations established: Auxiliary in A to B and Inclusive in A to C. Redirect in B to D and Redirect in B to E. Exclusive in C to E. + [Documentation] Check that the entities found in B, C, D and E can be queried from A via HTTP POST and said entities have the same attributes as the ones queried from A. [Tags] since_v1.6.1 iop 4_3_3 cf_06 additive-inclusive additive-auxiliary proxy-exclusive proxy-redirect 4_3_6 5_7_2 6_23_2_1 #Client queries all entities with type OffstreetParking in A and checks for a successful response. - ${response}= Query Entities Via POST entity_types=OffstreetParking broker_url=${b1_url} + ${response}= Query Entities Via POST entity_types=OffstreetParking broker_url=${broker_A_url} Check Response Status Code 200 ${response.status_code} &{payload}= Evaluate {i['id']: i for i in ${response.json()}} @@ -47,10 +46,10 @@ IOP_CNF_04_02 Query Entities Of Type OffstreetParking Via POST Should Contain ${second_parking_payload} location #Client queries all entities with type OffstreetParking in D and E. - ${response}= Query Entities entity_types=OffstreetParking broker_url=${b4_url} + ${response}= Query Entities entity_types=OffstreetParking broker_url=${broker_D_url} ${payload}= Evaluate {i['id']: i for i in ${response.json()}} ${expected_entity1}= Get From Dictionary ${payload} OffstreetParking:2 - ${response}= Query Entities entity_types=OffstreetParking broker_url=${b5_url} + ${response}= Query Entities entity_types=OffstreetParking broker_url=${broker_E_url} ${payload}= Evaluate {i['id']: i for i in ${response.json()}} ${expected_entity2}= Get From Dictionary ${payload} OffstreetParking:1 ${expected_entity3}= Get From Dictionary ${payload} OffstreetParking:2 @@ -63,16 +62,19 @@ IOP_CNF_04_02 Query Entities Of Type OffstreetParking Via POST *** Keywords *** Setup Initial Context Source Registrations + [Documentation] Pre-conditions: No user context. Data only on leaves. D contains OffStreetParking:1 with location and name only and OffStreetParking2. E contains OffStreetParking:1 and OffStreetParking:2 with location and name only. + ... Registrations established: Auxiliary in A to B and Inclusive in A to C. Redirect in B to D and Redirect in B to E. Exclusive in C to E. + ${entity_id}= Generate Random Parking Entity Id Set Suite Variable ${entity_id} - ${response}= Create Entity ${first_parking_location_name_payload_filename} ${entity_id} broker_url=${b4_url} + ${response}= Create Entity ${first_parking_location_name_payload_filename} ${entity_id} broker_url=${broker_D_url} Check Response Status Code 201 ${response.status_code} - ${response}= Create Entity ${second_full_parking_payload_filename} ${entity_id} broker_url=${b4_url} + ${response}= Create Entity ${second_full_parking_payload_filename} ${entity_id} broker_url=${broker_D_url} Check Response Status Code 201 ${response.status_code} - ${response}= Create Entity ${first_full_parking_payload_filename} ${entity_id} broker_url=${b5_url} + ${response}= Create Entity ${first_full_parking_payload_filename} ${entity_id} broker_url=${broker_E_url} Check Response Status Code 201 ${response.status_code} - ${response}= Create Entity ${second_parking_location_name_payload_filename} ${entity_id} broker_url=${b5_url} + ${response}= Create Entity ${second_parking_location_name_payload_filename} ${entity_id} broker_url=${broker_E_url} Check Response Status Code 201 ${response.status_code} ${registration_id1}= Generate Random CSR Id @@ -81,9 +83,9 @@ Setup Initial Context Source Registrations ... ${registration_id1} ... ${auxiliary_registration_payload_file_path} ... entity_id=${entity_id} - ... endpoint=${b2_url} + ... endpoint=${broker_B_url} ... mode=auxiliary - ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${b1_url} + ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${broker_A_url} Check Response Status Code 201 ${response.status_code} ${registration_id2}= Generate Random CSR Id @@ -92,9 +94,9 @@ Setup Initial Context Source Registrations ... ${registration_id2} ... ${first_redirect_registration_payload_file_path} ... entity_id=${entity_id} - ... endpoint=${b4_url} + ... endpoint=${broker_D_url} ... mode=redirect - ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${b2_url} + ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${broker_B_url} Check Response Status Code 201 ${response.status_code} ${registration_id3}= Generate Random CSR Id @@ -103,9 +105,9 @@ Setup Initial Context Source Registrations ... ${registration_id3} ... ${second_redirect_registration_payload_file_path} ... entity_id=${entity_id} - ... endpoint=${b5_url} + ... endpoint=${broker_E_url} ... mode=redirect - ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${b2_url} + ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${broker_B_url} Check Response Status Code 201 ${response.status_code} ${registration_id4}= Generate Random CSR Id @@ -114,9 +116,9 @@ Setup Initial Context Source Registrations ... ${registration_id4} ... ${inclusive_registration_payload_file_path} ... entity_id=${entity_id} - ... endpoint=${b3_url} + ... endpoint=${broker_C_url} ... mode=inclusive - ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${b1_url} + ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${broker_A_url} Check Response Status Code 201 ${response.status_code} ${registration_id5}= Generate Random CSR Id @@ -125,9 +127,9 @@ Setup Initial Context Source Registrations ... ${registration_id5} ... ${first_exclusive_registration_payload_file_path} ... entity_id=${entity_id} - ... endpoint=${b5_url} + ... endpoint=${broker_E_url} ... mode=exclusive - ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${b3_url} + ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${broker_C_url} Check Response Status Code 201 ${response.status_code} ${registration_id6}= Generate Random CSR Id @@ -136,19 +138,19 @@ Setup Initial Context Source Registrations ... ${registration_id6} ... ${second_exclusive_registration_payload_file_path} ... entity_id=${entity_id} - ... endpoint=${b5_url} + ... endpoint=${broker_E_url} ... mode=exclusive - ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${b3_url} + ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${broker_C_url} Check Response Status Code 201 ${response.status_code} Delete Entities And Delete Registrations - Delete Context Source Registration ${registration_id1} broker_url=${b1_url} - Delete Context Source Registration ${registration_id2} broker_url=${b2_url} - Delete Context Source Registration ${registration_id3} broker_url=${b2_url} - Delete Context Source Registration ${registration_id4} broker_url=${b1_url} - Delete Context Source Registration ${registration_id5} broker_url=${b3_url} - Delete Context Source Registration ${registration_id6} broker_url=${b3_url} - Delete Entity ${entity_id} broker_url=${b4_url} - Delete Entity ${entity_id} broker_url=${b4_url} - Delete Entity ${entity_id} broker_url=${b5_url} - Delete Entity ${entity_id} broker_url=${b5_url} \ No newline at end of file + Delete Context Source Registration ${registration_id1} broker_url=${broker_A_url} + Delete Context Source Registration ${registration_id2} broker_url=${broker_B_url} + Delete Context Source Registration ${registration_id3} broker_url=${broker_B_url} + Delete Context Source Registration ${registration_id4} broker_url=${broker_A_url} + Delete Context Source Registration ${registration_id5} broker_url=${broker_C_url} + Delete Context Source Registration ${registration_id6} broker_url=${broker_C_url} + Delete Entity ${entity_id} broker_url=${broker_D_url} + Delete Entity ${entity_id} broker_url=${broker_D_url} + Delete Entity ${entity_id} broker_url=${broker_E_url} + Delete Entity ${entity_id} broker_url=${broker_E_url} \ No newline at end of file diff --git a/IOP_TP/NGSI-LD/Interoperability/Consumption/Entity/RetrieveEntity/IOP_CNF_01_01.robot b/IOP_TP/NGSI-LD/Interoperability/Consumption/Entity/RetrieveEntity/IOP_CNF_01_01.robot index d98e5e74..495e1b59 100644 --- a/IOP_TP/NGSI-LD/Interoperability/Consumption/Entity/RetrieveEntity/IOP_CNF_01_01.robot +++ b/IOP_TP/NGSI-LD/Interoperability/Consumption/Entity/RetrieveEntity/IOP_CNF_01_01.robot @@ -1,5 +1,5 @@ *** Settings *** -Documentation Three brokers are set up A, B and C. A has two registrations, one inclusive for the entities created in B and one exclusive for the entity created in C. Check that the same entity created in B and C can be returned from A. +Documentation Three brokers are set up A, B and C. A has two registrations, one inclusive for the entities created in B and one exclusive for the entity created in C. Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource @@ -16,25 +16,24 @@ ${first_entity_payload_filename} interoperability/offstreet-parkin ${second_entity_payload_filename} interoperability/offstreet-parking2-full.jsonld ${inclusive_registration_payload_file_path} csourceRegistrations/interoperability/context-source-registration-inclusive-2.jsonld ${exclusive_registration_payload_file_path} csourceRegistrations/interoperability/context-source-registration-exclusive-2.jsonld -${b1_url} -${b2_url} -${b3_url} +${broker_A_url} +${broker_B_url} +${broker_C_url} *** Test Cases *** IOP_CNF_01_01 Retrieve OffStreetParking:1 - [Documentation] Pre-conditions: no user context. Data only on leaves. B contains OffStreetParking1 and OffStreetParking2. C contains OffStreetParking2. - ... Registrations established: Inclusive in A to B. Exclusive in A to C. + [Documentation] Check that the same entity created in B and C can be returned from A. [Tags] since_v1.6.1 iop 4_3_3 cf_06 additive-inclusive proxy-exclusive 4_3_6 5_7_1 #Client retrieves OffStreetParking:1 in A and checks for a successful response. - ${response}= Retrieve Entity ${entity_id1} broker_url=${b1_url} + ${response}= Retrieve Entity ${entity_id1} broker_url=${broker_A_url} Check Response Status Code 200 ${response.status_code} Should Contain ${response.json()} availableSpotsNumber Should Contain ${response.json()} totalSpotsNumber #Client retrieves OffStreetParking:1 in B. ${expected_payload}= Load Entity ${first_entity_payload_filename} ${entity_id1} - ${response}= Retrieve Entity ${entity_id1} broker_url=${b2_url} + ${response}= Retrieve Entity ${entity_id1} broker_url=${broker_B_url} Check Response Status Code 200 ${response.status_code} #Client checks that the entity returned is the full entity. @@ -42,16 +41,19 @@ IOP_CNF_01_01 Retrieve OffStreetParking:1 *** Keywords *** Setup Initial Context Source Registrations + [Documentation] Pre-conditions: No user context. Data only on leaves. B contains OffStreetParking:1 and OffStreetParking:2. C contains OffStreetParking:2. + ... Registrations established: Inclusive in A to B. Exclusive in A to C. + ${entity_id1}= Generate Random Parking Entity Id Set Suite Variable ${entity_id1} - ${response}= Create Entity ${first_entity_payload_filename} ${entity_id1} broker_url=${b2_url} + ${response}= Create Entity ${first_entity_payload_filename} ${entity_id1} broker_url=${broker_B_url} Check Response Status Code 201 ${response.status_code} ${entity_id2}= Generate Random Parking Entity Id Set Suite Variable ${entity_id2} - ${response}= Create Entity ${second_entity_payload_filename} ${entity_id2} broker_url=${b2_url} + ${response}= Create Entity ${second_entity_payload_filename} ${entity_id2} broker_url=${broker_B_url} Check Response Status Code 201 ${response.status_code} - ${response}= Create Entity ${second_entity_payload_filename} ${entity_id2} broker_url=${b3_url} + ${response}= Create Entity ${second_entity_payload_filename} ${entity_id2} broker_url=${broker_C_url} Check Response Status Code 201 ${response.status_code} ${registration_id1}= Generate Random CSR Id @@ -60,9 +62,9 @@ Setup Initial Context Source Registrations ... ${registration_id1} ... ${inclusive_registration_payload_file_path} ... entity_id=${entity_id1} - ... broker_url=${b2_url} + ... broker_url=${broker_B_url} ... mode=inclusive - ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${b1_url} + ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${broker_A_url} Check Response Status Code 201 ${response.status_code} ${registration_id2}= Generate Random CSR Id @@ -71,14 +73,14 @@ Setup Initial Context Source Registrations ... ${registration_id2} ... ${exclusive_registration_payload_file_path} ... entity_id=${entity_id2} - ... broker_url=${b3_url} + ... broker_url=${broker_C_url} ... mode=exclusive - ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${b1_url} + ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${broker_A_url} Check Response Status Code 201 ${response.status_code} Delete Entities And Delete Registrations - Delete Context Source Registration ${registration_id1} broker_url=${b1_url} - Delete Context Source Registration ${registration_id2} broker_url=${b1_url} - Delete Entity ${entity_id1} broker_url=${b2_url} - Delete Entity ${entity_id2} broker_url=${b2_url} - Delete Entity ${entity_id2} broker_url=${b3_url} \ No newline at end of file + Delete Context Source Registration ${registration_id1} broker_url=${broker_A_url} + Delete Context Source Registration ${registration_id2} broker_url=${broker_A_url} + Delete Entity ${entity_id1} broker_url=${broker_B_url} + Delete Entity ${entity_id2} broker_url=${broker_B_url} + Delete Entity ${entity_id2} broker_url=${broker_C_url} \ No newline at end of file diff --git a/IOP_TP/NGSI-LD/Interoperability/Consumption/Entity/RetrieveEntity/IOP_CNF_01_02.robot b/IOP_TP/NGSI-LD/Interoperability/Consumption/Entity/RetrieveEntity/IOP_CNF_01_02.robot index d5994bdd..f2e7fd67 100644 --- a/IOP_TP/NGSI-LD/Interoperability/Consumption/Entity/RetrieveEntity/IOP_CNF_01_02.robot +++ b/IOP_TP/NGSI-LD/Interoperability/Consumption/Entity/RetrieveEntity/IOP_CNF_01_02.robot @@ -1,6 +1,5 @@ *** Settings *** -Documentation Three brokers are set up A, B and C. A has two registrations, one inclusive for the the entity created in B and one exclusive for the entity created in C. Check that the entity returned from A has attributes from both entities in B and C. - +Documentation Three brokers are set up A, B and C. A has two registrations, one inclusive for the the entity created in B and one exclusive for the entity created in C. Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource Resource ${EXECDIR}/resources/ApiUtils/ContextSourceDiscovery.resource @@ -16,25 +15,24 @@ ${entity_payload_filename} interoperability/offstreet-parkin ${full_entity_payload_filename} interoperability/offstreet-parking2-full.jsonld ${inclusive_registration_payload_file_path} csourceRegistrations/interoperability/context-source-registration-inclusive-2.jsonld ${exclusive_registration_payload_file_path} csourceRegistrations/interoperability/context-source-registration-exclusive-2.jsonld -${b1_url} -${b2_url} -${b3_url} +${broker_A_url} +${broker_B_url} +${broker_C_url} *** Test Cases *** IOP_CNF_01_02 Retrieve OffStreetParking:2 - [Documentation] Pre-conditions: no user context. Data only on leaves. B contains OffStreetParking2 without location. C contains OffStreetParking2. - ... Registrations established: Inclusive in A to B. Exclusive in A to C. + [Documentation] Check that the entity returned from A has attributes from both entities in B and C. [Tags] since_v1.6.1 iop 4_3_3 cf_06 additive-inclusive proxy-exclusive 4_3_6 5_7_1 #Client retrieves OffStreetParking:2 in A and checks for a successful response. - ${response}= Retrieve Entity ${entity_id} broker_url=${b1_url} + ${response}= Retrieve Entity ${entity_id} broker_url=${broker_A_url} Check Response Status Code 200 ${response.status_code} ${payload}= Set To Dictionary ${response.json()} #Client retrieves OffStreetParking:2 in B and C. - ${response}= Retrieve Entity ${entity_id} broker_url=${b2_url} + ${response}= Retrieve Entity ${entity_id} broker_url=${broker_B_url} ${first_expected_payload}= Set To Dictionary ${response.json()} - ${response}= Retrieve Entity ${entity_id} broker_url=${b3_url} + ${response}= Retrieve Entity ${entity_id} broker_url=${broker_C_url} ${second_expected_payload}= Set To Dictionary ${response.json()} #Client checks that the entity returned from A has attributes from both entities in B and C. @@ -44,11 +42,14 @@ IOP_CNF_01_02 Retrieve OffStreetParking:2 *** Keywords *** Setup Initial Context Source Registrations + [Documentation] Pre-conditions: no user context. Data only on leaves. B contains OffStreetParking2 without location. C contains OffStreetParking2. + ... Registrations established: Inclusive in A to B. Exclusive in A to C. + ${entity_id}= Generate Random Parking Entity Id Set Suite Variable ${entity_id} - ${response}= Create Entity ${entity_payload_filename} ${entity_id} broker_url=${b2_url} + ${response}= Create Entity ${entity_payload_filename} ${entity_id} broker_url=${broker_B_url} Check Response Status Code 201 ${response.status_code} - ${response}= Create Entity ${full_entity_payload_filename} ${entity_id} broker_url=${b3_url} + ${response}= Create Entity ${full_entity_payload_filename} ${entity_id} broker_url=${broker_C_url} Check Response Status Code 201 ${response.status_code} ${registration_id1}= Generate Random CSR Id @@ -57,9 +58,9 @@ Setup Initial Context Source Registrations ... ${registration_id1} ... ${inclusive_registration_payload_file_path} ... entity_id=${entity_id} - ... broker_url=${b2_url} + ... broker_url=${broker_B_url} ... mode=inclusive - ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${b1_url} + ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${broker_A_url} Check Response Status Code 201 ${response.status_code} ${registration_id2}= Generate Random CSR Id @@ -68,13 +69,13 @@ Setup Initial Context Source Registrations ... ${registration_id2} ... ${exclusive_registration_payload_file_path} ... entity_id=${entity_id} - ... broker_url=${b3_url} + ... broker_url=${broker_C_url} ... mode=exclusive - ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${b1_url} + ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${broker_A_url} Check Response Status Code 201 ${response.status_code} Delete Entities And Delete Registrations - Delete Context Source Registration ${registration_id1} broker_url=${b1_url} - Delete Context Source Registration ${registration_id2} broker_url=${b1_url} - Delete Entity ${entity_id} broker_url=${b2_url} - Delete Entity ${entity_id} broker_url=${b3_url} \ No newline at end of file + Delete Context Source Registration ${registration_id1} broker_url=${broker_A_url} + Delete Context Source Registration ${registration_id2} broker_url=${broker_A_url} + Delete Entity ${entity_id} broker_url=${broker_B_url} + Delete Entity ${entity_id} broker_url=${broker_C_url} \ No newline at end of file diff --git a/IOP_TP/NGSI-LD/Interoperability/Consumption/Entity/RetrieveEntity/IOP_CNF_02_01.robot b/IOP_TP/NGSI-LD/Interoperability/Consumption/Entity/RetrieveEntity/IOP_CNF_02_01.robot index a5ea6988..af847125 100644 --- a/IOP_TP/NGSI-LD/Interoperability/Consumption/Entity/RetrieveEntity/IOP_CNF_02_01.robot +++ b/IOP_TP/NGSI-LD/Interoperability/Consumption/Entity/RetrieveEntity/IOP_CNF_02_01.robot @@ -1,5 +1,5 @@ *** Settings *** -Documentation Four brokers are set up A, B, C and D. A has three registrations, one inclusive for the entity created in B, one redirect for the entity created in C and one redirect for the entity created in D. Check that the entity returned from A has attributes from the entities in B and C. +Documentation Four brokers are set up A, B, C and D. A has three registrations, one inclusive for the entity created in B, one redirect for the entity created in C and one redirect for the entity created in D. Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource @@ -17,28 +17,27 @@ ${first_full_entity_payload_filename} interoperability/offstreet-parkin ${second_full_entity_payload_filename} interoperability/offstreet-parking2-full.jsonld ${inclusive_registration_payload_file_path} csourceRegistrations/interoperability/context-source-registration-inclusive-2.jsonld ${redirect_registration_payload_file_path} csourceRegistrations/interoperability/context-source-registration-redirect-2.jsonld -${b1_url} -${b2_url} -${b3_url} -${b4_url} +${broker_A_url} +${broker_B_url} +${broker_C_url} +${broker_D_url} *** Test Cases *** IOP_CNF_02_01 Retrieve OffStreetParking:1 - [Documentation] Pre-conditions: no user context. Data only on leaves. B contains OffStreetParking1 without location. C contains OffStreetParking1. D contains OffStreetParking2. - ... Registrations established: Inclusive in A to B. Redirect in A to C. Redirect in A to D. + [Documentation] Check that the entity returned from A has attributes from the entities in B and C. [Tags] since_v1.6.1 iop 4_3_3 cf_06 additive-inclusive proxy-redirect 4_3_6 5_7_1 #Client retrieves OffStreetParking:1 in A and checks for a partial successful. The entity returned should be the whole entity. - ${response}= Retrieve Entity ${entity_id} broker_url=${b1_url} + ${response}= Retrieve Entity ${entity_id} broker_url=${broker_A_url} Check Response Status Code 207 ${response.status_code} ${payload}= Set To Dictionary ${response.json()} Should Be Equal ${payload} ${first_full_entity_payload_filename} #Client retrieves OffStreetParking:1 in B and C. - ${response}= Retrieve Entity ${entity_id} broker_url=${b2_url} + ${response}= Retrieve Entity ${entity_id} broker_url=${broker_B_url} ${first_expected_payload}= Set To Dictionary ${response.json()} - ${response}= Retrieve Entity ${entity_id} broker_url=${b3_url} + ${response}= Retrieve Entity ${entity_id} broker_url=${broker_C_url} ${second_expected_payload}= Set To Dictionary ${response.json()} #Client checks that the entity returned from A has attributes from the entities in B and C. @@ -48,13 +47,16 @@ IOP_CNF_02_01 Retrieve OffStreetParking:1 *** Keywords *** Setup Initial Context Source Registrations + [Documentation] Pre-conditions: no user context. Data only on leaves. B contains OffStreetParking1 without location. C contains OffStreetParking1. D contains OffStreetParking2. + ... Registrations established: Inclusive in A to B. Redirect in A to C. Redirect in A to D. + ${entity_id}= Generate Random Parking Entity Id Set Suite Variable ${entity_id} - ${response}= Create Entity ${entity_payload_filename} ${entity_id} broker_url=${b2_url} + ${response}= Create Entity ${entity_payload_filename} ${entity_id} broker_url=${broker_B_url} Check Response Status Code 201 ${response.status_code} - ${response}= Create Entity ${first_full_entity_payload_filename} ${entity_id} broker_url=${b3_url} + ${response}= Create Entity ${first_full_entity_payload_filename} ${entity_id} broker_url=${broker_C_url} Check Response Status Code 201 ${response.status_code} - ${response}= Create Entity ${second_full_entity_payload_filename} ${entity_id} broker_url=${b4_url} + ${response}= Create Entity ${second_full_entity_payload_filename} ${entity_id} broker_url=${broker_D_url} Check Response Status Code 201 ${response.status_code} ${registration_id1}= Generate Random CSR Id @@ -63,9 +65,9 @@ Setup Initial Context Source Registrations ... ${registration_id1} ... ${inclusive_registration_payload_file_path} ... entity_id=${entity_id} - ... broker_url=${b2_url} + ... broker_url=${broker_B_url} ... mode=inclusive - ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${b1_url} + ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${broker_A_url} Check Response Status Code 201 ${response.status_code} ${registration_id2}= Generate Random CSR Id @@ -74,9 +76,9 @@ Setup Initial Context Source Registrations ... ${registration_id2} ... ${redirect_registration_payload_file_path} ... entity_id=${entity_id} - ... broker_url=${b3_url} + ... broker_url=${broker_C_url} ... mode=redirect - ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${b1_url} + ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${broker_A_url} Check Response Status Code 201 ${response.status_code} ${registration_id3}= Generate Random CSR Id @@ -85,15 +87,15 @@ Setup Initial Context Source Registrations ... ${registration_id3} ... ${redirect_registration_payload_file_path} ... entity_id=${entity_id} - ... broker_url=${b4_url} + ... broker_url=${broker_D_url} ... mode=redirect - ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${b1_url} + ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${broker_A_url} Check Response Status Code 201 ${response.status_code} Delete Entities And Delete Registrations - Delete Context Source Registration ${registration_id1} broker_url=${b1_url} - Delete Context Source Registration ${registration_id2} broker_url=${b1_url} - Delete Context Source Registration ${registration_id3} broker_url=${b1_url} - Delete Entity ${entity_id} broker_url=${b2_url} - Delete Entity ${entity_id} broker_url=${b3_url} - Delete Entity ${entity_id} broker_url=${b4_url} \ No newline at end of file + Delete Context Source Registration ${registration_id1} broker_url=${broker_A_url} + Delete Context Source Registration ${registration_id2} broker_url=${broker_A_url} + Delete Context Source Registration ${registration_id3} broker_url=${broker_A_url} + Delete Entity ${entity_id} broker_url=${broker_B_url} + Delete Entity ${entity_id} broker_url=${broker_C_url} + Delete Entity ${entity_id} broker_url=${broker_D_url} \ No newline at end of file diff --git a/IOP_TP/NGSI-LD/Interoperability/Consumption/Entity/RetrieveEntity/IOP_CNF_02_02.robot b/IOP_TP/NGSI-LD/Interoperability/Consumption/Entity/RetrieveEntity/IOP_CNF_02_02.robot index 1f26d3a0..5f676afe 100644 --- a/IOP_TP/NGSI-LD/Interoperability/Consumption/Entity/RetrieveEntity/IOP_CNF_02_02.robot +++ b/IOP_TP/NGSI-LD/Interoperability/Consumption/Entity/RetrieveEntity/IOP_CNF_02_02.robot @@ -1,5 +1,5 @@ *** Settings *** -Documentation Four brokers are set up A, B, C and D. A has three registrations, one inclusive for the entity created in B, one redirect for the entity created in C and one redirect for the entity created in D. Check that the entity returned from C has the same location attribute found in A. +Documentation Four brokers are set up A, B, C and D. A has three registrations, one inclusive for the entity created in B, one redirect for the entity created in C and one redirect for the entity created in D. Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource @@ -17,25 +17,24 @@ ${first_full_entity_payload_filename} interoperability/offstreet-parkin ${second_full_entity_payload_filename} interoperability/offstreet-parking2-full.jsonld ${inclusive_registration_payload_file_path} csourceRegistrations/interoperability/context-source-registration-inclusive-2.jsonld ${redirect_registration_payload_file_path} csourceRegistrations/interoperability/context-source-registration-redirect-2.jsonld -${b1_url} -${b2_url} -${b3_url} -${b4_url} +${broker_A_url} +${broker_B_url} +${broker_C_url} +${broker_D_url} *** Test Cases *** IOP_CNF_02_02 Retrieve OffStreetParking:1 Location Attribute - [Documentation] Pre-conditions: no user context. Data only on leaves. B contains OffStreetParking1. C contains OffStreetParking1 with location and name only. D contains OffStreetParking2. - ... Registrations established: Inclusive in A to B. Redirect in A to C. Redirect in A to D. + [Documentation] Check that the entity returned from C has the same location attribute found in A. [Tags] since_v1.6.1 iop 4_3_3 cf_06 additive-inclusive proxy-redirect 4_3_6 5_7_1 #Client retrieves OffStreetParking:1 in A and checks for a partial successful. The entity returned should contain the location attribute. - ${response}= Retrieve Entity ${entity_id} broker_url=${b1_url} + ${response}= Retrieve Entity ${entity_id} broker_url=${broker_A_url} Check Response Status Code 207 ${response.status_code} ${payload}= Set To Dictionary ${response.json()} Should Contain ${payload} location #Client retrieves OffStreetParking:1 in C with local=true. - ${response}= Retrieve Entity ${entity_id} broker_url=${b3_url} local=true + ${response}= Retrieve Entity ${entity_id} broker_url=${broker_C_url} local=true ${expected_payload}= Set To Dictionary ${response.json()} #Client checks that the location attribute in C is the same as the one in A. @@ -43,13 +42,16 @@ IOP_CNF_02_02 Retrieve OffStreetParking:1 Location Attribute *** Keywords *** Setup Initial Context Source Registrations + [Documentation] Pre-conditions: no user context. Data only on leaves. B contains OffStreetParking1. C contains OffStreetParking1 with location and name only. D contains OffStreetParking2. + ... Registrations established: Inclusive in A to B. Redirect in A to C. Redirect in A to D. + ${entity_id}= Generate Random Parking Entity Id Set Suite Variable ${entity_id} - ${response}= Create Entity ${first_full_entity_payload_filename} ${entity_id} broker_url=${b2_url} + ${response}= Create Entity ${first_full_entity_payload_filename} ${entity_id} broker_url=${broker_B_url} Check Response Status Code 201 ${response.status_code} - ${response}= Create Entity ${entity_payload_filename} ${entity_id} broker_url=${b3_url} + ${response}= Create Entity ${entity_payload_filename} ${entity_id} broker_url=${broker_C_url} Check Response Status Code 201 ${response.status_code} - ${response}= Create Entity ${second_full_entity_payload_filename} ${entity_id} broker_url=${b4_url} + ${response}= Create Entity ${second_full_entity_payload_filename} ${entity_id} broker_url=${broker_D_url} Check Response Status Code 201 ${response.status_code} ${registration_id1}= Generate Random CSR Id @@ -58,9 +60,9 @@ Setup Initial Context Source Registrations ... ${registration_id1} ... ${inclusive_registration_payload_file_path} ... entity_id=${entity_id} - ... broker_url=${b2_url} + ... broker_url=${broker_B_url} ... mode=inclusive - ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${b1_url} + ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${broker_A_url} Check Response Status Code 201 ${response.status_code} ${registration_id2}= Generate Random CSR Id @@ -69,9 +71,9 @@ Setup Initial Context Source Registrations ... ${registration_id2} ... ${redirect_registration_payload_file_path} ... entity_id=${entity_id} - ... broker_url=${b3_url} + ... broker_url=${broker_C_url} ... mode=redirect - ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${b1_url} + ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${broker_A_url} Check Response Status Code 201 ${response.status_code} ${registration_id3}= Generate Random CSR Id @@ -80,15 +82,15 @@ Setup Initial Context Source Registrations ... ${registration_id3} ... ${redirect_registration_payload_file_path} ... entity_id=${entity_id} - ... broker_url=${b4_url} + ... broker_url=${broker_D_url} ... mode=redirect - ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${b1_url} + ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${broker_A_url} Check Response Status Code 201 ${response.status_code} Delete Entities And Delete Registrations - Delete Context Source Registration ${registration_id1} broker_url=${b1_url} - Delete Context Source Registration ${registration_id2} broker_url=${b1_url} - Delete Context Source Registration ${registration_id3} broker_url=${b1_url} - Delete Entity ${entity_id} broker_url=${b2_url} - Delete Entity ${entity_id} broker_url=${b3_url} - Delete Entity ${entity_id} broker_url=${b4_url} \ No newline at end of file + Delete Context Source Registration ${registration_id1} broker_url=${broker_A_url} + Delete Context Source Registration ${registration_id2} broker_url=${broker_A_url} + Delete Context Source Registration ${registration_id3} broker_url=${broker_A_url} + Delete Entity ${entity_id} broker_url=${broker_B_url} + Delete Entity ${entity_id} broker_url=${broker_C_url} + Delete Entity ${entity_id} broker_url=${broker_D_url} \ No newline at end of file diff --git a/IOP_TP/NGSI-LD/Interoperability/Consumption/Entity/RetrieveEntity/IOP_CNF_03_01.robot b/IOP_TP/NGSI-LD/Interoperability/Consumption/Entity/RetrieveEntity/IOP_CNF_03_01.robot index 4128d647..de21b790 100644 --- a/IOP_TP/NGSI-LD/Interoperability/Consumption/Entity/RetrieveEntity/IOP_CNF_03_01.robot +++ b/IOP_TP/NGSI-LD/Interoperability/Consumption/Entity/RetrieveEntity/IOP_CNF_03_01.robot @@ -1,5 +1,5 @@ *** Settings *** -Documentation Four brokers are set up A, B, C and D. A has three registrations, one auxiliary for the entity created in B, one inclusive for the entity created in C and one inclusive for the entity created in D. Check that a partial response was returned from A and that the entity matches the one in B and it does not contain the attribute location found in C. +Documentation Four brokers are set up A, B, C and D. A has three registrations, one auxiliary for the entity created in B, one inclusive for the entity created in C and one inclusive for the entity created in D. Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource @@ -18,29 +18,28 @@ ${second_full_entity_payload_filename} interoperability/offstreet ${first_inclusive_registration_payload_file_path} csourceRegistrations/interoperability/context-source-registration-inclusive-1.jsonld ${second_inclusive_registration_payload_file_path} csourceRegistrations/interoperability/context-source-registration-inclusive-2.jsonld ${auxiliary_registration_payload_file_path} csourceRegistrations/interoperability/context-source-registration-auxiliary-2.jsonld -${b1_url} -${b2_url} -${b3_url} -${b4_url} +${broker_A_url} +${broker_B_url} +${broker_C_url} +${broker_D_url} *** Test Cases *** IOP_CNF_03_01 Retrieve OffStreetParking:1 - [Documentation] Pre-conditions: no user context. Data on every broker. A contains OffStreetParking1 without location. B contains OffStreetParking1. C contains OffStreetParking1 without location. D contains OffStreetParking2. - ... Registrations established: Auxiliary in A to B. Inclusive in A to C. Inclusive in A to D. + [Documentation] Check that a partial response was returned from A and that the entity matches the one in B and it does not contain the attribute location found in C. [Tags] since_v1.6.1 iop 4_3_3 cf_06 additive-inclusive additive-auxiliary 4_3_6 5_7_1 #Client retrieves OffStreetParking:1 in A and checks for a partial successful. The entity returned should not contain the location attribute. - ${response}= Retrieve Entity ${entity_id} broker_url=${b1_url} + ${response}= Retrieve Entity ${entity_id} broker_url=${broker_A_url} Check Response Status Code 207 ${response.status_code} ${payload}= Set To Dictionary ${response.json()} Should Not Contain ${payload} location #Client retrieves OffStreetParking:1 in B, C and D with the local=true flag. - ${response}= Retrieve Entity ${entity_id} broker_url=${b1_url} local=true + ${response}= Retrieve Entity ${entity_id} broker_url=${broker_A_url} local=true ${first_payload}= Set To Dictionary ${response.json()} - ${response}= Retrieve Entity ${entity_id} broker_url=${b2_url} local=true + ${response}= Retrieve Entity ${entity_id} broker_url=${broker_B_url} local=true ${second_payload}= Set To Dictionary ${response.json()} - ${response}= Retrieve Entity ${entity_id} broker_url=${b3_url} local=true + ${response}= Retrieve Entity ${entity_id} broker_url=${broker_C_url} local=true ${third_payload}= Set To Dictionary ${response.json()} #Client checks that the entity returned from A should have the same attributes as the one in B and it should not contain the attribute location found in C. @@ -49,15 +48,18 @@ IOP_CNF_03_01 Retrieve OffStreetParking:1 *** Keywords *** Setup Initial Context Source Registrations + [Documentation] Pre-conditions: no user context. Data on every broker. A contains OffStreetParking1 without location. B contains OffStreetParking1. C contains OffStreetParking1 without location. D contains OffStreetParking2. + ... Registrations established: Auxiliary in A to B. Inclusive in A to C. Inclusive in A to D. + ${entity_id}= Generate Random Parking Entity Id Set Suite Variable ${entity_id} - ${response}= Create Entity ${entity_payload_filename} ${entity_id} broker_url=${b1_url} + ${response}= Create Entity ${entity_payload_filename} ${entity_id} broker_url=${broker_A_url} Check Response Status Code 201 ${response.status_code} - ${response}= Create Entity ${first_full_entity_payload_filename} ${entity_id} broker_url=${b2_url} + ${response}= Create Entity ${first_full_entity_payload_filename} ${entity_id} broker_url=${broker_B_url} Check Response Status Code 201 ${response.status_code} - ${response}= Create Entity ${entity_payload_filename} ${entity_id} broker_url=${b3_url} + ${response}= Create Entity ${entity_payload_filename} ${entity_id} broker_url=${broker_C_url} Check Response Status Code 201 ${response.status_code} - ${response}= Create Entity ${second_full_entity_payload_filename} ${entity_id} broker_url=${b4_url} + ${response}= Create Entity ${second_full_entity_payload_filename} ${entity_id} broker_url=${broker_D_url} Check Response Status Code 201 ${response.status_code} ${registration_id1}= Generate Random CSR Id @@ -66,9 +68,9 @@ Setup Initial Context Source Registrations ... ${registration_id1} ... ${auxiliary_registration_payload_file_path} ... entity_id=${entity_id} - ... broker_url=${b2_url} + ... broker_url=${broker_B_url} ... mode=auxiliary - ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${b1_url} + ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${broker_A_url} Check Response Status Code 201 ${response.status_code} ${registration_id2}= Generate Random CSR Id @@ -77,9 +79,9 @@ Setup Initial Context Source Registrations ... ${registration_id2} ... ${first_inclusive_registration_payload_file_path} ... entity_id=${entity_id} - ... broker_url=${b3_url} + ... broker_url=${broker_C_url} ... mode=inclusive - ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${b1_url} + ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${broker_A_url} Check Response Status Code 201 ${response.status_code} ${registration_id3}= Generate Random CSR Id @@ -88,15 +90,15 @@ Setup Initial Context Source Registrations ... ${registration_id3} ... ${second_inclusive_registration_payload_file_path} ... entity_id=${entity_id} - ... broker_url=${b4_url} + ... broker_url=${broker_D_url} ... mode=inclusive - ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${b1_url} + ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${broker_A_url} Check Response Status Code 201 ${response.status_code} Delete Entities And Delete Registrations - Delete Context Source Registration ${registration_id1} broker_url=${b1_url} - Delete Context Source Registration ${registration_id2} broker_url=${b1_url} - Delete Context Source Registration ${registration_id3} broker_url=${b1_url} - Delete Entity ${entity_id} broker_url=${b2_url} - Delete Entity ${entity_id} broker_url=${b3_url} - Delete Entity ${entity_id} broker_url=${b4_url} \ No newline at end of file + Delete Context Source Registration ${registration_id1} broker_url=${broker_A_url} + Delete Context Source Registration ${registration_id2} broker_url=${broker_A_url} + Delete Context Source Registration ${registration_id3} broker_url=${broker_A_url} + Delete Entity ${entity_id} broker_url=${broker_B_url} + Delete Entity ${entity_id} broker_url=${broker_C_url} + Delete Entity ${entity_id} broker_url=${broker_D_url} \ No newline at end of file diff --git a/IOP_TP/NGSI-LD/Interoperability/Consumption/Entity/RetrieveEntity/IOP_CNF_03_02.robot b/IOP_TP/NGSI-LD/Interoperability/Consumption/Entity/RetrieveEntity/IOP_CNF_03_02.robot index f4ac18b9..ee0a7e95 100644 --- a/IOP_TP/NGSI-LD/Interoperability/Consumption/Entity/RetrieveEntity/IOP_CNF_03_02.robot +++ b/IOP_TP/NGSI-LD/Interoperability/Consumption/Entity/RetrieveEntity/IOP_CNF_03_02.robot @@ -1,5 +1,5 @@ *** Settings *** -Documentation Four brokers are set up A, B, C and D. A has three registrations, one auxiliary for the entity created in B, one inclusive for the entity created in C and one inclusive for the entity created in D. Check the entity returned from A contains the location property and said attribute is the same as the one returned from C. +Documentation Four brokers are set up A, B, C and D. A has three registrations, one auxiliary for the entity created in B, one inclusive for the entity created in C and one inclusive for the entity created in D. Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource @@ -18,25 +18,24 @@ ${full_entity_payload_filename} interoperability/offstreet ${first_inclusive_registration_payload_file_path} csourceRegistrations/interoperability/context-source-registration-inclusive-1.jsonld ${second_inclusive_registration_payload_file_path} csourceRegistrations/interoperability/context-source-registration-inclusive-2.jsonld ${auxiliary_registration_payload_file_path} csourceRegistrations/interoperability/context-source-registration-auxiliary-2.jsonld -${b1_url} -${b2_url} -${b3_url} -${b4_url} +${broker_A_url} +${broker_B_url} +${broker_C_url} +${broker_D_url} *** Test Cases *** IOP_CNF_03_02 Retrieve OffStreetParking:1 Location Attribute - [Documentation] Pre-conditions: no user context. Data on every broker. A contains OffStreetParking1 without location. B contains OffStreetParking1. C contains OffStreetParking1 with location and name only. D contains OffStreetParking1 without location. - ... Registrations established: Auxiliary in A to B. Inclusive in A to C. Inclusive in A to D. + [Documentation] Check the entity returned from A contains the location property and said attribute is the same as the one returned from C. [Tags] since_v1.6.1 iop 4_3_3 cf_06 additive-inclusive additive-auxiliary 4_3_6 5_7_1 #Client retrieves OffStreetParking:1 in A and checks for a partial successful. The entity returned should only contain the location attribute. - ${response}= Retrieve Entity ${entity_id} broker_url=${b1_url} + ${response}= Retrieve Entity ${entity_id} broker_url=${broker_A_url} Check Response Status Code 207 ${response.status_code} ${payload}= Set To Dictionary ${response.json()} Should Contain ${payload} location #Client retrieves OffStreetParking:1 in C with local=true. - ${response}= Retrieve Entity ${entity_id} broker_url=${b3_url} local=true + ${response}= Retrieve Entity ${entity_id} broker_url=${broker_C_url} local=true ${expected_payload}= Set To Dictionary ${response.json()} #Client checks that the location attribute in A is the same as the one in C. @@ -44,15 +43,18 @@ IOP_CNF_03_02 Retrieve OffStreetParking:1 Location Attribute *** Keywords *** Setup Initial Context Source Registrations + [Documentation] Pre-conditions: no user context. Data on every broker. A contains OffStreetParking1 without location. B contains OffStreetParking1. C contains OffStreetParking1 with location and name only. D contains OffStreetParking1 without location. + ... Registrations established: Auxiliary in A to B. Inclusive in A to C. Inclusive in A to D. + ${entity_id}= Generate Random Parking Entity Id Set Suite Variable ${entity_id} - ${response}= Create Entity ${no_location_entity_payload_filename} ${entity_id} broker_url=${b1_url} + ${response}= Create Entity ${no_location_entity_payload_filename} ${entity_id} broker_url=${broker_A_url} Check Response Status Code 201 ${response.status_code} - ${response}= Create Entity ${full_entity_payload_filename} ${entity_id} broker_url=${b2_url} + ${response}= Create Entity ${full_entity_payload_filename} ${entity_id} broker_url=${broker_B_url} Check Response Status Code 201 ${response.status_code} - ${response}= Create Entity ${location_name_entity_payload_filename} ${entity_id} broker_url=${b3_url} + ${response}= Create Entity ${location_name_entity_payload_filename} ${entity_id} broker_url=${broker_C_url} Check Response Status Code 201 ${response.status_code} - ${response}= Create Entity ${no_location_entity_payload_filename} ${entity_id} broker_url=${b4_url} + ${response}= Create Entity ${no_location_entity_payload_filename} ${entity_id} broker_url=${broker_D_url} Check Response Status Code 201 ${response.status_code} ${registration_id1}= Generate Random CSR Id @@ -61,9 +63,9 @@ Setup Initial Context Source Registrations ... ${registration_id1} ... ${auxiliary_registration_payload_file_path} ... entity_id=${entity_id} - ... broker_url=${b2_url} + ... broker_url=${broker_B_url} ... mode=auxiliary - ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${b1_url} + ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${broker_A_url} Check Response Status Code 201 ${response.status_code} ${registration_id2}= Generate Random CSR Id @@ -72,9 +74,9 @@ Setup Initial Context Source Registrations ... ${registration_id2} ... ${first_inclusive_registration_payload_file_path} ... entity_id=${entity_id} - ... broker_url=${b3_url} + ... broker_url=${broker_C_url} ... mode=inclusive - ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${b1_url} + ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${broker_A_url} Check Response Status Code 201 ${response.status_code} ${registration_id3}= Generate Random CSR Id @@ -83,15 +85,15 @@ Setup Initial Context Source Registrations ... ${registration_id3} ... ${second_inclusive_registration_payload_file_path} ... entity_id=${entity_id} - ... broker_url=${b4_url} + ... broker_url=${broker_D_url} ... mode=inclusive - ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${b1_url} + ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${broker_A_url} Check Response Status Code 201 ${response.status_code} Delete Entities And Delete Registrations - Delete Context Source Registration ${registration_id1} broker_url=${b1_url} - Delete Context Source Registration ${registration_id2} broker_url=${b1_url} - Delete Context Source Registration ${registration_id3} broker_url=${b1_url} - Delete Entity ${entity_id} broker_url=${b2_url} - Delete Entity ${entity_id} broker_url=${b3_url} - Delete Entity ${entity_id} broker_url=${b4_url} \ No newline at end of file + Delete Context Source Registration ${registration_id1} broker_url=${broker_A_url} + Delete Context Source Registration ${registration_id2} broker_url=${broker_A_url} + Delete Context Source Registration ${registration_id3} broker_url=${broker_A_url} + Delete Entity ${entity_id} broker_url=${broker_B_url} + Delete Entity ${entity_id} broker_url=${broker_C_url} + Delete Entity ${entity_id} broker_url=${broker_D_url} \ No newline at end of file diff --git a/IOP_TP/NGSI-LD/Interoperability/Consumption/Entity/RetrieveEntity/IOP_CNF_04_01.robot b/IOP_TP/NGSI-LD/Interoperability/Consumption/Entity/RetrieveEntity/IOP_CNF_04_01.robot index 4e9c9279..ddfd993c 100644 --- a/IOP_TP/NGSI-LD/Interoperability/Consumption/Entity/RetrieveEntity/IOP_CNF_04_01.robot +++ b/IOP_TP/NGSI-LD/Interoperability/Consumption/Entity/RetrieveEntity/IOP_CNF_04_01.robot @@ -1,5 +1,5 @@ *** Settings *** -Documentation Five brokers are set up A, B, C, D and E. A has two registrations, one auxiliary for the entity created in B, one inclusive for the entity created in C. B has two registrations, one redirect for the entity created in D and one redirect for the entity created in E. C shall establish one exclusive registration to E. Check that the entity returned from A has attributes from the entity in D and E. +Documentation Five brokers are set up A, B, C, D and E. A has two registrations, one auxiliary for the entity created in B, one inclusive for the entity created in C. B has two registrations, one redirect for the entity created in D and one redirect for the entity created in E. C shall establish one exclusive registration to E. Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource @@ -19,27 +19,26 @@ ${auxiliary_registration_payload_file_path} csourceRegistrations/intero ${exclusive_registration_payload_file_path} csourceRegistrations/interoperability/context-source-registration-exclusive-1.jsonld ${first_redirect_registration_payload_file_path} csourceRegistrations/interoperability/context-source-registration-redirect-1.jsonld ${second_redirect_registration_payload_file_path} csourceRegistrations/interoperability/context-source-registration-redirect-2.jsonld -${b1_url} -${b2_url} -${b3_url} -${b4_url} -${b5_url} +${broker_A_url} +${broker_B_url} +${broker_C_url} +${broker_D_url} +${broker_E_url} *** Test Cases *** IOP_CNF_04_01 Retrieve OffStreetParking:1 - [Documentation] Pre-conditions: no user context. Data only on leaves. D contains OffStreetParking1 without location. E contains OffStreetParking1. - ... Registrations established: Auxiliary in A to B and Inclusive in A to C. Redirect in B to D and Redirect in B to E. Exclusive in C to E. + [Documentation] Check that the entity returned from A has attributes from the entity in D and E. [Tags] since_v1.6.1 iop 4_3_3 cf_06 additive-inclusive additive-auxiliary proxy-redirect proxy-exclusive 4_3_6 5_7_1 #Client retrieves OffStreetParking:1 in A and checks for a successful response. - ${response}= Retrieve Entity ${entity_id} broker_url=${b1_url} + ${response}= Retrieve Entity ${entity_id} broker_url=${broker_A_url} Check Response Status Code 200 ${response.status_code} ${payload}= Set To Dictionary ${response.json()} #Client retrieves OffStreetParking:1 in D and E. - ${response}= Retrieve Entity ${entity_id} broker_url=${b4_url} + ${response}= Retrieve Entity ${entity_id} broker_url=${broker_D_url} ${first_expected_payload}= Set To Dictionary ${response.json()} - ${response}= Retrieve Entity ${entity_id} broker_url=${b5_url} + ${response}= Retrieve Entity ${entity_id} broker_url=${broker_E_url} ${second_expected_payload}= Set To Dictionary ${response.json()} #Client checks that the entity returned from A has attributes from the entity in D and E. @@ -49,11 +48,14 @@ IOP_CNF_04_01 Retrieve OffStreetParking:1 *** Keywords *** Setup Initial Context Source Registrations + [Documentation] Pre-conditions: no user context. Data only on leaves. D contains OffStreetParking1 without location. E contains OffStreetParking1. + ... Registrations established: Auxiliary in A to B and Inclusive in A to C. Redirect in B to D and Redirect in B to E. Exclusive in C to E. + ${entity_id}= Generate Random Parking Entity Id Set Suite Variable ${entity_id} - ${response}= Create Entity ${no_location_entity_payload_filename} ${entity_id} broker_url=${b4_url} + ${response}= Create Entity ${no_location_entity_payload_filename} ${entity_id} broker_url=${broker_D_url} Check Response Status Code 201 ${response.status_code} - ${response}= Create Entity ${full_entity_payload_filename} ${entity_id} broker_url=${b5_url} + ${response}= Create Entity ${full_entity_payload_filename} ${entity_id} broker_url=${broker_E_url} Check Response Status Code 201 ${response.status_code} ${registration_id1}= Generate Random CSR Id @@ -62,9 +64,9 @@ Setup Initial Context Source Registrations ... ${registration_id1} ... ${auxiliary_registration_payload_file_path} ... entity_id=${entity_id} - ... broker_url=${b2_url} + ... broker_url=${broker_B_url} ... mode=auxiliary - ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${b1_url} + ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${broker_A_url} Check Response Status Code 201 ${response.status_code} ${registration_id2}= Generate Random CSR Id @@ -73,9 +75,9 @@ Setup Initial Context Source Registrations ... ${registration_id2} ... ${first_redirect_registration_payload_file_path} ... entity_id=${entity_id} - ... broker_url=${b4_url} + ... broker_url=${broker_D_url} ... mode=redirect - ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${b2_url} + ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${broker_B_url} Check Response Status Code 201 ${response.status_code} ${registration_id3}= Generate Random CSR Id @@ -84,9 +86,9 @@ Setup Initial Context Source Registrations ... ${registration_id3} ... ${second_redirect_registration_payload_file_path} ... entity_id=${entity_id} - ... broker_url=${b5_url} + ... broker_url=${broker_E_url} ... mode=redirect - ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${b2_url} + ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${broker_B_url} Check Response Status Code 201 ${response.status_code} ${registration_id4}= Generate Random CSR Id @@ -95,9 +97,9 @@ Setup Initial Context Source Registrations ... ${registration_id4} ... ${inclusive_registration_payload_file_path} ... entity_id=${entity_id} - ... broker_url=${b3_url} + ... broker_url=${broker_C_url} ... mode=inclusive - ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${b1_url} + ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${broker_A_url} Check Response Status Code 201 ${response.status_code} ${registration_id5}= Generate Random CSR Id @@ -106,16 +108,16 @@ Setup Initial Context Source Registrations ... ${registration_id5} ... ${exclusive_registration_payload_file_path} ... entity_id=${entity_id} - ... broker_url=${b5_url} + ... broker_url=${broker_E_url} ... mode=exclusive - ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${b3_url} + ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${broker_C_url} Check Response Status Code 201 ${response.status_code} Delete Entities And Delete Registrations - Delete Context Source Registration ${registration_id1} broker_url=${b1_url} - Delete Context Source Registration ${registration_id2} broker_url=${b2_url} - Delete Context Source Registration ${registration_id3} broker_url=${b2_url} - Delete Context Source Registration ${registration_id4} broker_url=${b1_url} - Delete Context Source Registration ${registration_id5} broker_url=${b3_url} - Delete Entity ${entity_id} broker_url=${b4_url} - Delete Entity ${entity_id} broker_url=${b5_url} \ No newline at end of file + Delete Context Source Registration ${registration_id1} broker_url=${broker_A_url} + Delete Context Source Registration ${registration_id2} broker_url=${broker_B_url} + Delete Context Source Registration ${registration_id3} broker_url=${broker_B_url} + Delete Context Source Registration ${registration_id4} broker_url=${broker_A_url} + Delete Context Source Registration ${registration_id5} broker_url=${broker_C_url} + Delete Entity ${entity_id} broker_url=${broker_D_url} + Delete Entity ${entity_id} broker_url=${broker_E_url} \ No newline at end of file diff --git a/IOP_TP/NGSI-LD/Interoperability/Consumption/Entity/RetrieveEntity/IOP_CNF_04_02.robot b/IOP_TP/NGSI-LD/Interoperability/Consumption/Entity/RetrieveEntity/IOP_CNF_04_02.robot index ab2f5b4e..e9f473b9 100644 --- a/IOP_TP/NGSI-LD/Interoperability/Consumption/Entity/RetrieveEntity/IOP_CNF_04_02.robot +++ b/IOP_TP/NGSI-LD/Interoperability/Consumption/Entity/RetrieveEntity/IOP_CNF_04_02.robot @@ -1,5 +1,5 @@ *** Settings *** -Documentation Five brokers are set up A, B, C, D and E. A has two registrations, one auxiliary for the entity created in B, one inclusive for the entity created in C. B has two registrations, one redirect for the entity created in D and one redirect for the entity created in E. C shall establish one exclusive registration to E. Check that the entity returned from A match the attributes from the entity in B, C and E. +Documentation Five brokers are set up A, B, C, D and E. A has two registrations, one auxiliary for the entity created in B, one inclusive for the entity created in C. B has two registrations, one redirect for the entity created in D and one redirect for the entity created in E. C shall establish one exclusive registration to E. Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource @@ -20,30 +20,29 @@ ${auxiliary_registration_payload_file_path} csourceRegistrations/intero ${exclusive_registration_payload_file_path} csourceRegistrations/interoperability/context-source-registration-exclusive-3.jsonld ${second_redirect_registration_payload_file_path} csourceRegistrations/interoperability/context-source-registration-redirect-2.jsonld ${third_redirect_registration_payload_file_path} csourceRegistrations/interoperability/context-source-registration-redirect-3.jsonld -${b1_url} -${b2_url} -${b3_url} -${b4_url} -${b5_url} +${broker_A_url} +${broker_B_url} +${broker_C_url} +${broker_D_url} +${broker_E_url} *** Test Cases *** IOP_CNF_04_02 Retrieve OffStreetParking:1 Location Attribute - [Documentation] Pre-conditions: no user context. Data on every broker. A contains OffStreetParking1 without location. B contains OffStreetParking1 without location. C contains OffStreetParking1 without location. D contains OffStreetParking1. E contains OffStreetParking1 with location and name only. - ... Registrations established: Auxiliary in A to B and Inclusive in A to C. Redirect in B to D and Redirect in B to E. Exclusive in C to E. + [Documentation] Check that the entity returned from A match the attributes from the entity in B, C and E. [Tags] since_v1.6.1 iop 4_3_3 cf_06 additive-inclusive additive-auxiliary proxy-redirect proxy-exclusive 4_3_6 5_7_1 #Client retrieves OffStreetParking:1 in A and checks for a successful response. - ${response}= Retrieve Entity ${entity_id} broker_url=${b1_url} + ${response}= Retrieve Entity ${entity_id} broker_url=${broker_A_url} Check Response Status Code 200 ${response.status_code} ${payload}= Set To Dictionary ${response.json()} Should Contain ${payload} location #Client retrieves OffStreetParking:1 in B, C and E with local=true. - ${response}= Retrieve Entity ${entity_id} broker_url=${b2_url} local=true + ${response}= Retrieve Entity ${entity_id} broker_url=${broker_B_url} local=true ${first_expected_payload}= Set To Dictionary ${response.json()} - ${response}= Retrieve Entity ${entity_id} broker_url=${b3_url} local=true + ${response}= Retrieve Entity ${entity_id} broker_url=${broker_C_url} local=true ${second_expected_payload}= Set To Dictionary ${response.json()} - ${response}= Retrieve Entity ${entity_id} broker_url=${b5_url} local=true + ${response}= Retrieve Entity ${entity_id} broker_url=${broker_E_url} local=true ${third_expected_payload}= Set To Dictionary ${response.json()} #Client checks that the entity returned from A should have the same attributes as the one in B, C and E. @@ -54,17 +53,20 @@ IOP_CNF_04_02 Retrieve OffStreetParking:1 Location Attribute *** Keywords *** Setup Initial Context Source Registrations + [Documentation] Pre-conditions: no user context. Data on every broker. A contains OffStreetParking1 without location. B contains OffStreetParking1 without location. C contains OffStreetParking1 without location. D contains OffStreetParking1. E contains OffStreetParking1 with location and name only. + ... Registrations established: Auxiliary in A to B and Inclusive in A to C. Redirect in B to D and Redirect in B to E. Exclusive in C to E. + ${entity_id}= Generate Random Parking Entity Id Set Suite Variable ${entity_id} - ${response}= Create Entity ${no_location_entity_payload_filename} ${entity_id} broker_url=${b1_url} + ${response}= Create Entity ${no_location_entity_payload_filename} ${entity_id} broker_url=${broker_A_url} Check Response Status Code 201 ${response.status_code} - ${response}= Create Entity ${no_location_entity_payload_filename} ${entity_id} broker_url=${b2_url} + ${response}= Create Entity ${no_location_entity_payload_filename} ${entity_id} broker_url=${broker_B_url} Check Response Status Code 201 ${response.status_code} - ${response}= Create Entity ${no_location_entity_payload_filename} ${entity_id} broker_url=${b3_url} + ${response}= Create Entity ${no_location_entity_payload_filename} ${entity_id} broker_url=${broker_C_url} Check Response Status Code 201 ${response.status_code} - ${response}= Create Entity ${full_entity_payload_filename} ${entity_id} broker_url=${b4_url} + ${response}= Create Entity ${full_entity_payload_filename} ${entity_id} broker_url=${broker_D_url} Check Response Status Code 201 ${response.status_code} - ${response}= Create Entity ${location_name_entity_payload_filename} ${entity_id} broker_url=${b5_url} + ${response}= Create Entity ${location_name_entity_payload_filename} ${entity_id} broker_url=${broker_E_url} Check Response Status Code 201 ${response.status_code} ${registration_id1}= Generate Random CSR Id @@ -73,9 +75,9 @@ Setup Initial Context Source Registrations ... ${registration_id1} ... ${auxiliary_registration_payload_file_path} ... entity_id=${entity_id} - ... broker_url=${b2_url} + ... broker_url=${broker_B_url} ... mode=auxiliary - ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${b1_url} + ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${broker_A_url} Check Response Status Code 201 ${response.status_code} ${registration_id2}= Generate Random CSR Id @@ -84,9 +86,9 @@ Setup Initial Context Source Registrations ... ${registration_id2} ... ${second_redirect_registration_payload_file_path} ... entity_id=${entity_id} - ... broker_url=${b4_url} + ... broker_url=${broker_D_url} ... mode=redirect - ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${b2_url} + ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${broker_B_url} Check Response Status Code 201 ${response.status_code} ${registration_id3}= Generate Random CSR Id @@ -95,9 +97,9 @@ Setup Initial Context Source Registrations ... ${registration_id3} ... ${third_redirect_registration_payload_file_path} ... entity_id=${entity_id} - ... broker_url=${b5_url} + ... broker_url=${broker_E_url} ... mode=redirect - ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${b2_url} + ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${broker_B_url} Check Response Status Code 201 ${response.status_code} ${registration_id4}= Generate Random CSR Id @@ -106,9 +108,9 @@ Setup Initial Context Source Registrations ... ${registration_id4} ... ${inclusive_registration_payload_file_path} ... entity_id=${entity_id} - ... broker_url=${b3_url} + ... broker_url=${broker_C_url} ... mode=inclusive - ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${b1_url} + ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${broker_A_url} Check Response Status Code 201 ${response.status_code} ${registration_id5}= Generate Random CSR Id @@ -117,19 +119,19 @@ Setup Initial Context Source Registrations ... ${registration_id5} ... ${exclusive_registration_payload_file_path} ... entity_id=${entity_id} - ... broker_url=${b5_url} + ... broker_url=${broker_E_url} ... mode=exclusive - ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${b3_url} + ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${broker_C_url} Check Response Status Code 201 ${response.status_code} Delete Entities And Delete Registrations - Delete Context Source Registration ${registration_id1} broker_url=${b1_url} - Delete Context Source Registration ${registration_id2} broker_url=${b2_url} - Delete Context Source Registration ${registration_id3} broker_url=${b2_url} - Delete Context Source Registration ${registration_id4} broker_url=${b1_url} - Delete Context Source Registration ${registration_id5} broker_url=${b3_url} - Delete Entity ${entity_id} broker_url=${b1_url} - Delete Entity ${entity_id} broker_url=${b2_url} - Delete Entity ${entity_id} broker_url=${b3_url} - Delete Entity ${entity_id} broker_url=${b4_url} - Delete Entity ${entity_id} broker_url=${b5_url} \ No newline at end of file + Delete Context Source Registration ${registration_id1} broker_url=${broker_A_url} + Delete Context Source Registration ${registration_id2} broker_url=${broker_B_url} + Delete Context Source Registration ${registration_id3} broker_url=${broker_B_url} + Delete Context Source Registration ${registration_id4} broker_url=${broker_A_url} + Delete Context Source Registration ${registration_id5} broker_url=${broker_C_url} + Delete Entity ${entity_id} broker_url=${broker_A_url} + Delete Entity ${entity_id} broker_url=${broker_B_url} + Delete Entity ${entity_id} broker_url=${broker_C_url} + Delete Entity ${entity_id} broker_url=${broker_D_url} + Delete Entity ${entity_id} broker_url=${broker_E_url} \ No newline at end of file diff --git a/IOP_TP/NGSI-LD/Interoperability/Provision/CreateEntity/IOP_CNF_01_01.robot b/IOP_TP/NGSI-LD/Interoperability/Provision/CreateEntity/IOP_CNF_01_01.robot index b5f6ed3e..c7a28da2 100644 --- a/IOP_TP/NGSI-LD/Interoperability/Provision/CreateEntity/IOP_CNF_01_01.robot +++ b/IOP_TP/NGSI-LD/Interoperability/Provision/CreateEntity/IOP_CNF_01_01.robot @@ -1,6 +1,5 @@ *** Settings *** Documentation Three brokers are set up A, B and C. A has two registrations, one inclusive for the entities created in B and one exclusive for the entity created in C. -... Check that the entity is created in A and B but not in C. Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource @@ -16,28 +15,27 @@ Test Teardown Delete Entities and Delete Registrations ${entity_payload_filename} interoperability/offstreet-parking1-full.jsonld ${inclusive_registration_payload_file_path} csourceRegistrations/interoperability/context-source-registration-inclusive-2.jsonld ${exclusive_registration_payload_file_path} csourceRegistrations/interoperability/context-source-registration-exclusive-2.jsonld -${b1_url} -${b2_url} -${b3_url} +${broker_A_url} +${broker_B_url} +${broker_C_url} *** Test Cases *** IOP_CNF_01_01 Create OffStreetParking:1 - [Documentation] Pre-conditions: No user context. No data in any broker. - ... Registrations established: Inclusive in A to B. Exclusive in A to C. + [Documentation] Check that the entity is created in A and B but not in C. [Tags] since_v1.6.1 iop 4_3_3 cf_06 additive-inclusive proxy-exclusive 4_3_6 5_6_1 #Create OffStreetParking:1 in A and check for a successful response ${expected_payload}= Load Entity ${entity_payload_filename} ${entity_id} - ${response}= Create Entity ${entity_payload_filename} ${entity_id} broker_url=${b1_url} + ${response}= Create Entity ${entity_payload_filename} ${entity_id} broker_url=${broker_A_url} Check Response Status Code 201 ${response.status_code} #Agent checks, with local=true, that the entity is created in A - ${response}= Retrieve Entity ${entity_id} local=true broker_url=${b1_url} + ${response}= Retrieve Entity ${entity_id} local=true broker_url=${broker_A_url} Check Response Status Code 200 ${response.status_code} Should Be Equal ${response.json()} ${expected_payload} #Agent checks, with local=true, that the entity is created in B and only contains the attributes availableSpotsNumber and totalSpotsNumber - ${response}= Retrieve Entity ${entity_id} local=true broker_url=${b2_url} + ${response}= Retrieve Entity ${entity_id} local=true broker_url=${broker_B_url} Check Response Status Code 200 ${response.status_code} Should Contain ${response.json()} availableSpotsNumber Should Contain ${response.json()} totalSpotsNumber @@ -45,11 +43,13 @@ IOP_CNF_01_01 Create OffStreetParking:1 Should Not Contain ${response.json()} location #Agent checks, with local=true, that the entity is not created in C - ${response}= Retrieve Entity ${entity_id} local=true broker_url=${b3_url} + ${response}= Retrieve Entity ${entity_id} local=true broker_url=${broker_C_url} Check Response Status Code 404 ${response.status_code} *** Keywords *** Setup Initial Context Source Registrations + [Documentation] Registrations established: Inclusive in A to B. Exclusive in A to C. + ${entity_id}= Generate Random Parking Entity Id Set Suite Variable ${entity_id} @@ -59,9 +59,9 @@ Setup Initial Context Source Registrations ... ${registration_id1} ... ${inclusive_registration_payload_file_path} ... entity_id=${entity_id} - ... broker_url=${b2_url} + ... broker_url=${broker_B_url} ... mode=inclusive - ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${b1_url} + ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${broker_A_url} Check Response Status Code 201 ${response.status_code} ${registration_id2}= Generate Random CSR Id @@ -70,12 +70,12 @@ Setup Initial Context Source Registrations ... ${registration_id2} ... ${exclusive_registration_payload_file_path} ... entity_id=${entity_id} - ... broker_url=${b3_url} + ... broker_url=${broker_C_url} ... mode=exclusive - ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${b1_url} + ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${broker_A_url} Check Response Status Code 201 ${response.status_code} Delete Entities And Delete Registrations - Delete Context Source Registration ${registration_id1} broker_url=${b1_url} - Delete Context Source Registration ${registration_id2} broker_url=${b1_url} - Delete Entity ${entity_id} broker_url=${b1_url} \ No newline at end of file + Delete Context Source Registration ${registration_id1} broker_url=${broker_A_url} + Delete Context Source Registration ${registration_id2} broker_url=${broker_A_url} + Delete Entity ${entity_id} broker_url=${broker_A_url} \ No newline at end of file diff --git a/IOP_TP/NGSI-LD/Interoperability/Provision/CreateEntity/IOP_CNF_01_02.robot b/IOP_TP/NGSI-LD/Interoperability/Provision/CreateEntity/IOP_CNF_01_02.robot index da5c1669..51463d1a 100644 --- a/IOP_TP/NGSI-LD/Interoperability/Provision/CreateEntity/IOP_CNF_01_02.robot +++ b/IOP_TP/NGSI-LD/Interoperability/Provision/CreateEntity/IOP_CNF_01_02.robot @@ -1,7 +1,5 @@ *** Settings *** Documentation Three brokers are set up A, B and C. A has two registrations, one inclusive for the entities created in B and one exclusive for the entity created in C. -... Check that, in A and B, the entity is created containing the location attribute, while in C it is not contained. - Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource @@ -19,32 +17,31 @@ Test Teardown Delete Entities and Delete Registrations ${entity_payload_filename} interoperability/offstreet-parking2-full.jsonld ${inclusive_registration_payload_file_path} csourceRegistrations/interoperability/context-source-registration-inclusive-2.jsonld ${exclusive_registration_payload_file_path} csourceRegistrations/interoperability/context-source-registration-exclusive-2.jsonld -${b1_url} -${b2_url} -${b3_url} +${broker_A_url} +${broker_B_url} +${broker_C_url} *** Test Cases *** IOP_CNF_01_02 Create OffStreetParking:2 - [Documentation] Pre-conditions: No user context. No data in any broker. - ... Registrations established: Inclusive in A to B. Exclusive in A to C. + [Documentation] Check that, in A and B, the entity is created containing the location attribute, while in C it is not contained. [Tags] since_v1.6.1 iop 4_3_3 cf_06 additive-inclusive proxy-exclusive 4_3_6 5_6_1 #Create the full entity of OffStreetParking:2 in A and check for a successful response - ${response}= Create Entity ${entity_payload_filename} ${entity_id} broker_url=${b1_url} + ${response}= Create Entity ${entity_payload_filename} ${entity_id} broker_url=${broker_A_url} Check Response Status Code 201 ${response.status_code} #Agent checks, with local=true, that the entity is created in A and does not contain the location property - ${response}= Retrieve Entity ${entity_id} broker_url=${b1_url} local=true + ${response}= Retrieve Entity ${entity_id} broker_url=${broker_A_url} local=true Check Response Status Code 200 ${response.status_code} Should Not Contain ${response.json()} location #Agent checks, with local=true, that the entity is created in B and does not contain the location property - ${response}= Retrieve Entity ${entity_id} broker_url=${b2_url} local=true + ${response}= Retrieve Entity ${entity_id} broker_url=${broker_B_url} local=true Check Response Status Code 200 ${response.status_code} Should Not Contain ${response.json()} location #Agent checks, with local=true, that the entity is created in C and only contains the location property - ${response}= Retrieve Entity ${entity_id} broker_url=${b3_url} local=true + ${response}= Retrieve Entity ${entity_id} broker_url=${broker_C_url} local=true Check Response Status Code 200 ${response.status_code} Should Contain ${response.json()} location Should Not Contain ${response.json()} name @@ -53,6 +50,8 @@ IOP_CNF_01_02 Create OffStreetParking:2 *** Keywords *** Setup Initial Context Source Registrations + [Documentation] Registrations established: Inclusive in A to B. Exclusive in A to C. + ${entity_id}= Generate Random Parking Entity Id Set Suite Variable ${entity_id} @@ -62,9 +61,9 @@ Setup Initial Context Source Registrations ... ${registration_id1} ... ${inclusive_registration_payload_file_path} ... entity_id=${entity_id} - ... broker_url=${b2_url} + ... broker_url=${broker_B_url} ... mode=inclusive - ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${b1_url} + ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${broker_A_url} Check Response Status Code 201 ${response.status_code} ${registration_id2}= Generate Random CSR Id @@ -73,12 +72,12 @@ Setup Initial Context Source Registrations ... ${registration_id2} ... ${exclusive_registration_payload_file_path} ... entity_id=${entity_id} - ... broker_url=${b3_url} + ... broker_url=${broker_C_url} ... mode=exclusive - ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${b1_url} + ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${broker_A_url} Check Response Status Code 201 ${response.status_code} Delete Entities And Delete Registrations - Delete Context Source Registration ${registration_id1} broker_url=${b1_url} - Delete Context Source Registration ${registration_id2} broker_url=${b1_url} - Delete Entity ${entity_id} broker_url=${b1_url} + Delete Context Source Registration ${registration_id1} broker_url=${broker_A_url} + Delete Context Source Registration ${registration_id2} broker_url=${broker_A_url} + Delete Entity ${entity_id} broker_url=${broker_A_url} diff --git a/IOP_TP/NGSI-LD/Interoperability/Provision/CreateEntity/IOP_CNF_02_01.robot b/IOP_TP/NGSI-LD/Interoperability/Provision/CreateEntity/IOP_CNF_02_01.robot index 1e47eb1f..4bf17e41 100644 --- a/IOP_TP/NGSI-LD/Interoperability/Provision/CreateEntity/IOP_CNF_02_01.robot +++ b/IOP_TP/NGSI-LD/Interoperability/Provision/CreateEntity/IOP_CNF_02_01.robot @@ -1,6 +1,5 @@ *** Settings *** Documentation Four brokers are set up A, B, C and D. A has three registrations, one inclusive for the entities created in B, one redirect for the entity created in C and one redirect for the entities created in D. -... The client creates the entity in A. The entity should not contain the location attribute in A and B. The C and D brokers should only contain the location attribute. Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource @@ -16,34 +15,33 @@ Test Teardown Delete Entities and Delete Registrations ${entity_payload_filename} interoperability/offstreet-parking1-full.jsonld ${inclusive_registration_payload_file_path} csourceRegistrations/interoperability/context-source-registration-inclusive-2.jsonld ${redirect_registration_payload_file_path} csourceRegistrations/interoperability/context-source-registration-redirect-2.jsonld -${b1_url} -${b2_url} -${b3_url} -${b4_url} +${broker_A_url} +${broker_B_url} +${broker_C_url} +${broker_D_url} *** Test Cases *** IOP_CNF_02_01 Create OffStreetParking:1 - [Documentation] Pre-conditions: No user context. No data in any broker. - ... Registrations established: Inclusive in A to B. Redirect in A to C. Redirect in A to D. + [Documentation] The client creates the entity in A. The entity should not contain the location attribute in A and B. The C and D brokers should only contain the location attribute. [Tags] since_v1.6.1 iop 4_3_3 cf_06 additive-inclusive proxy-redirect 4_3_6 5_6_1 #The agent creates the full entity of OffStreetParking:1 in A and check for a successful response - ${response}= Create Entity ${entity_payload_filename} ${entity_id} broker_url=${b1_url} + ${response}= Create Entity ${entity_payload_filename} ${entity_id} broker_url=${broker_A_url} Check Response Status Code 201 ${response.status_code} #Agent checks, with local=true, that the entity is created in A and does not contain the location property - ${response}= Retrieve Entity ${entity_id} local=true broker_url=${b1_url} + ${response}= Retrieve Entity ${entity_id} local=true broker_url=${broker_A_url} Check Response Status Code 200 ${response.status_code} Should Not Contain ${response.json()} location #Agent checks, with local=true, that the entity is created in B and does not contain the location and name properties - ${response}= Retrieve Entity ${entity_id} local=true broker_url=${b2_url} + ${response}= Retrieve Entity ${entity_id} local=true broker_url=${broker_B_url} Check Response Status Code 200 ${response.status_code} Should Not Contain ${response.json()} location Should Not Contain ${response.json()} name #Agent checks, with local=true, that the entity is created in C and only contains the location property - ${response}= Retrieve Entity ${entity_id} local=true broker_url=${b3_url} + ${response}= Retrieve Entity ${entity_id} local=true broker_url=${broker_C_url} Check Response Status Code 200 ${response.status_code} Should Contain ${response.json()} location Should Not Contain ${response.json()} name @@ -51,7 +49,7 @@ IOP_CNF_02_01 Create OffStreetParking:1 Should Not Contain ${response.json()} totalSpotsNumber #Agent checks, with local=true, that the entity is created in D and only contains the location property - ${response}= Retrieve Entity ${entity_id} local=true broker_url=${b4_url} + ${response}= Retrieve Entity ${entity_id} local=true broker_url=${broker_D_url} Check Response Status Code 200 ${response.status_code} Should Contain ${response.json()} location Should Not Contain ${response.json()} name @@ -60,6 +58,8 @@ IOP_CNF_02_01 Create OffStreetParking:1 *** Keywords *** Setup Initial Context Source Registrations + [Documentation] Registrations established: Inclusive in A to B. Redirect in A to C. Redirect in A to D. + ${entity_id}= Generate Random Parking Entity Id Set Suite Variable ${entity_id} @@ -69,9 +69,9 @@ Setup Initial Context Source Registrations ... ${registration_id1} ... ${inclusive_registration_payload_file_path} ... entity_id=${entity_id} - ... broker_url=${b2_url} + ... broker_url=${broker_B_url} ... mode=inclusive - ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${b1_url} + ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${broker_A_url} Check Response Status Code 201 ${response.status_code} ${registration_id2}= Generate Random CSR Id @@ -80,9 +80,9 @@ Setup Initial Context Source Registrations ... ${registration_id2} ... ${redirect_registration_payload_file_path} ... entity_id=${entity_id} - ... broker_url=${b3_url} + ... broker_url=${broker_C_url} ... mode=redirect - ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${b1_url} + ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${broker_A_url} Check Response Status Code 201 ${response.status_code} ${registration_id3}= Generate Random CSR Id @@ -91,13 +91,13 @@ Setup Initial Context Source Registrations ... ${registration_id3} ... ${redirect_registration_payload_file_path} ... entity_id=${entity_id} - ... broker_url=${b4_url} + ... broker_url=${broker_D_url} ... mode=redirect - ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${b1_url} + ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${broker_A_url} Check Response Status Code 201 ${response.status_code} Delete Entities And Delete Registrations - Delete Context Source Registration ${registration_id1} broker_url=${b1_url} - Delete Context Source Registration ${registration_id2} broker_url=${b1_url} - Delete Context Source Registration ${registration_id3} broker_url=${b1_url} - Delete Entity ${entity_id} broker_url=${b1_url} \ No newline at end of file + Delete Context Source Registration ${registration_id1} broker_url=${broker_A_url} + Delete Context Source Registration ${registration_id2} broker_url=${broker_A_url} + Delete Context Source Registration ${registration_id3} broker_url=${broker_A_url} + Delete Entity ${entity_id} broker_url=${broker_A_url} \ No newline at end of file diff --git a/IOP_TP/NGSI-LD/Interoperability/Provision/CreateEntity/IOP_CNF_02_02.robot b/IOP_TP/NGSI-LD/Interoperability/Provision/CreateEntity/IOP_CNF_02_02.robot index a7e23874..05b16b18 100644 --- a/IOP_TP/NGSI-LD/Interoperability/Provision/CreateEntity/IOP_CNF_02_02.robot +++ b/IOP_TP/NGSI-LD/Interoperability/Provision/CreateEntity/IOP_CNF_02_02.robot @@ -1,6 +1,5 @@ *** Settings *** Documentation Four brokers are set up A, B, C and D. A has three registrations, one inclusive for the entities created in B, one redirect for the entity created in C and one redirect for the entities created in D. -... The client creates the entity in A. The entity should not contain the location attribute in A and B. The C and D brokers should only contain the location attribute. Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource @@ -17,44 +16,45 @@ ${entity_payload_filename} interoperability/offstre ${inclusive_registration_payload_file_path} csourceRegistrations/interoperability/context-source-registration-inclusive-2.jsonld ${first_redirect_registration_payload_file_path} csourceRegistrations/interoperability/context-source-registration-redirect-2.jsonld ${second_redirect_registration_payload_file_path} csourceRegistrations/interoperability/context-source-registration-redirect-3.jsonld -${b1_url} -${b2_url} -${b3_url} -${b4_url} +${broker_A_url} +${broker_B_url} +${broker_C_url} +${broker_D_url} *** Test Cases *** IOP_CNF_02_02 Create OffStreetParking:2 - [Documentation] Pre-conditions: No user context. No data in any broker. - ... Registrations established: Inclusive in A to B. Redirect in A to C. Redirect in A to D. + [Documentation] The client creates the entity in A. The entity should not contain the location attribute in A and B. The C and D brokers should only contain the location attribute. [Tags] since_v1.6.1 iop 4_3_3 cf_06 additive-inclusive proxy-redirect 4_3_6 5_6_1 #Create the full entity of OffStreetParking:2 in A and check for a successful response - ${response}= Create Entity ${entity_payload_filename} ${entity_id} broker_url=${b1_url} + ${response}= Create Entity ${entity_payload_filename} ${entity_id} broker_url=${broker_A_url} Check Response Status Code 201 ${response.status_code} #Agent checks, with local=true, that the entity is created in A and does not contain the location property - ${response}= Retrieve Entity ${entity_id} local=true broker_url=${b1_url} + ${response}= Retrieve Entity ${entity_id} local=true broker_url=${broker_A_url} Check Response Status Code 200 ${response.status_code} Should Not Contain ${response.json()} location #Agent checks, with local=true, that the entity is created in B and does not contain the location and name properties - ${response}= Retrieve Entity ${entity_id} local=true broker_url=${b2_url} + ${response}= Retrieve Entity ${entity_id} local=true broker_url=${broker_B_url} Check Response Status Code 200 ${response.status_code} Should Not Contain ${response.json()} location Should Not Contain ${response.json()} name #Agent checks, with local=true, that the entity is created in C and only contains the location property - ${response}= Retrieve Entity ${entity_id} local=true broker_url=${b3_url} + ${response}= Retrieve Entity ${entity_id} local=true broker_url=${broker_C_url} Check Response Status Code 200 ${response.status_code} Should Contain ${response.json()} location #Agent checks, with local=true, that the entity is created in D and only contains the location property - ${response}= Retrieve Entity ${entity_id} local=true broker_url=${b4_url} + ${response}= Retrieve Entity ${entity_id} local=true broker_url=${broker_D_url} Check Response Status Code 200 ${response.status_code} Should Contain ${response.json()} location *** Keywords *** Setup Initial Context Source Registrations + [Documentation] Registrations established: Inclusive in A to B. Redirect in A to C. Redirect in A to D. + ${entity_id}= Generate Random Parking Entity Id Set Suite Variable ${entity_id} @@ -64,9 +64,9 @@ Setup Initial Context Source Registrations ... ${registration_id1} ... ${inclusive_registration_payload_file_path} ... entity_id=${entity_id} - ... broker_url=${b2_url} + ... broker_url=${broker_B_url} ... mode=inclusive - ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${b1_url} + ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${broker_A_url} Check Response Status Code 201 ${response.status_code} ${registration_id2}= Generate Random CSR Id @@ -75,9 +75,9 @@ Setup Initial Context Source Registrations ... ${registration_id2} ... ${first_redirect_registration_payload_file_path} ... entity_id=${entity_id} - ... broker_url=${b3_url} + ... broker_url=${broker_C_url} ... mode=redirect - ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${b1_url} + ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${broker_A_url} Check Response Status Code 201 ${response.status_code} ${registration_id3}= Generate Random CSR Id @@ -86,13 +86,13 @@ Setup Initial Context Source Registrations ... ${registration_id3} ... ${second_redirect_registration_payload_file_path} ... entity_id=${entity_id} - ... broker_url=${b4_url} + ... broker_url=${broker_D_url} ... mode=redirect - ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${b1_url} + ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${broker_A_url} Check Response Status Code 201 ${response.status_code} Delete Entities And Delete Registrations - Delete Context Source Registration ${registration_id1} broker_url=${b1_url} - Delete Context Source Registration ${registration_id2} broker_url=${b1_url} - Delete Context Source Registration ${registration_id3} broker_url=${b1_url} - Delete Entity ${entity_id} broker_url=${b1_url} \ No newline at end of file + Delete Context Source Registration ${registration_id1} broker_url=${broker_A_url} + Delete Context Source Registration ${registration_id2} broker_url=${broker_A_url} + Delete Context Source Registration ${registration_id3} broker_url=${broker_A_url} + Delete Entity ${entity_id} broker_url=${broker_A_url} \ No newline at end of file diff --git a/IOP_TP/NGSI-LD/Interoperability/Provision/CreateEntity/IOP_CNF_03_01.robot b/IOP_TP/NGSI-LD/Interoperability/Provision/CreateEntity/IOP_CNF_03_01.robot index d1795bda..c2782ec4 100644 --- a/IOP_TP/NGSI-LD/Interoperability/Provision/CreateEntity/IOP_CNF_03_01.robot +++ b/IOP_TP/NGSI-LD/Interoperability/Provision/CreateEntity/IOP_CNF_03_01.robot @@ -1,6 +1,5 @@ *** Settings *** Documentation Four brokers are set up A, B, C and D. A has three registrations, one auxiliary for the entities created in B, one inclusive for the entity created in C and one inclusive for the entities created in D. -... The client creates the entity in A. The entity should be present in A and B, should not be present in C and should only contain some attributes in D. Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource @@ -17,18 +16,17 @@ ${entity_payload_filename} interoperability/offstre ${auxiliary_registration_payload_file_path} csourceRegistrations/interoperability/context-source-registration-auxiliary-2.jsonld ${first_inclusive_registration_payload_file_path} csourceRegistrations/interoperability/context-source-registration-inclusive-1.jsonld ${second_inclusive_registration_payload_file_path} csourceRegistrations/interoperability/context-source-registration-inclusive-2.jsonld -${b1_url} -${b2_url} -${b3_url} -${b4_url} +${broker_A_url} +${broker_B_url} +${broker_C_url} +${broker_D_url} *** Test Cases *** IOP_CNF_03_01 Create OffStreetParking:1 - [Documentation] Pre-conditions: No user context. No data in any broker. - ... Registrations established: Auxiliary in A to B. Inclusive in A to C. Inclusive in A to D. + [Documentation] The client creates the entity in A. The entity should be present in A and B, should not be present in C and should only contain some attributes in D. [Tags] since_v1.6.1 iop 4_3_3 cf_06 additive-inclusive additive-auxiliary 4_3_6 5_6_1 #Agent checks that the full entity of OffStreetParking:1 is created in A and check for a successful response - ${response}= Create Entity ${entity_payload_filename} ${entity_id} broker_url=${b1_url} + ${response}= Create Entity ${entity_payload_filename} ${entity_id} broker_url=${broker_A_url} Check Response Status Code 201 ${response.status_code} Should Contain ${response.json()} name Should Contain ${response.json()} location @@ -36,21 +34,21 @@ IOP_CNF_03_01 Create OffStreetParking:1 Should Contain ${response.json()} totalSpotsNumber #Agent checks, with local=true, that the entity is created in A - ${response}= Retrieve Entity ${entity_id} local=true broker_url=${b1_url} + ${response}= Retrieve Entity ${entity_id} local=true broker_url=${broker_A_url} Should Be Equal ${response.json()} ${entity_payload_filename} Check Response Status Code 200 ${response.status_code} #Agent checks, with local=true, that the entity was not created in B - ${response}= Retrieve Entity ${entity_id} local=true broker_url=${b2_url} + ${response}= Retrieve Entity ${entity_id} local=true broker_url=${broker_B_url} Check Response Status Code 404 ${response.status_code} #Agent checks, with local=true, that the entity is created in C - ${response}= Retrieve Entity ${entity_id} local=true broker_url=${b3_url} + ${response}= Retrieve Entity ${entity_id} local=true broker_url=${broker_C_url} Check Response Status Code 200 ${response.status_code} Should Be Equal ${response.json()} ${entity_payload_filename} #Agent checks, with local=true, that the entity is created in D and only contains the properties availableSpotsNumber and totalSpotsNumber - ${response}= Retrieve Entity ${entity_id} local=true broker_url=${b4_url} + ${response}= Retrieve Entity ${entity_id} local=true broker_url=${broker_D_url} Check Response Status Code 200 ${response.status_code} Should Contain ${response.json()} availableSpotsNumber Should Contain ${response.json()} totalSpotsNumber @@ -59,6 +57,8 @@ IOP_CNF_03_01 Create OffStreetParking:1 *** Keywords *** Setup Initial Context Source Registrations + [Documentation] Registrations established: Auxiliary in A to B. Inclusive in A to C. Inclusive in A to D. + ${entity_id}= Generate Random Parking Entity Id Set Suite Variable ${entity_id} @@ -68,9 +68,9 @@ Setup Initial Context Source Registrations ... ${registration_id1} ... ${auxiliary_registration_payload_file_path} ... entity_id=${entity_id} - ... broker_url=${b2_url} + ... broker_url=${broker_B_url} ... mode=auxiliary - ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${b1_url} + ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${broker_A_url} Check Response Status Code 201 ${response.status_code} ${registration_id2}= Generate Random CSR Id @@ -79,9 +79,9 @@ Setup Initial Context Source Registrations ... ${registration_id2} ... ${first_inclusive_registration_payload_file_path} ... entity_id=${entity_id} - ... broker_url=${b3_url} + ... broker_url=${broker_C_url} ... mode=inclusive - ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${b1_url} + ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${broker_A_url} Check Response Status Code 201 ${response.status_code} ${registration_id3}= Generate Random CSR Id @@ -90,13 +90,13 @@ Setup Initial Context Source Registrations ... ${registration_id3} ... ${second_inclusive_registration_payload_file_path} ... entity_id=${entity_id} - ... broker_url=${b4_url} + ... broker_url=${broker_D_url} ... mode=inclusive - ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${b1_url} + ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${broker_A_url} Check Response Status Code 201 ${response.status_code} Delete Entities And Delete Registrations - Delete Context Source Registration ${registration_id1} broker_url=${b1_url} - Delete Context Source Registration ${registration_id2} broker_url=${b1_url} - Delete Context Source Registration ${registration_id3} broker_url=${b1_url} - Delete Entity ${entity_id} broker_url=${b1_url} \ No newline at end of file + Delete Context Source Registration ${registration_id1} broker_url=${broker_A_url} + Delete Context Source Registration ${registration_id2} broker_url=${broker_A_url} + Delete Context Source Registration ${registration_id3} broker_url=${broker_A_url} + Delete Entity ${entity_id} broker_url=${broker_A_url} \ No newline at end of file diff --git a/IOP_TP/NGSI-LD/Interoperability/Provision/CreateEntity/IOP_CNF_03_02.robot b/IOP_TP/NGSI-LD/Interoperability/Provision/CreateEntity/IOP_CNF_03_02.robot index e10f98ca..2f875f99 100644 --- a/IOP_TP/NGSI-LD/Interoperability/Provision/CreateEntity/IOP_CNF_03_02.robot +++ b/IOP_TP/NGSI-LD/Interoperability/Provision/CreateEntity/IOP_CNF_03_02.robot @@ -1,6 +1,5 @@ *** Settings *** Documentation Four brokers are set up A, B, C and D. A has three registrations, one auxiliary for the entities created in B, one inclusive for the entity created in C and one inclusive for the entities created in D. -... The client creates the entity in A. The entity should be present in C, should not be present in both B and D. Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource @@ -17,38 +16,39 @@ ${entity_payload_filename} interoperability/offstre ${auxiliary_registration_payload_file_path} csourceRegistrations/interoperability/context-source-registration-auxiliary-2.jsonld ${first_inclusive_registration_payload_file_path} csourceRegistrations/interoperability/context-source-registration-inclusive-1.jsonld ${second_inclusive_registration_payload_file_path} csourceRegistrations/interoperability/context-source-registration-inclusive-2.jsonld -${b1_url} -${b2_url} -${b3_url} -${b4_url} +${broker_A_url} +${broker_B_url} +${broker_C_url} +${broker_D_url} *** Test Cases *** IOP_CNF_03_02 Create Partial OffStreetParking:1 - [Documentation] Pre-conditions: No user context. No data in any broker. - ... Registrations established: Auxiliary in A to B. Inclusive in A to C. Inclusive in A to D. + [Documentation] The client creates the entity in A. The entity should be present in C, should not be present in both B and D. [Tags] since_v1.6.1 iop 4_3_3 cf_06 additive-inclusive additive-auxiliary 4_3_6 5_6_1 #Check that the the entity of OffStreetParking:1 with location and name only is created in A and check for a successful response - ${response}= Create Entity ${entity_payload_filename} ${entity_id} broker_url=${b1_url} + ${response}= Create Entity ${entity_payload_filename} ${entity_id} broker_url=${broker_A_url} Check Response Status Code 201 ${response.status_code} Should Contain ${response.json()} name Should Contain ${response.json()} location #Agent checks, with local=true, that the entity is created in A - ${response}= Retrieve Entity ${entity_id} local=true broker_url=${b1_url} + ${response}= Retrieve Entity ${entity_id} local=true broker_url=${broker_A_url} Check Response Status Code 200 ${response.status_code} #Agent checks, with local=true, that the entity was not created in B - ${response}= Retrieve Entity ${entity_id} local=true broker_url=${b2_url} + ${response}= Retrieve Entity ${entity_id} local=true broker_url=${broker_B_url} Check Response Status Code 404 ${response.status_code} #Agent checks, with local=true, that the entity is created in C - ${response}= Retrieve Entity ${entity_id} local=true broker_url=${b3_url} + ${response}= Retrieve Entity ${entity_id} local=true broker_url=${broker_C_url} Check Response Status Code 200 ${response.status_code} #Agent checks, with local=true, that the entity was not created in D - ${response}= Retrieve Entity ${entity_id} local=true broker_url=${b4_url} + ${response}= Retrieve Entity ${entity_id} local=true broker_url=${broker_D_url} Check Response Status Code 404 ${response.status_code} *** Keywords *** Setup Initial Context Source Registrations + [Documentation] Registrations established: Auxiliary in A to B. Inclusive in A to C. Inclusive in A to D. + ${entity_id}= Generate Random Parking Entity Id Set Suite Variable ${entity_id} @@ -58,9 +58,9 @@ Setup Initial Context Source Registrations ... ${registration_id1} ... ${auxiliary_registration_payload_file_path} ... entity_id=${entity_id} - ... broker_url=${b2_url} + ... broker_url=${broker_B_url} ... mode=auxiliary - ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${b1_url} + ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${broker_A_url} Check Response Status Code 201 ${response.status_code} ${registration_id2}= Generate Random CSR Id @@ -69,9 +69,9 @@ Setup Initial Context Source Registrations ... ${registration_id2} ... ${first_inclusive_registration_payload_file_path} ... entity_id=${entity_id} - ... broker_url=${b3_url} + ... broker_url=${broker_C_url} ... mode=inclusive - ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${b1_url} + ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${broker_A_url} Check Response Status Code 201 ${response.status_code} ${registration_id3}= Generate Random CSR Id @@ -80,13 +80,13 @@ Setup Initial Context Source Registrations ... ${registration_id3} ... ${second_inclusive_registration_payload_file_path} ... entity_id=${entity_id} - ... broker_url=${b4_url} + ... broker_url=${broker_D_url} ... mode=inclusive - ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${b1_url} + ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${broker_A_url} Check Response Status Code 201 ${response.status_code} Delete Entities And Delete Registrations - Delete Context Source Registration ${registration_id1} broker_url=${b1_url} - Delete Context Source Registration ${registration_id2} broker_url=${b1_url} - Delete Context Source Registration ${registration_id3} broker_url=${b1_url} - Delete Entity ${entity_id} broker_url=${b1_url} \ No newline at end of file + Delete Context Source Registration ${registration_id1} broker_url=${broker_A_url} + Delete Context Source Registration ${registration_id2} broker_url=${broker_A_url} + Delete Context Source Registration ${registration_id3} broker_url=${broker_A_url} + Delete Entity ${entity_id} broker_url=${broker_A_url} \ No newline at end of file diff --git a/IOP_TP/NGSI-LD/Interoperability/Provision/CreateEntity/IOP_CNF_04_01.robot b/IOP_TP/NGSI-LD/Interoperability/Provision/CreateEntity/IOP_CNF_04_01.robot index 79aa6339..a3c589d3 100644 --- a/IOP_TP/NGSI-LD/Interoperability/Provision/CreateEntity/IOP_CNF_04_01.robot +++ b/IOP_TP/NGSI-LD/Interoperability/Provision/CreateEntity/IOP_CNF_04_01.robot @@ -1,6 +1,5 @@ *** Settings *** Documentation Five brokers are set up A, B, C, D and E. A has two registrations, one auxiliary for the entities created in B and one inclusive for the entity created in C. B has two registration, one redirect for the entities created in D, one redirect for the entity created in E. C has one exclusive registration to E. -... The client creates the entity in A. The entity should be present in C, it should not be present in B, D and E. Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource @@ -19,40 +18,41 @@ ${first_redirect_registration_payload_file_path} csourceRegistrations/inte ${second_redirect_registration_payload_file_path} csourceRegistrations/interoperability/context-source-registration-redirect-2.jsonld ${inclusive_registration_payload_file_path} csourceRegistrations/interoperability/context-source-registration-inclusive-1.jsonld ${exclusive_registration_payload_file_path} csourceRegistrations/interoperability/context-source-registration-exclusive-1.jsonld -${b1_url} -${b2_url} -${b3_url} -${b4_url} -${b5_url} +${broker_A_url} +${broker_B_url} +${broker_C_url} +${broker_D_url} +${broker_E_url} *** Test Cases *** IOP_CNF_04_01 Create OffStreetParking:1 - [Documentation] Pre-conditions: No user context. No data in any broker. - ... Registrations established: Auxiliary in A to B. Inclusive in A to C. Redirect in B to D. Redirect in B to E. Exclusive in C to E. + [Documentation] The client creates the entity in A. The entity should be present in C, it should not be present in B, D and E. [Tags] since_v1.6.1 iop 4_3_3 cf_06 additive-inclusive additive-auxiliary proxy-exclusive proxy-redirect 4_3_6 5_6_1 #Create the full entity of OffStreetParking:1 in A and check for a successful response - ${response}= Create Entity ${entity_payload_filename} ${entity_id} broker_url=${b1_url} + ${response}= Create Entity ${entity_payload_filename} ${entity_id} broker_url=${broker_A_url} Check Response Status Code 201 ${response.status_code} #Agent checks, with local=true, that the entity is created in A - ${response}= Retrieve Entity ${entity_id} local=true broker_url=${b1_url} + ${response}= Retrieve Entity ${entity_id} local=true broker_url=${broker_A_url} Check Response Status Code 200 ${response.status_code} #Agent checks, with local=true, that the entity was not created in B - ${response}= Retrieve Entity ${entity_id} local=true broker_url=${b2_url} + ${response}= Retrieve Entity ${entity_id} local=true broker_url=${broker_B_url} Check Response Status Code 404 ${response.status_code} #Agent checks, with local=true, that the entity is created in C - ${response}= Retrieve Entity ${entity_id} local=true broker_url=${b3_url} + ${response}= Retrieve Entity ${entity_id} local=true broker_url=${broker_C_url} Check Response Status Code 200 ${response.status_code} #Agent checks, with local=true, that the entity was not created in D - ${response}= Retrieve Entity ${entity_id} local=true broker_url=${b4_url} + ${response}= Retrieve Entity ${entity_id} local=true broker_url=${broker_D_url} Check Response Status Code 404 ${response.status_code} #Agent checks, with local=true, that the entity was not created in E - ${response}= Retrieve Entity ${entity_id} local=true broker_url=${b5_url} + ${response}= Retrieve Entity ${entity_id} local=true broker_url=${broker_E_url} Check Response Status Code 404 ${response.status_code} *** Keywords *** Setup Initial Context Source Registrations + [Documentation] Registrations established: Auxiliary in A to B. Inclusive in A to C. Redirect in B to D. Redirect in B to E. Exclusive in C to E. + ${entity_id}= Generate Random Parking Entity Id Set Suite Variable ${entity_id} @@ -62,9 +62,9 @@ Setup Initial Context Source Registrations ... ${registration_id1} ... ${auxiliary_registration_payload_file_path} ... entity_id=${entity_id} - ... broker_url=${b2_url} + ... broker_url=${broker_B_url} ... mode=auxiliary - ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${b1_url} + ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${broker_A_url} Check Response Status Code 201 ${response.status_code} ${registration_id2}= Generate Random CSR Id @@ -73,9 +73,9 @@ Setup Initial Context Source Registrations ... ${registration_id2} ... ${first_redirect_registration_payload_file_path} ... entity_id=${entity_id} - ... broker_url=${b4_url} + ... broker_url=${broker_D_url} ... mode=redirect - ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${b2_url} + ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${broker_B_url} Check Response Status Code 201 ${response.status_code} ${registration_id3}= Generate Random CSR Id @@ -84,9 +84,9 @@ Setup Initial Context Source Registrations ... ${registration_id3} ... ${second_redirect_registration_payload_file_path} ... entity_id=${entity_id} - ... broker_url=${b5_url} + ... broker_url=${broker_E_url} ... mode=redirect - ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${b2_url} + ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${broker_B_url} Check Response Status Code 201 ${response.status_code} ${registration_id4}= Generate Random CSR Id @@ -95,9 +95,9 @@ Setup Initial Context Source Registrations ... ${registration_id4} ... ${inclusive_registration_payload_file_path} ... entity_id=${entity_id} - ... broker_url=${b3_url} + ... broker_url=${broker_C_url} ... mode=inclusive - ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${b1_url} + ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${broker_A_url} Check Response Status Code 201 ${response.status_code} ${registration_id5}= Generate Random CSR Id @@ -106,15 +106,15 @@ Setup Initial Context Source Registrations ... ${registration_id5} ... ${exclusive_registration_payload_file_path} ... entity_id=${entity_id} - ... broker_url=${b5_url} + ... broker_url=${broker_E_url} ... mode=exclusive - ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${b3_url} + ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${broker_B_url} Check Response Status Code 201 ${response.status_code} Delete Entities And Delete Registrations - Delete Context Source Registration ${registration_id1} broker_url=${b1_url} - Delete Context Source Registration ${registration_id2} broker_url=${b2_url} - Delete Context Source Registration ${registration_id3} broker_url=${b2_url} - Delete Context Source Registration ${registration_id4} broker_url=${b1_url} - Delete Context Source Registration ${registration_id5} broker_url=${b3_url} - Delete Entity ${entity_id} broker_url=${b1_url} \ No newline at end of file + Delete Context Source Registration ${registration_id1} broker_url=${broker_A_url} + Delete Context Source Registration ${registration_id2} broker_url=${broker_B_url} + Delete Context Source Registration ${registration_id3} broker_url=${broker_B_url} + Delete Context Source Registration ${registration_id4} broker_url=${broker_A_url} + Delete Context Source Registration ${registration_id5} broker_url=${broker_B_url} + Delete Entity ${entity_id} broker_url=${broker_A_url} \ No newline at end of file diff --git a/IOP_TP/NGSI-LD/Interoperability/Provision/CreateEntity/IOP_CNF_04_02.robot b/IOP_TP/NGSI-LD/Interoperability/Provision/CreateEntity/IOP_CNF_04_02.robot index 62cd60be..d57e401c 100644 --- a/IOP_TP/NGSI-LD/Interoperability/Provision/CreateEntity/IOP_CNF_04_02.robot +++ b/IOP_TP/NGSI-LD/Interoperability/Provision/CreateEntity/IOP_CNF_04_02.robot @@ -1,6 +1,5 @@ *** Settings *** Documentation Five brokers are set up A, B, C, D and E. A has two registrations, one auxiliary for the entities created in B and one inclusive for the entity created in C. B has two registration, one redirect for the entities created in D, one redirect for the entity created in E. C has one exclusive registration to E. -... The client creates the entity in A. The entity should be present in C and in E with only one attribute. The entity shall not be present in B and E. Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource @@ -19,45 +18,46 @@ ${first_redirect_registration_payload_file_path} csourceRegistrations/inte ${second_redirect_registration_payload_file_path} csourceRegistrations/interoperability/context-source-registration-redirect-2.jsonld ${inclusive_registration_payload_file_path} csourceRegistrations/interoperability/context-source-registration-inclusive-1.jsonld ${exclusive_registration_payload_file_path} csourceRegistrations/interoperability/context-source-registration-exclusive-1.jsonld -${b1_url} -${b2_url} -${b3_url} -${b4_url} -${b5_url} +${broker_A_url} +${broker_B_url} +${broker_C_url} +${broker_D_url} +${broker_E_url} *** Test Cases *** IOP_CNF_04_02 Create OffStreetParking:2 - [Documentation] Pre-conditions: No user context. No data in any broker. - ... Registrations established: Auxiliary in A to B. Inclusive in A to C. Redirect in B to D. Redirect in B to E. Exclusive in C to E. + [Documentation] The client creates the entity in A. The entity should be present in C and in E with only one attribute. The entity shall not be present in B and E. [Tags] since_v1.6.1 iop 4_3_3 cf_06 additive-inclusive additive-auxiliary proxy-exclusive proxy-redirect 4_3_6 5_6_1 #Create the full entity of OffStreetParking:2 in A and check for a successful response - ${response}= Create Entity ${entity_payload_filename} ${entity_id} broker_url=${b1_url} + ${response}= Create Entity ${entity_payload_filename} ${entity_id} broker_url=${broker_A_url} Check Response Status Code 201 ${response.status_code} #Agent checks, with local=true, that the entity is created in A - ${response}= Retrieve Entity ${entity_id} local=true broker_url=${b1_url} + ${response}= Retrieve Entity ${entity_id} local=true broker_url=${broker_A_url} Check Response Status Code 200 ${response.status_code} #Agent checks, with local=true, that the entity was not created in B - ${response}= Retrieve Entity ${entity_id} local=true broker_url=${b2_url} + ${response}= Retrieve Entity ${entity_id} local=true broker_url=${broker_B_url} Check Response Status Code 404 ${response.status_code} #Agent checks, with local=true, that the entity is created in C - ${response}= Retrieve Entity ${entity_id} local=true broker_url=${b3_url} + ${response}= Retrieve Entity ${entity_id} local=true broker_url=${broker_C_url} Check Response Status Code 200 ${response.status_code} #Agent checks, with local=true, that the entity was not created in D - ${response}= Retrieve Entity ${entity_id} local=true broker_url=${b4_url} + ${response}= Retrieve Entity ${entity_id} local=true broker_url=${broker_D_url} Check Response Status Code 404 ${response.status_code} #Agent checks, with local=true, that the entity is created in E and only contains the totalSpotsNumber property - ${response}= Retrieve Entity ${entity_id} local=true broker_url=${b5_url} + ${response}= Retrieve Entity ${entity_id} local=true broker_url=${broker_E_url} Check Response Status Code 200 ${response.status_code} Should Contain ${response.json()} totalSpotsNumber *** Keywords *** Setup Initial Context Source Registrations + [Documentation] Registrations established: Auxiliary in A to B. Inclusive in A to C. Redirect in B to D. Redirect in B to E. Exclusive in C to E. + ${entity_id}= Generate Random Parking Entity Id Set Suite Variable ${entity_id} @@ -67,9 +67,9 @@ Setup Initial Context Source Registrations ... ${registration_id1} ... ${auxiliary_registration_payload_file_path} ... entity_id=${entity_id} - ... broker_url=${b2_url} + ... broker_url=${broker_B_url} ... mode=auxiliary - ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${b1_url} + ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${broker_A_url} Check Response Status Code 201 ${response.status_code} ${registration_id2}= Generate Random CSR Id @@ -78,9 +78,9 @@ Setup Initial Context Source Registrations ... ${registration_id2} ... ${first_redirect_registration_payload_file_path} ... entity_id=${entity_id} - ... broker_url=${b4_url} + ... broker_url=${broker_D_url} ... mode=redirect - ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${b2_url} + ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${broker_B_url} Check Response Status Code 201 ${response.status_code} ${registration_id3}= Generate Random CSR Id @@ -89,9 +89,9 @@ Setup Initial Context Source Registrations ... ${registration_id3} ... ${second_redirect_registration_payload_file_path} ... entity_id=${entity_id} - ... broker_url=${b5_url} + ... broker_url=${broker_E_url} ... mode=redirect - ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${b2_url} + ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${broker_B_url} Check Response Status Code 201 ${response.status_code} ${registration_id4}= Generate Random CSR Id @@ -100,9 +100,9 @@ Setup Initial Context Source Registrations ... ${registration_id4} ... ${inclusive_registration_payload_file_path} ... entity_id=${entity_id} - ... broker_url=${b3_url} + ... broker_url=${broker_C_url} ... mode=inclusive - ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${b1_url} + ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${broker_A_url} Check Response Status Code 201 ${response.status_code} ${registration_id5}= Generate Random CSR Id @@ -111,17 +111,17 @@ Setup Initial Context Source Registrations ... ${registration_id5} ... ${exclusive_registration_payload_file_path} ... entity_id=${entity_id} - ... broker_url=${b5_url} + ... broker_url=${broker_E_url} ... mode=exclusive - ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${b3_url} + ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${broker_B_url} Check Response Status Code 201 ${response.status_code} Delete Entities And Delete Registrations - Delete Context Source Registration ${registration_id1} broker_url=${b1_url} - Delete Context Source Registration ${registration_id2} broker_url=${b2_url} - Delete Context Source Registration ${registration_id3} broker_url=${b2_url} - Delete Context Source Registration ${registration_id4} broker_url=${b1_url} - Delete Context Source Registration ${registration_id5} broker_url=${b3_url} - Delete Entity ${entity_id} broker_url=${b1_url} - Delete Entity ${entity_id} broker_url=${b3_url} - Delete Entity ${entity_id} broker_url=${b5_url} \ No newline at end of file + Delete Context Source Registration ${registration_id1} broker_url=${broker_A_url} + Delete Context Source Registration ${registration_id2} broker_url=${broker_B_url} + Delete Context Source Registration ${registration_id3} broker_url=${broker_B_url} + Delete Context Source Registration ${registration_id4} broker_url=${broker_A_url} + Delete Context Source Registration ${registration_id5} broker_url=${broker_B_url} + Delete Entity ${entity_id} broker_url=${broker_A_url} + Delete Entity ${entity_id} broker_url=${broker_C_url} + Delete Entity ${entity_id} broker_url=${broker_E_url} \ No newline at end of file diff --git a/README.md b/README.md index 19316fcb..074d36c5 100644 --- a/README.md +++ b/README.md @@ -164,15 +164,17 @@ test launch command followed by the file name. - The Interoperability tests assume that it will manage multiple brokers - Multiple NGSI-LD brokers will be running simultaneously on different ports - Terminal will pass the broker URLs as a variable + - All broker environments are initialized as empty. Test-specific entities and source registrations are dynamically + created during the setup phase of each test case. The following example shows how to run an interoperability test with multiple brokers: ``` - robot --variable b1_url:http://localhost:8080/ngsi-ld/v1 \ - --variable b2_url:http://localhost:8081/ngsi-ld/v1 \ - --variable b3_url:http://localhost:8082/ngsi-ld/v1 \ - --variable b4_url:http://localhost:8083/ngsi-ld/v1 \ - --variable b5_url:http://localhost:8084/ngsi-ld/v1 \ + robot --variable broker_A_url:http://localhost:8080/ngsi-ld/v1 \ + --variable broker_B_url:http://localhost:8081/ngsi-ld/v1 \ + --variable broker_C_url:http://localhost:8082/ngsi-ld/v1 \ + --variable broker_D_url:http://localhost:8083/ngsi-ld/v1 \ + --variable broker_E_url:http://localhost:8084/ngsi-ld/v1 \ ./TP/NGSI-LD/Interoperability/Provision/Entities/CreateEntity/IOP_CNF_01_01.robot ``` -- GitLab From a472337f417bd7972a5ccdcd7f356011e05f255d Mon Sep 17 00:00:00 2001 From: Benedetta Arena Date: Thu, 25 Jun 2026 10:59:39 +0200 Subject: [PATCH 2/8] refactor: centralize setup and teardown logic --- .../Entity/QueryEntities/IOP_CNF_01_01.robot | 70 +++----------- .../Entity/QueryEntities/IOP_CNF_01_02.robot | 72 ++++----------- resources/IOPUtils/IOPRegistry.py | 15 +++ .../IOPUtils/InteroperabilityUtils.resource | 92 +++++++++++++++++++ 4 files changed, 138 insertions(+), 111 deletions(-) create mode 100644 resources/IOPUtils/IOPRegistry.py create mode 100644 resources/IOPUtils/InteroperabilityUtils.resource diff --git a/IOP_TP/NGSI-LD/Interoperability/Consumption/Entity/QueryEntities/IOP_CNF_01_01.robot b/IOP_TP/NGSI-LD/Interoperability/Consumption/Entity/QueryEntities/IOP_CNF_01_01.robot index 40e2462b..43ed86c4 100644 --- a/IOP_TP/NGSI-LD/Interoperability/Consumption/Entity/QueryEntities/IOP_CNF_01_01.robot +++ b/IOP_TP/NGSI-LD/Interoperability/Consumption/Entity/QueryEntities/IOP_CNF_01_01.robot @@ -1,22 +1,12 @@ *** Settings *** Documentation Three brokers are set up A, B and C. A has two registrations, one inclusive for the entities created in B and one exclusive for the entity created in C. -Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource -Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource -Resource ${EXECDIR}/resources/ApiUtils/ContextSourceDiscovery.resource -Resource ${EXECDIR}/resources/ApiUtils/ContextSourceRegistration.resource -Resource ${EXECDIR}/resources/AssertionUtils.resource -Resource ${EXECDIR}/resources/JsonUtils.resource +Resource ${EXECDIR}/resources/IOPUtils/InteroperabilityUtils.resource Test Setup Setup Initial Context Source Registrations Test Teardown Delete Entities and Delete Registrations *** Variables *** -${first_entity_payload_filename} interoperability/offstreet-parking1-full.jsonld -${second_entity_payload_filename} interoperability/offstreet-parking2-full.jsonld -${third_entity_payload_filename} interoperability/offstreet-parking2-no-location-and-totalspotsnumber.jsonld -${inclusive_registration_payload_file_path} csourceRegistrations/interoperability/context-source-registration-inclusive-2.jsonld -${exclusive_registration_payload_file_path} csourceRegistrations/interoperability/context-source-registration-exclusive-2.jsonld ${broker_A_url} ${broker_B_url} ${broker_C_url} @@ -59,50 +49,20 @@ Setup Initial Context Source Registrations Set Suite Variable ${entity_id} ${second_entity_id}= Generate Random Parking Entity Id Set Suite Variable ${second_entity_id} - ${response}= Create Entity ${first_entity_payload_filename} ${entity_id} broker_url=${broker_B_url} - Check Response Status Code 201 ${response.status_code} - ${response}= Create Entity ${third_entity_payload_filename} ${second_entity_id} broker_url=${broker_B_url} - Check Response Status Code 201 ${response.status_code} - ${response}= Create Entity ${second_entity_payload_filename} ${entity_id} broker_url=${broker_C_url} - Check Response Status Code 201 ${response.status_code} - ${registration_id1}= Generate Random CSR Id - Set Suite Variable ${registration_id1} - ${registration_payload}= Prepare Context Source Registration From File - ... ${registration_id1} - ... ${inclusive_registration_payload_file_path} - ... entity_id=${entity_id} - ... broker_url=${broker_B_url} - ... mode=inclusive - ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${broker_A_url} - Check Response Status Code 201 ${response.status_code} - - ${registration_id2}= Generate Random CSR Id - Set Suite Variable ${registration_id2} - ${registration_payload}= Prepare Context Source Registration From File - ... ${registration_id2} - ... ${inclusive_registration_payload_file_path} - ... entity_id=${second_entity_id} - ... broker_url=${broker_B_url} - ... mode=inclusive - ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${broker_A_url} - Check Response Status Code 201 ${response.status_code} - - ${registration_id3}= Generate Random CSR Id - Set Suite Variable ${registration_id3} - ${registration_payload}= Prepare Context Source Registration From File - ... ${registration_id3} - ... ${exclusive_registration_payload_file_path} - ... entity_id=${entity_id} - ... broker_url=${broker_C_url} - ... mode=exclusive - ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${broker_A_url} - Check Response Status Code 201 ${response.status_code} + ${response}= Initialize Three Broker IOP Scenario + ... ${entity_id} + ... ${second_entity_id} + ... ${entity_id} + ... ${broker_A_url} + ... ${broker_B_url} + ... ${broker_C_url} Delete Entities And Delete Registrations - Delete Context Source Registration ${registration_id1} broker_url=${broker_A_url} - Delete Context Source Registration ${registration_id2} broker_url=${broker_A_url} - Delete Context Source Registration ${registration_id3} broker_url=${broker_A_url} - Delete Entity ${entity_id} broker_url=${broker_B_url} - Delete Entity ${second_entity_id} broker_url=${broker_B_url} - Delete Entity ${entity_id} broker_url=${broker_C_url} \ No newline at end of file + ${response}= Delete Three Broker IOP Scenario + ... ${entity_id} + ... ${second_entity_id} + ... ${entity_id} + ... ${broker_A_url} + ... ${broker_B_url} + ... ${broker_C_url} \ No newline at end of file diff --git a/IOP_TP/NGSI-LD/Interoperability/Consumption/Entity/QueryEntities/IOP_CNF_01_02.robot b/IOP_TP/NGSI-LD/Interoperability/Consumption/Entity/QueryEntities/IOP_CNF_01_02.robot index c1098c0c..155a49d0 100644 --- a/IOP_TP/NGSI-LD/Interoperability/Consumption/Entity/QueryEntities/IOP_CNF_01_02.robot +++ b/IOP_TP/NGSI-LD/Interoperability/Consumption/Entity/QueryEntities/IOP_CNF_01_02.robot @@ -1,28 +1,18 @@ *** Settings *** Documentation Three brokers are set up A, B and C. A has two registrations, one inclusive for the entities created in B and one exclusive for the entity created in C. -Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource -Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource -Resource ${EXECDIR}/resources/ApiUtils/ContextSourceDiscovery.resource -Resource ${EXECDIR}/resources/ApiUtils/ContextSourceRegistration.resource -Resource ${EXECDIR}/resources/AssertionUtils.resource -Resource ${EXECDIR}/resources/JsonUtils.resource +Resource ${EXECDIR}/resources/InteroperabilityUtils.resource Test Setup Setup Initial Context Source Registrations Test Teardown Delete Entities and Delete Registrations *** Variables *** -${first_entity_payload_filename} interoperability/offstreet-parking1-full.jsonld -${second_entity_payload_filename} interoperability/offstreet-parking2-full.jsonld -${third_entity_payload_filename} interoperability/offstreet-parking2-no-location-and-totalspotsnumber.jsonld -${inclusive_registration_payload_file_path} csourceRegistrations/interoperability/context-source-registration-inclusive-2.jsonld -${exclusive_registration_payload_file_path} csourceRegistrations/interoperability/context-source-registration-exclusive-2.jsonld ${broker_A_url} ${broker_B_url} ${broker_C_url} *** Test Cases *** -IOP_CNF_01_01 Query Entities Of Type OffstreetParking Via POST +IOP_CNF_01_02 Query Entities Of Type OffstreetParking Via POST [Documentation] The client sends and HTTP POST request to check that the entities can be queried from all brokers. [Tags] since_v1.6.1 iop 4_3_3 cf_06 additive-inclusive proxy-exclusive 4_3_6 5_7_2 6_23_2_1 @@ -59,50 +49,20 @@ Setup Initial Context Source Registrations Set Suite Variable ${entity_id} ${second_entity_id}= Generate Random Parking Entity Id Set Suite Variable ${second_entity_id} - ${response}= Create Entity ${first_entity_payload_filename} ${entity_id} broker_url=${broker_B_url} - Check Response Status Code 201 ${response.status_code} - ${response}= Create Entity ${third_entity_payload_filename} ${second_entity_id} broker_url=${broker_B_url} - Check Response Status Code 201 ${response.status_code} - ${response}= Create Entity ${second_entity_payload_filename} ${entity_id} broker_url=${broker_C_url} - Check Response Status Code 201 ${response.status_code} - ${registration_id1}= Generate Random CSR Id - Set Suite Variable ${registration_id1} - ${registration_payload}= Prepare Context Source Registration From File - ... ${registration_id1} - ... ${inclusive_registration_payload_file_path} - ... entity_id=${entity_id} - ... broker_url=${broker_B_url} - ... mode=inclusive - ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${broker_A_url} - Check Response Status Code 201 ${response.status_code} - - ${registration_id2}= Generate Random CSR Id - Set Suite Variable ${registration_id2} - ${registration_payload}= Prepare Context Source Registration From File - ... ${registration_id2} - ... ${inclusive_registration_payload_file_path} - ... entity_id=${second_entity_id} - ... broker_url=${broker_B_url} - ... mode=inclusive - ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${broker_A_url} - Check Response Status Code 201 ${response.status_code} - - ${registration_id3}= Generate Random CSR Id - Set Suite Variable ${registration_id3} - ${registration_payload}= Prepare Context Source Registration From File - ... ${registration_id3} - ... ${exclusive_registration_payload_file_path} - ... entity_id=${entity_id} - ... broker_url=${broker_C_url} - ... mode=exclusive - ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${broker_A_url} - Check Response Status Code 201 ${response.status_code} + ${response}= Initialize Three Broker IOP Scenario + ... ${entity_id} + ... ${second_entity_id} + ... ${entity_id} + ... ${broker_A_url} + ... ${broker_B_url} + ... ${broker_C_url} Delete Entities And Delete Registrations - Delete Context Source Registration ${registration_id1} broker_url=${broker_A_url} - Delete Context Source Registration ${registration_id2} broker_url=${broker_A_url} - Delete Context Source Registration ${registration_id3} broker_url=${broker_A_url} - Delete Entity ${entity_id} broker_url=${broker_B_url} - Delete Entity ${second_entity_id} broker_url=${broker_B_url} - Delete Entity ${entity_id} broker_url=${broker_C_url} \ No newline at end of file + ${response}= Delete Three Broker IOP Scenario + ... ${entity_id} + ... ${second_entity_id} + ... ${entity_id} + ... ${broker_A_url} + ... ${broker_B_url} + ... ${broker_C_url} \ No newline at end of file diff --git a/resources/IOPUtils/IOPRegistry.py b/resources/IOPUtils/IOPRegistry.py new file mode 100644 index 00000000..a8f98fcb --- /dev/null +++ b/resources/IOPUtils/IOPRegistry.py @@ -0,0 +1,15 @@ +import os + +IOP_REGISTRY_URL = { + "parking": { + "full_1": "interoperability/offstreet-parking1-full.jsonld", + "full_2": "interoperability/offstreet-parking2-full.jsonld", + "no_location_and_totalspotnumber_2": "interoperability/offstreet-parking2-no-location-and-totalspotsnumber.jsonld" + }, + "registration": { + "inclusive_1": "csourceRegistrations/interoperability/context-source-registration-inclusive-1.jsonld", + "inclusive_2": "csourceRegistrations/interoperability/context-source-registration-inclusive-2.jsonld", + "exclusive_1": "csourceRegistrations/interoperability/context-source-registration-exclusive-1.jsonld", + "exclusive_2": "csourceRegistrations/interoperability/context-source-registration-exclusive-2.jsonld" + } +} \ No newline at end of file diff --git a/resources/IOPUtils/InteroperabilityUtils.resource b/resources/IOPUtils/InteroperabilityUtils.resource new file mode 100644 index 00000000..f0a8336c --- /dev/null +++ b/resources/IOPUtils/InteroperabilityUtils.resource @@ -0,0 +1,92 @@ +*** Settings *** +Documentation Common keywords used in setup steps for interoperability + +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextSourceDiscovery.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextSourceRegistration.resource +Resource ${EXECDIR}/resources/AssertionUtils.resource +Resource ${EXECDIR}/resources/JsonUtils.resource +Variables ${EXECDIR}/resources/IOPUtils/IOPRegistry.py + +*** Keywords *** +Provision Entity And Registration For IOP Test + [Arguments] ${entity_id} + ... ${entity_payload} + ... ${registration_id} + ... ${registration_payload_file} + ... ${broker_url} + ... ${target_broker_url} + ... ${mode} + + ${response}= Create Entity + ... ${entity_payload} + ... ${entity_id} + ... broker_url=${broker_url} + Check Response Status Code 201 ${response.status_code} + + ${registration_payload}= Prepare Context Source Registration From File + ... ${registration_id} + ... ${registration_payload_file} + ... entity_id=${entity_id} + ... mode=${mode} + ... broker_url=${broker_url} + ${response}= Create Context Source Registration With Return ${registration_payload} content_type=${CONTENT_TYPE_LD_JSON} broker_url=${target_broker_url} + Check Response Status Code 201 ${response.status_code} + +Initialize Three Broker IOP Scenario + [Arguments] ${first_entity_id} + ... ${second_entity_id} + ... ${third_entity_id} + ... ${first_broker_url} + ... ${second_broker_url} + ... ${third_broker_url} + + ${registration_id1}= Generate Random CSR Id + Set Suite Variable ${registration_id1} + ${registration_id2}= Generate Random CSR Id + Set Suite Variable ${registration_id2} + ${registration_id3}= Generate Random CSR Id + Set Suite Variable ${registration_id3} + + ${response}= Provision Entity And Registration For IOP Test + ... ${first_entity_id} + ... ${IOP_REGISTRY_URL}[parking][full_1] + ... ${registration_id1} + ... ${IOP_REGISTRY_URL}[registration][inclusive_2] + ... ${second_broker_url} + ... ${first_broker_url} + ... inclusive + + ${response}= Provision Entity And Registration For IOP Test + ... ${second_entity_id} + ... ${IOP_REGISTRY_URL}[parking][no_location_and_totalspotnumber_2] + ... ${registration_id2} + ... ${IOP_REGISTRY_URL}[registration][inclusive_2] + ... ${second_broker_url} + ... ${first_broker_url} + ... inclusive + + ${response}= Provision Entity And Registration For IOP Test + ... ${third_entity_id} + ... ${IOP_REGISTRY_URL}[parking][full_2] + ... ${registration_id3} + ... ${IOP_REGISTRY_URL}[registration][exclusive_2] + ... ${third_broker_url} + ... ${first_broker_url} + ... exclusive + +Delete Three Broker IOP Scenario + [Arguments] ${first_entity_id} + ... ${second_entity_id} + ... ${third_entity_id} + ... ${first_broker_url} + ... ${second_broker_url} + ... ${third_broker_url} + + Delete Context Source Registration ${registration_id1} broker_url=${first_broker_url} + Delete Context Source Registration ${registration_id2} broker_url=${first_broker_url} + Delete Context Source Registration ${registration_id3} broker_url=${first_broker_url} + Delete Entity ${first_entity_id} broker_url=${second_broker_url} + Delete Entity ${second_entity_id} broker_url=${second_broker_url} + Delete Entity ${third_entity_id} broker_url=${third_broker_url} \ No newline at end of file -- GitLab From 93baa13febcd605817ad30ec10e3194d3f50d5f0 Mon Sep 17 00:00:00 2001 From: Benedetta Arena Date: Thu, 25 Jun 2026 12:56:24 +0200 Subject: [PATCH 3/8] refactor: centralize setup and teardown logic for first retrieve configurations --- .../Entity/QueryEntities/IOP_CNF_01_01.robot | 12 +-- .../Entity/QueryEntities/IOP_CNF_01_02.robot | 14 +-- .../Entity/RetrieveEntity/IOP_CNF_01_01.robot | 58 ++++-------- .../Entity/RetrieveEntity/IOP_CNF_01_02.robot | 54 ++++------- resources/IOPUtils/IOPRegistry.py | 3 +- .../IOPUtils/InteroperabilityUtils.resource | 89 ++++++++++++++++++- 6 files changed, 131 insertions(+), 99 deletions(-) diff --git a/IOP_TP/NGSI-LD/Interoperability/Consumption/Entity/QueryEntities/IOP_CNF_01_01.robot b/IOP_TP/NGSI-LD/Interoperability/Consumption/Entity/QueryEntities/IOP_CNF_01_01.robot index 43ed86c4..86a2f868 100644 --- a/IOP_TP/NGSI-LD/Interoperability/Consumption/Entity/QueryEntities/IOP_CNF_01_01.robot +++ b/IOP_TP/NGSI-LD/Interoperability/Consumption/Entity/QueryEntities/IOP_CNF_01_01.robot @@ -50,7 +50,7 @@ Setup Initial Context Source Registrations ${second_entity_id}= Generate Random Parking Entity Id Set Suite Variable ${second_entity_id} - ${response}= Initialize Three Broker IOP Scenario + ${response}= Initialize Three Broker IOP Scenario For Query ... ${entity_id} ... ${second_entity_id} ... ${entity_id} @@ -59,10 +59,10 @@ Setup Initial Context Source Registrations ... ${broker_C_url} Delete Entities And Delete Registrations - ${response}= Delete Three Broker IOP Scenario - ... ${entity_id} - ... ${second_entity_id} - ... ${entity_id} + ${response}= Delete Three Broker IOP Scenario For Query ... ${broker_A_url} ... ${broker_B_url} - ... ${broker_C_url} \ No newline at end of file + ... ${broker_C_url} + ... ${entity_id} + ... ${second_entity_id} + ... ${entity_id} \ No newline at end of file diff --git a/IOP_TP/NGSI-LD/Interoperability/Consumption/Entity/QueryEntities/IOP_CNF_01_02.robot b/IOP_TP/NGSI-LD/Interoperability/Consumption/Entity/QueryEntities/IOP_CNF_01_02.robot index 155a49d0..339813c9 100644 --- a/IOP_TP/NGSI-LD/Interoperability/Consumption/Entity/QueryEntities/IOP_CNF_01_02.robot +++ b/IOP_TP/NGSI-LD/Interoperability/Consumption/Entity/QueryEntities/IOP_CNF_01_02.robot @@ -1,7 +1,7 @@ *** Settings *** Documentation Three brokers are set up A, B and C. A has two registrations, one inclusive for the entities created in B and one exclusive for the entity created in C. -Resource ${EXECDIR}/resources/InteroperabilityUtils.resource +Resource ${EXECDIR}/resources/IOPUtils/InteroperabilityUtils.resource Test Setup Setup Initial Context Source Registrations Test Teardown Delete Entities and Delete Registrations @@ -50,7 +50,7 @@ Setup Initial Context Source Registrations ${second_entity_id}= Generate Random Parking Entity Id Set Suite Variable ${second_entity_id} - ${response}= Initialize Three Broker IOP Scenario + ${response}= Initialize Three Broker IOP Scenario For Query ... ${entity_id} ... ${second_entity_id} ... ${entity_id} @@ -59,10 +59,10 @@ Setup Initial Context Source Registrations ... ${broker_C_url} Delete Entities And Delete Registrations - ${response}= Delete Three Broker IOP Scenario - ... ${entity_id} - ... ${second_entity_id} - ... ${entity_id} + ${response}= Delete Three Broker IOP Scenario For Query ... ${broker_A_url} ... ${broker_B_url} - ... ${broker_C_url} \ No newline at end of file + ... ${broker_C_url} + ... ${entity_id} + ... ${second_entity_id} + ... ${entity_id} \ No newline at end of file diff --git a/IOP_TP/NGSI-LD/Interoperability/Consumption/Entity/RetrieveEntity/IOP_CNF_01_01.robot b/IOP_TP/NGSI-LD/Interoperability/Consumption/Entity/RetrieveEntity/IOP_CNF_01_01.robot index 495e1b59..eb0f73ac 100644 --- a/IOP_TP/NGSI-LD/Interoperability/Consumption/Entity/RetrieveEntity/IOP_CNF_01_01.robot +++ b/IOP_TP/NGSI-LD/Interoperability/Consumption/Entity/RetrieveEntity/IOP_CNF_01_01.robot @@ -1,21 +1,12 @@ *** Settings *** Documentation Three brokers are set up A, B and C. A has two registrations, one inclusive for the entities created in B and one exclusive for the entity created in C. -Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource -Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource -Resource ${EXECDIR}/resources/ApiUtils/ContextSourceDiscovery.resource -Resource ${EXECDIR}/resources/ApiUtils/ContextSourceRegistration.resource -Resource ${EXECDIR}/resources/AssertionUtils.resource -Resource ${EXECDIR}/resources/JsonUtils.resource +Resource ${EXECDIR}/resources/IOPUtils/InteroperabilityUtils.resource Test Setup Setup Initial Context Source Registrations Test Teardown Delete Entities and Delete Registrations *** Variables *** -${first_entity_payload_filename} interoperability/offstreet-parking1-full.jsonld -${second_entity_payload_filename} interoperability/offstreet-parking2-full.jsonld -${inclusive_registration_payload_file_path} csourceRegistrations/interoperability/context-source-registration-inclusive-2.jsonld -${exclusive_registration_payload_file_path} csourceRegistrations/interoperability/context-source-registration-exclusive-2.jsonld ${broker_A_url} ${broker_B_url} ${broker_C_url} @@ -46,41 +37,22 @@ Setup Initial Context Source Registrations ${entity_id1}= Generate Random Parking Entity Id Set Suite Variable ${entity_id1} - ${response}= Create Entity ${first_entity_payload_filename} ${entity_id1} broker_url=${broker_B_url} - Check Response Status Code 201 ${response.status_code} - ${entity_id2}= Generate Random Parking Entity Id Set Suite Variable ${entity_id2} - ${response}= Create Entity ${second_entity_payload_filename} ${entity_id2} broker_url=${broker_B_url} - Check Response Status Code 201 ${response.status_code} - ${response}= Create Entity ${second_entity_payload_filename} ${entity_id2} broker_url=${broker_C_url} - Check Response Status Code 201 ${response.status_code} - ${registration_id1}= Generate Random CSR Id - Set Suite Variable ${registration_id1} - ${registration_payload}= Prepare Context Source Registration From File - ... ${registration_id1} - ... ${inclusive_registration_payload_file_path} - ... entity_id=${entity_id1} - ... broker_url=${broker_B_url} - ... mode=inclusive - ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${broker_A_url} - Check Response Status Code 201 ${response.status_code} - - ${registration_id2}= Generate Random CSR Id - Set Suite Variable ${registration_id2} - ${registration_payload}= Prepare Context Source Registration From File - ... ${registration_id2} - ... ${exclusive_registration_payload_file_path} - ... entity_id=${entity_id2} - ... broker_url=${broker_C_url} - ... mode=exclusive - ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${broker_A_url} - Check Response Status Code 201 ${response.status_code} + ${response}= Initialize Three Broker IOP Scenario For First Retrieve + ... ${entity_id1} + ... ${entity_id2} + ... ${entity_id2} + ... ${broker_A_url} + ... ${broker_B_url} + ... ${broker_C_url} Delete Entities And Delete Registrations - Delete Context Source Registration ${registration_id1} broker_url=${broker_A_url} - Delete Context Source Registration ${registration_id2} broker_url=${broker_A_url} - Delete Entity ${entity_id1} broker_url=${broker_B_url} - Delete Entity ${entity_id2} broker_url=${broker_B_url} - Delete Entity ${entity_id2} broker_url=${broker_C_url} \ No newline at end of file + ${response}= Delete Three Broker IOP Scenario For Retrieve + ... first_broker_url=${broker_A_url} + ... second_broker_url=${broker_B_url} + ... third_broker_url=${broker_C_url} + ... first_entity_id=${entity_id1} + ... second_entity_id=${entity_id2} + ... third_entity_id=${entity_id2} \ No newline at end of file diff --git a/IOP_TP/NGSI-LD/Interoperability/Consumption/Entity/RetrieveEntity/IOP_CNF_01_02.robot b/IOP_TP/NGSI-LD/Interoperability/Consumption/Entity/RetrieveEntity/IOP_CNF_01_02.robot index f2e7fd67..1a3168b5 100644 --- a/IOP_TP/NGSI-LD/Interoperability/Consumption/Entity/RetrieveEntity/IOP_CNF_01_02.robot +++ b/IOP_TP/NGSI-LD/Interoperability/Consumption/Entity/RetrieveEntity/IOP_CNF_01_02.robot @@ -1,20 +1,12 @@ *** Settings *** Documentation Three brokers are set up A, B and C. A has two registrations, one inclusive for the the entity created in B and one exclusive for the entity created in C. -Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource -Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource -Resource ${EXECDIR}/resources/ApiUtils/ContextSourceDiscovery.resource -Resource ${EXECDIR}/resources/ApiUtils/ContextSourceRegistration.resource -Resource ${EXECDIR}/resources/AssertionUtils.resource -Resource ${EXECDIR}/resources/JsonUtils.resource + +Resource ${EXECDIR}/resources/IOPUtils/InteroperabilityUtils.resource Test Setup Setup Initial Context Source Registrations Test Teardown Delete Entities and Delete Registrations *** Variables *** -${entity_payload_filename} interoperability/offstreet-parking2-no-location.jsonld -${full_entity_payload_filename} interoperability/offstreet-parking2-full.jsonld -${inclusive_registration_payload_file_path} csourceRegistrations/interoperability/context-source-registration-inclusive-2.jsonld -${exclusive_registration_payload_file_path} csourceRegistrations/interoperability/context-source-registration-exclusive-2.jsonld ${broker_A_url} ${broker_B_url} ${broker_C_url} @@ -47,35 +39,19 @@ Setup Initial Context Source Registrations ${entity_id}= Generate Random Parking Entity Id Set Suite Variable ${entity_id} - ${response}= Create Entity ${entity_payload_filename} ${entity_id} broker_url=${broker_B_url} - Check Response Status Code 201 ${response.status_code} - ${response}= Create Entity ${full_entity_payload_filename} ${entity_id} broker_url=${broker_C_url} - Check Response Status Code 201 ${response.status_code} - - ${registration_id1}= Generate Random CSR Id - Set Suite Variable ${registration_id1} - ${registration_payload}= Prepare Context Source Registration From File - ... ${registration_id1} - ... ${inclusive_registration_payload_file_path} - ... entity_id=${entity_id} - ... broker_url=${broker_B_url} - ... mode=inclusive - ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${broker_A_url} - Check Response Status Code 201 ${response.status_code} - ${registration_id2}= Generate Random CSR Id - Set Suite Variable ${registration_id2} - ${registration_payload}= Prepare Context Source Registration From File - ... ${registration_id2} - ... ${exclusive_registration_payload_file_path} - ... entity_id=${entity_id} - ... broker_url=${broker_C_url} - ... mode=exclusive - ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${broker_A_url} - Check Response Status Code 201 ${response.status_code} + ${response}= Initialize Three Broker IOP Scenario For Second Retrieve + ... ${entity_id} + ... ${entity_id} + ... ${broker_A_url} + ... ${broker_B_url} + ... ${broker_C_url} Delete Entities And Delete Registrations - Delete Context Source Registration ${registration_id1} broker_url=${broker_A_url} - Delete Context Source Registration ${registration_id2} broker_url=${broker_A_url} - Delete Entity ${entity_id} broker_url=${broker_B_url} - Delete Entity ${entity_id} broker_url=${broker_C_url} \ No newline at end of file + + ${response}= Delete Three Broker IOP Scenario For Retrieve + ... ${broker_A_url} + ... ${broker_B_url} + ... ${broker_C_url} + ... ${entity_id} + ... ${entity_id} \ No newline at end of file diff --git a/resources/IOPUtils/IOPRegistry.py b/resources/IOPUtils/IOPRegistry.py index a8f98fcb..4ce0f85a 100644 --- a/resources/IOPUtils/IOPRegistry.py +++ b/resources/IOPUtils/IOPRegistry.py @@ -4,7 +4,8 @@ IOP_REGISTRY_URL = { "parking": { "full_1": "interoperability/offstreet-parking1-full.jsonld", "full_2": "interoperability/offstreet-parking2-full.jsonld", - "no_location_and_totalspotnumber_2": "interoperability/offstreet-parking2-no-location-and-totalspotsnumber.jsonld" + "no_location_and_totalspotnumber_2": "interoperability/offstreet-parking2-no-location-and-totalspotsnumber.jsonld", + "no_location_2": "interoperability/offstreet-parking2-no-location.jsonld" }, "registration": { "inclusive_1": "csourceRegistrations/interoperability/context-source-registration-inclusive-1.jsonld", diff --git a/resources/IOPUtils/InteroperabilityUtils.resource b/resources/IOPUtils/InteroperabilityUtils.resource index f0a8336c..ec7f01bf 100644 --- a/resources/IOPUtils/InteroperabilityUtils.resource +++ b/resources/IOPUtils/InteroperabilityUtils.resource @@ -34,7 +34,7 @@ Provision Entity And Registration For IOP Test ${response}= Create Context Source Registration With Return ${registration_payload} content_type=${CONTENT_TYPE_LD_JSON} broker_url=${target_broker_url} Check Response Status Code 201 ${response.status_code} -Initialize Three Broker IOP Scenario +Initialize Three Broker IOP Scenario For Query [Arguments] ${first_entity_id} ... ${second_entity_id} ... ${third_entity_id} @@ -76,7 +76,7 @@ Initialize Three Broker IOP Scenario ... ${first_broker_url} ... exclusive -Delete Three Broker IOP Scenario +Initialize Three Broker IOP Scenario For First Retrieve [Arguments] ${first_entity_id} ... ${second_entity_id} ... ${third_entity_id} @@ -84,9 +84,92 @@ Delete Three Broker IOP Scenario ... ${second_broker_url} ... ${third_broker_url} + ${registration_id1}= Generate Random CSR Id + Set Suite Variable ${registration_id1} + ${registration_id2}= Generate Random CSR Id + Set Suite Variable ${registration_id2} + + ${response}= Create Entity + ... ${IOP_REGISTRY_URL}[parking][full_2] + ... ${second_entity_id} + ... broker_url=${second_broker_url} + Check Response Status Code 201 ${response.status_code} + + ${response}= Provision Entity And Registration For IOP Test + ... ${first_entity_id} + ... ${IOP_REGISTRY_URL}[parking][full_1] + ... ${registration_id1} + ... ${IOP_REGISTRY_URL}[registration][inclusive_2] + ... ${second_broker_url} + ... ${first_broker_url} + ... inclusive + + ${response}= Provision Entity And Registration For IOP Test + ... ${third_entity_id} + ... ${IOP_REGISTRY_URL}[parking][full_2] + ... ${registration_id2} + ... ${IOP_REGISTRY_URL}[registration][exclusive_2] + ... ${third_broker_url} + ... ${first_broker_url} + ... exclusive + +Initialize Three Broker IOP Scenario For Second Retrieve + [Arguments] ${first_entity_id} + ... ${second_entity_id} + ... ${first_broker_url} + ... ${second_broker_url} + ... ${third_broker_url} + + ${registration_id1}= Generate Random CSR Id + Set Suite Variable ${registration_id1} + ${registration_id2}= Generate Random CSR Id + Set Suite Variable ${registration_id2} + + ${response}= Provision Entity And Registration For IOP Test + ... ${first_entity_id} + ... ${IOP_REGISTRY_URL}[parking][no_location_2] + ... ${registration_id1} + ... ${IOP_REGISTRY_URL}[registration][inclusive_2] + ... ${second_broker_url} + ... ${first_broker_url} + ... inclusive + + ${response}= Provision Entity And Registration For IOP Test + ... ${second_entity_id} + ... ${IOP_REGISTRY_URL}[parking][full_2] + ... ${registration_id2} + ... ${IOP_REGISTRY_URL}[registration][exclusive_2] + ... ${third_broker_url} + ... ${first_broker_url} + ... exclusive + +Delete Three Broker IOP Scenario For Query + [Arguments] ${first_broker_url} + ... ${second_broker_url} + ... ${third_broker_url} + ... ${first_entity_id} + ... ${second_entity_id} + ... ${third_entity_id} + Delete Context Source Registration ${registration_id1} broker_url=${first_broker_url} Delete Context Source Registration ${registration_id2} broker_url=${first_broker_url} Delete Context Source Registration ${registration_id3} broker_url=${first_broker_url} Delete Entity ${first_entity_id} broker_url=${second_broker_url} Delete Entity ${second_entity_id} broker_url=${second_broker_url} - Delete Entity ${third_entity_id} broker_url=${third_broker_url} \ No newline at end of file + Delete Entity ${third_entity_id} broker_url=${third_broker_url} + +Delete Three Broker IOP Scenario For Retrieve + [Arguments] ${first_broker_url} + ... ${second_broker_url} + ... ${third_broker_url} + ... ${first_entity_id} + ... ${second_entity_id} + ... ${third_entity_id}=${EMPTY} + + Delete Context Source Registration ${registration_id1} broker_url=${first_broker_url} + Delete Context Source Registration ${registration_id2} broker_url=${first_broker_url} + Delete Entity ${first_entity_id} broker_url=${second_broker_url} + Delete Entity ${second_entity_id} broker_url=${third_broker_url} + IF '${third_entity_id}' != '' + Delete Entity ${third_entity_id} broker_url=${second_broker_url} + END \ No newline at end of file -- GitLab From b50beccdf5ebfecacfcae1415b52f98cc8f35a8f Mon Sep 17 00:00:00 2001 From: Benedetta Arena Date: Thu, 25 Jun 2026 14:40:36 +0200 Subject: [PATCH 4/8] refactoring: centralize setup and teardown for first create configuration --- .../Entity/QueryEntities/IOP_CNF_01_01.robot | 4 +- .../Entity/QueryEntities/IOP_CNF_01_02.robot | 4 +- .../Entity/RetrieveEntity/IOP_CNF_01_01.robot | 4 +- .../Entity/RetrieveEntity/IOP_CNF_01_02.robot | 4 +- .../CreateEntity/IOP_CNF_01_01.robot | 47 +++++-------------- .../CreateEntity/IOP_CNF_01_02.robot | 47 +++++-------------- .../IOPUtils/InteroperabilityUtils.resource | 38 ++++++++++++++- 7 files changed, 68 insertions(+), 80 deletions(-) diff --git a/IOP_TP/NGSI-LD/Interoperability/Consumption/Entity/QueryEntities/IOP_CNF_01_01.robot b/IOP_TP/NGSI-LD/Interoperability/Consumption/Entity/QueryEntities/IOP_CNF_01_01.robot index 86a2f868..bd288594 100644 --- a/IOP_TP/NGSI-LD/Interoperability/Consumption/Entity/QueryEntities/IOP_CNF_01_01.robot +++ b/IOP_TP/NGSI-LD/Interoperability/Consumption/Entity/QueryEntities/IOP_CNF_01_01.robot @@ -50,7 +50,7 @@ Setup Initial Context Source Registrations ${second_entity_id}= Generate Random Parking Entity Id Set Suite Variable ${second_entity_id} - ${response}= Initialize Three Broker IOP Scenario For Query + Initialize Three Broker IOP Scenario For Query ... ${entity_id} ... ${second_entity_id} ... ${entity_id} @@ -59,7 +59,7 @@ Setup Initial Context Source Registrations ... ${broker_C_url} Delete Entities And Delete Registrations - ${response}= Delete Three Broker IOP Scenario For Query + Delete Three Broker IOP Scenario For Query ... ${broker_A_url} ... ${broker_B_url} ... ${broker_C_url} diff --git a/IOP_TP/NGSI-LD/Interoperability/Consumption/Entity/QueryEntities/IOP_CNF_01_02.robot b/IOP_TP/NGSI-LD/Interoperability/Consumption/Entity/QueryEntities/IOP_CNF_01_02.robot index 339813c9..d0fa65ab 100644 --- a/IOP_TP/NGSI-LD/Interoperability/Consumption/Entity/QueryEntities/IOP_CNF_01_02.robot +++ b/IOP_TP/NGSI-LD/Interoperability/Consumption/Entity/QueryEntities/IOP_CNF_01_02.robot @@ -50,7 +50,7 @@ Setup Initial Context Source Registrations ${second_entity_id}= Generate Random Parking Entity Id Set Suite Variable ${second_entity_id} - ${response}= Initialize Three Broker IOP Scenario For Query + Initialize Three Broker IOP Scenario For Query ... ${entity_id} ... ${second_entity_id} ... ${entity_id} @@ -59,7 +59,7 @@ Setup Initial Context Source Registrations ... ${broker_C_url} Delete Entities And Delete Registrations - ${response}= Delete Three Broker IOP Scenario For Query + Delete Three Broker IOP Scenario For Query ... ${broker_A_url} ... ${broker_B_url} ... ${broker_C_url} diff --git a/IOP_TP/NGSI-LD/Interoperability/Consumption/Entity/RetrieveEntity/IOP_CNF_01_01.robot b/IOP_TP/NGSI-LD/Interoperability/Consumption/Entity/RetrieveEntity/IOP_CNF_01_01.robot index eb0f73ac..7ae11ffa 100644 --- a/IOP_TP/NGSI-LD/Interoperability/Consumption/Entity/RetrieveEntity/IOP_CNF_01_01.robot +++ b/IOP_TP/NGSI-LD/Interoperability/Consumption/Entity/RetrieveEntity/IOP_CNF_01_01.robot @@ -40,7 +40,7 @@ Setup Initial Context Source Registrations ${entity_id2}= Generate Random Parking Entity Id Set Suite Variable ${entity_id2} - ${response}= Initialize Three Broker IOP Scenario For First Retrieve + Initialize Three Broker IOP Scenario For First Retrieve ... ${entity_id1} ... ${entity_id2} ... ${entity_id2} @@ -49,7 +49,7 @@ Setup Initial Context Source Registrations ... ${broker_C_url} Delete Entities And Delete Registrations - ${response}= Delete Three Broker IOP Scenario For Retrieve + Delete Three Broker IOP Scenario For Retrieve ... first_broker_url=${broker_A_url} ... second_broker_url=${broker_B_url} ... third_broker_url=${broker_C_url} diff --git a/IOP_TP/NGSI-LD/Interoperability/Consumption/Entity/RetrieveEntity/IOP_CNF_01_02.robot b/IOP_TP/NGSI-LD/Interoperability/Consumption/Entity/RetrieveEntity/IOP_CNF_01_02.robot index 1a3168b5..6fd1891a 100644 --- a/IOP_TP/NGSI-LD/Interoperability/Consumption/Entity/RetrieveEntity/IOP_CNF_01_02.robot +++ b/IOP_TP/NGSI-LD/Interoperability/Consumption/Entity/RetrieveEntity/IOP_CNF_01_02.robot @@ -40,7 +40,7 @@ Setup Initial Context Source Registrations ${entity_id}= Generate Random Parking Entity Id Set Suite Variable ${entity_id} - ${response}= Initialize Three Broker IOP Scenario For Second Retrieve + Initialize Three Broker IOP Scenario For Second Retrieve ... ${entity_id} ... ${entity_id} ... ${broker_A_url} @@ -49,7 +49,7 @@ Setup Initial Context Source Registrations Delete Entities And Delete Registrations - ${response}= Delete Three Broker IOP Scenario For Retrieve + Delete Three Broker IOP Scenario For Retrieve ... ${broker_A_url} ... ${broker_B_url} ... ${broker_C_url} diff --git a/IOP_TP/NGSI-LD/Interoperability/Provision/CreateEntity/IOP_CNF_01_01.robot b/IOP_TP/NGSI-LD/Interoperability/Provision/CreateEntity/IOP_CNF_01_01.robot index c7a28da2..bc0c6e16 100644 --- a/IOP_TP/NGSI-LD/Interoperability/Provision/CreateEntity/IOP_CNF_01_01.robot +++ b/IOP_TP/NGSI-LD/Interoperability/Provision/CreateEntity/IOP_CNF_01_01.robot @@ -1,20 +1,13 @@ *** Settings *** Documentation Three brokers are set up A, B and C. A has two registrations, one inclusive for the entities created in B and one exclusive for the entity created in C. -Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource -Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource -Resource ${EXECDIR}/resources/ApiUtils/ContextSourceDiscovery.resource -Resource ${EXECDIR}/resources/ApiUtils/ContextSourceRegistration.resource -Resource ${EXECDIR}/resources/AssertionUtils.resource -Resource ${EXECDIR}/resources/JsonUtils.resource +Resource ${EXECDIR}/resources/IOPUtils/InteroperabilityUtils.resource +Variables ${EXECDIR}/resources/IOPUtils/IOPRegistry.py Test Setup Setup Initial Context Source Registrations Test Teardown Delete Entities and Delete Registrations *** Variables *** -${entity_payload_filename} interoperability/offstreet-parking1-full.jsonld -${inclusive_registration_payload_file_path} csourceRegistrations/interoperability/context-source-registration-inclusive-2.jsonld -${exclusive_registration_payload_file_path} csourceRegistrations/interoperability/context-source-registration-exclusive-2.jsonld ${broker_A_url} ${broker_B_url} ${broker_C_url} @@ -25,8 +18,8 @@ IOP_CNF_01_01 Create OffStreetParking:1 [Tags] since_v1.6.1 iop 4_3_3 cf_06 additive-inclusive proxy-exclusive 4_3_6 5_6_1 #Create OffStreetParking:1 in A and check for a successful response - ${expected_payload}= Load Entity ${entity_payload_filename} ${entity_id} - ${response}= Create Entity ${entity_payload_filename} ${entity_id} broker_url=${broker_A_url} + ${expected_payload}= Load Entity ${IOP_REGISTRY_URL}[parking][full_1] ${entity_id} + ${response}= Create Entity ${IOP_REGISTRY_URL}[parking][full_1] ${entity_id} broker_url=${broker_A_url} Check Response Status Code 201 ${response.status_code} #Agent checks, with local=true, that the entity is created in A @@ -53,29 +46,13 @@ Setup Initial Context Source Registrations ${entity_id}= Generate Random Parking Entity Id Set Suite Variable ${entity_id} - ${registration_id1}= Generate Random CSR Id - Set Suite Variable ${registration_id1} - ${registration_payload}= Prepare Context Source Registration From File - ... ${registration_id1} - ... ${inclusive_registration_payload_file_path} - ... entity_id=${entity_id} - ... broker_url=${broker_B_url} - ... mode=inclusive - ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${broker_A_url} - Check Response Status Code 201 ${response.status_code} - - ${registration_id2}= Generate Random CSR Id - Set Suite Variable ${registration_id2} - ${registration_payload}= Prepare Context Source Registration From File - ... ${registration_id2} - ... ${exclusive_registration_payload_file_path} - ... entity_id=${entity_id} - ... broker_url=${broker_C_url} - ... mode=exclusive - ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${broker_A_url} - Check Response Status Code 201 ${response.status_code} + Initialize Three Broker IOP Scenario For Create + ... ${entity_id} + ... ${broker_A_url} + ... ${broker_B_url} + ... ${broker_C_url} Delete Entities And Delete Registrations - Delete Context Source Registration ${registration_id1} broker_url=${broker_A_url} - Delete Context Source Registration ${registration_id2} broker_url=${broker_A_url} - Delete Entity ${entity_id} broker_url=${broker_A_url} \ No newline at end of file + Delete Three Broker IOP Scenario For Create + ... ${broker_A_url} + ... ${entity_id} \ No newline at end of file diff --git a/IOP_TP/NGSI-LD/Interoperability/Provision/CreateEntity/IOP_CNF_01_02.robot b/IOP_TP/NGSI-LD/Interoperability/Provision/CreateEntity/IOP_CNF_01_02.robot index 51463d1a..e0624aa9 100644 --- a/IOP_TP/NGSI-LD/Interoperability/Provision/CreateEntity/IOP_CNF_01_02.robot +++ b/IOP_TP/NGSI-LD/Interoperability/Provision/CreateEntity/IOP_CNF_01_02.robot @@ -1,22 +1,13 @@ *** Settings *** Documentation Three brokers are set up A, B and C. A has two registrations, one inclusive for the entities created in B and one exclusive for the entity created in C. -Resource ${EXECDIR}/resources/ApiUtils/Common.resource -Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource -Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource -Resource ${EXECDIR}/resources/ApiUtils/ContextSourceDiscovery.resource -Resource ${EXECDIR}/resources/ApiUtils/ContextSourceRegistration.resource -Resource ${EXECDIR}/resources/AssertionUtils.resource -Resource ${EXECDIR}/resources/JsonUtils.resource -Resource ${EXECDIR}/resources/MockServerUtils.resource +Resource ${EXECDIR}/resources/IOPUtils/InteroperabilityUtils.resource +Variables ${EXECDIR}/resources/IOPUtils/IOPRegistry.py Test Setup Setup Initial Context Source Registrations Test Teardown Delete Entities and Delete Registrations *** Variables *** -${entity_payload_filename} interoperability/offstreet-parking2-full.jsonld -${inclusive_registration_payload_file_path} csourceRegistrations/interoperability/context-source-registration-inclusive-2.jsonld -${exclusive_registration_payload_file_path} csourceRegistrations/interoperability/context-source-registration-exclusive-2.jsonld ${broker_A_url} ${broker_B_url} ${broker_C_url} @@ -27,7 +18,7 @@ IOP_CNF_01_02 Create OffStreetParking:2 [Tags] since_v1.6.1 iop 4_3_3 cf_06 additive-inclusive proxy-exclusive 4_3_6 5_6_1 #Create the full entity of OffStreetParking:2 in A and check for a successful response - ${response}= Create Entity ${entity_payload_filename} ${entity_id} broker_url=${broker_A_url} + ${response}= Create Entity ${IOP_REGISTRY_URL}[parking][full_2] ${entity_id} broker_url=${broker_A_url} Check Response Status Code 201 ${response.status_code} #Agent checks, with local=true, that the entity is created in A and does not contain the location property @@ -55,29 +46,13 @@ Setup Initial Context Source Registrations ${entity_id}= Generate Random Parking Entity Id Set Suite Variable ${entity_id} - ${registration_id1}= Generate Random CSR Id - Set Suite Variable ${registration_id1} - ${registration_payload}= Prepare Context Source Registration From File - ... ${registration_id1} - ... ${inclusive_registration_payload_file_path} - ... entity_id=${entity_id} - ... broker_url=${broker_B_url} - ... mode=inclusive - ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${broker_A_url} - Check Response Status Code 201 ${response.status_code} - - ${registration_id2}= Generate Random CSR Id - Set Suite Variable ${registration_id2} - ${registration_payload}= Prepare Context Source Registration From File - ... ${registration_id2} - ... ${exclusive_registration_payload_file_path} - ... entity_id=${entity_id} - ... broker_url=${broker_C_url} - ... mode=exclusive - ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${broker_A_url} - Check Response Status Code 201 ${response.status_code} + Initialize Three Broker IOP Scenario For Create + ... ${entity_id} + ... ${broker_A_url} + ... ${broker_B_url} + ... ${broker_C_url} Delete Entities And Delete Registrations - Delete Context Source Registration ${registration_id1} broker_url=${broker_A_url} - Delete Context Source Registration ${registration_id2} broker_url=${broker_A_url} - Delete Entity ${entity_id} broker_url=${broker_A_url} + Delete Three Broker IOP Scenario For Create + ... ${broker_A_url} + ... ${entity_id} diff --git a/resources/IOPUtils/InteroperabilityUtils.resource b/resources/IOPUtils/InteroperabilityUtils.resource index ec7f01bf..bea4842b 100644 --- a/resources/IOPUtils/InteroperabilityUtils.resource +++ b/resources/IOPUtils/InteroperabilityUtils.resource @@ -143,6 +143,34 @@ Initialize Three Broker IOP Scenario For Second Retrieve ... ${first_broker_url} ... exclusive +Initialize Three Broker IOP Scenario For Create + [Arguments] ${entity_id} + ... ${first_broker_url} + ... ${second_broker_url} + ... ${third_broker_url} + + ${registration_id1}= Generate Random CSR Id + Set Suite Variable ${registration_id1} + ${registration_id2}= Generate Random CSR Id + Set Suite Variable ${registration_id2} + + ${registration_payload}= Prepare Context Source Registration From File + ... ${registration_id1} + ... ${IOP_REGISTRY_URL}[registration][inclusive_2] + ... entity_id=${entity_id} + ... mode=inclusive + ... broker_url=${second_broker_url} + ${response}= Create Context Source Registration With Return ${registration_payload} content_type=${CONTENT_TYPE_LD_JSON} broker_url=${first_broker_url} + + ${registration_payload}= Prepare Context Source Registration From File + ... ${registration_id2} + ... ${IOP_REGISTRY_URL}[registration][exclusive_2] + ... entity_id=${entity_id} + ... mode=exclusive + ... broker_url=${third_broker_url} + ${response}= Create Context Source Registration With Return ${registration_payload} content_type=${CONTENT_TYPE_LD_JSON} broker_url=${first_broker_url} + Check Response Status Code 201 ${response.status_code} + Delete Three Broker IOP Scenario For Query [Arguments] ${first_broker_url} ... ${second_broker_url} @@ -172,4 +200,12 @@ Delete Three Broker IOP Scenario For Retrieve Delete Entity ${second_entity_id} broker_url=${third_broker_url} IF '${third_entity_id}' != '' Delete Entity ${third_entity_id} broker_url=${second_broker_url} - END \ No newline at end of file + END + +Delete Three Broker IOP Scenario For Create + [Arguments] ${broker_url} + ... ${entity_id} + + Delete Context Source Registration ${registration_id1} broker_url=${broker_url} + Delete Context Source Registration ${registration_id2} broker_url=${broker_url} + Delete Entity ${entity_id} broker_url=${broker_url} \ No newline at end of file -- GitLab From 35eb5941bc0b10c33af6f272e20bac7fbee3b561 Mon Sep 17 00:00:00 2001 From: Benedetta Arena Date: Thu, 25 Jun 2026 17:44:28 +0200 Subject: [PATCH 5/8] refactor: unify delete functions for the first tests --- .../Entity/QueryEntities/IOP_CNF_01_01.robot | 6 +-- .../Entity/QueryEntities/IOP_CNF_01_02.robot | 6 +-- .../Entity/RetrieveEntity/IOP_CNF_01_01.robot | 14 +++--- .../Entity/RetrieveEntity/IOP_CNF_01_02.robot | 7 ++- .../CreateEntity/IOP_CNF_01_01.robot | 2 +- .../CreateEntity/IOP_CNF_01_02.robot | 2 +- .../IOPUtils/InteroperabilityUtils.resource | 49 +++++++------------ 7 files changed, 35 insertions(+), 51 deletions(-) diff --git a/IOP_TP/NGSI-LD/Interoperability/Consumption/Entity/QueryEntities/IOP_CNF_01_01.robot b/IOP_TP/NGSI-LD/Interoperability/Consumption/Entity/QueryEntities/IOP_CNF_01_01.robot index bd288594..9d349bc5 100644 --- a/IOP_TP/NGSI-LD/Interoperability/Consumption/Entity/QueryEntities/IOP_CNF_01_01.robot +++ b/IOP_TP/NGSI-LD/Interoperability/Consumption/Entity/QueryEntities/IOP_CNF_01_01.robot @@ -59,10 +59,10 @@ Setup Initial Context Source Registrations ... ${broker_C_url} Delete Entities And Delete Registrations - Delete Three Broker IOP Scenario For Query + Delete Three Broker IOP Scenario ... ${broker_A_url} - ... ${broker_B_url} - ... ${broker_C_url} ... ${entity_id} + ... ${broker_B_url} ... ${second_entity_id} + ... ${broker_C_url} ... ${entity_id} \ No newline at end of file diff --git a/IOP_TP/NGSI-LD/Interoperability/Consumption/Entity/QueryEntities/IOP_CNF_01_02.robot b/IOP_TP/NGSI-LD/Interoperability/Consumption/Entity/QueryEntities/IOP_CNF_01_02.robot index d0fa65ab..34880fae 100644 --- a/IOP_TP/NGSI-LD/Interoperability/Consumption/Entity/QueryEntities/IOP_CNF_01_02.robot +++ b/IOP_TP/NGSI-LD/Interoperability/Consumption/Entity/QueryEntities/IOP_CNF_01_02.robot @@ -59,10 +59,10 @@ Setup Initial Context Source Registrations ... ${broker_C_url} Delete Entities And Delete Registrations - Delete Three Broker IOP Scenario For Query + Delete Three Broker IOP Scenario ... ${broker_A_url} - ... ${broker_B_url} - ... ${broker_C_url} ... ${entity_id} + ... ${broker_B_url} ... ${second_entity_id} + ... ${broker_C_url} ... ${entity_id} \ No newline at end of file diff --git a/IOP_TP/NGSI-LD/Interoperability/Consumption/Entity/RetrieveEntity/IOP_CNF_01_01.robot b/IOP_TP/NGSI-LD/Interoperability/Consumption/Entity/RetrieveEntity/IOP_CNF_01_01.robot index 7ae11ffa..dbfdc8c8 100644 --- a/IOP_TP/NGSI-LD/Interoperability/Consumption/Entity/RetrieveEntity/IOP_CNF_01_01.robot +++ b/IOP_TP/NGSI-LD/Interoperability/Consumption/Entity/RetrieveEntity/IOP_CNF_01_01.robot @@ -49,10 +49,10 @@ Setup Initial Context Source Registrations ... ${broker_C_url} Delete Entities And Delete Registrations - Delete Three Broker IOP Scenario For Retrieve - ... first_broker_url=${broker_A_url} - ... second_broker_url=${broker_B_url} - ... third_broker_url=${broker_C_url} - ... first_entity_id=${entity_id1} - ... second_entity_id=${entity_id2} - ... third_entity_id=${entity_id2} \ No newline at end of file + Delete Three Broker IOP Scenario + ... ${broker_A_url} + ... ${entity_id1} + ... ${broker_B_url} + ... ${entity_id2} + ... ${broker_C_url} + ... ${entity_id2} \ No newline at end of file diff --git a/IOP_TP/NGSI-LD/Interoperability/Consumption/Entity/RetrieveEntity/IOP_CNF_01_02.robot b/IOP_TP/NGSI-LD/Interoperability/Consumption/Entity/RetrieveEntity/IOP_CNF_01_02.robot index 6fd1891a..eeeb024a 100644 --- a/IOP_TP/NGSI-LD/Interoperability/Consumption/Entity/RetrieveEntity/IOP_CNF_01_02.robot +++ b/IOP_TP/NGSI-LD/Interoperability/Consumption/Entity/RetrieveEntity/IOP_CNF_01_02.robot @@ -48,10 +48,9 @@ Setup Initial Context Source Registrations ... ${broker_C_url} Delete Entities And Delete Registrations - - Delete Three Broker IOP Scenario For Retrieve + Delete Three Broker IOP Scenario ... ${broker_A_url} + ... ${entity_id} ... ${broker_B_url} - ... ${broker_C_url} ... ${entity_id} - ... ${entity_id} \ No newline at end of file + ... ${broker_C_url} \ No newline at end of file diff --git a/IOP_TP/NGSI-LD/Interoperability/Provision/CreateEntity/IOP_CNF_01_01.robot b/IOP_TP/NGSI-LD/Interoperability/Provision/CreateEntity/IOP_CNF_01_01.robot index bc0c6e16..755ba4be 100644 --- a/IOP_TP/NGSI-LD/Interoperability/Provision/CreateEntity/IOP_CNF_01_01.robot +++ b/IOP_TP/NGSI-LD/Interoperability/Provision/CreateEntity/IOP_CNF_01_01.robot @@ -53,6 +53,6 @@ Setup Initial Context Source Registrations ... ${broker_C_url} Delete Entities And Delete Registrations - Delete Three Broker IOP Scenario For Create + Delete Three Broker IOP Scenario ... ${broker_A_url} ... ${entity_id} \ No newline at end of file diff --git a/IOP_TP/NGSI-LD/Interoperability/Provision/CreateEntity/IOP_CNF_01_02.robot b/IOP_TP/NGSI-LD/Interoperability/Provision/CreateEntity/IOP_CNF_01_02.robot index e0624aa9..29de7e4e 100644 --- a/IOP_TP/NGSI-LD/Interoperability/Provision/CreateEntity/IOP_CNF_01_02.robot +++ b/IOP_TP/NGSI-LD/Interoperability/Provision/CreateEntity/IOP_CNF_01_02.robot @@ -53,6 +53,6 @@ Setup Initial Context Source Registrations ... ${broker_C_url} Delete Entities And Delete Registrations - Delete Three Broker IOP Scenario For Create + Delete Three Broker IOP Scenario ... ${broker_A_url} ... ${entity_id} diff --git a/resources/IOPUtils/InteroperabilityUtils.resource b/resources/IOPUtils/InteroperabilityUtils.resource index bea4842b..b8a786cf 100644 --- a/resources/IOPUtils/InteroperabilityUtils.resource +++ b/resources/IOPUtils/InteroperabilityUtils.resource @@ -171,41 +171,26 @@ Initialize Three Broker IOP Scenario For Create ${response}= Create Context Source Registration With Return ${registration_payload} content_type=${CONTENT_TYPE_LD_JSON} broker_url=${first_broker_url} Check Response Status Code 201 ${response.status_code} -Delete Three Broker IOP Scenario For Query +Delete Three Broker IOP Scenario [Arguments] ${first_broker_url} - ... ${second_broker_url} - ... ${third_broker_url} ... ${first_entity_id} - ... ${second_entity_id} - ... ${third_entity_id} - - Delete Context Source Registration ${registration_id1} broker_url=${first_broker_url} - Delete Context Source Registration ${registration_id2} broker_url=${first_broker_url} - Delete Context Source Registration ${registration_id3} broker_url=${first_broker_url} - Delete Entity ${first_entity_id} broker_url=${second_broker_url} - Delete Entity ${second_entity_id} broker_url=${second_broker_url} - Delete Entity ${third_entity_id} broker_url=${third_broker_url} - -Delete Three Broker IOP Scenario For Retrieve - [Arguments] ${first_broker_url} - ... ${second_broker_url} - ... ${third_broker_url} - ... ${first_entity_id} - ... ${second_entity_id} + ... ${second_broker_url}=${EMPTY} + ... ${second_entity_id}=${EMPTY} + ... ${third_broker_url}=${EMPTY} ... ${third_entity_id}=${EMPTY} Delete Context Source Registration ${registration_id1} broker_url=${first_broker_url} Delete Context Source Registration ${registration_id2} broker_url=${first_broker_url} - Delete Entity ${first_entity_id} broker_url=${second_broker_url} - Delete Entity ${second_entity_id} broker_url=${third_broker_url} - IF '${third_entity_id}' != '' - Delete Entity ${third_entity_id} broker_url=${second_broker_url} - END - -Delete Three Broker IOP Scenario For Create - [Arguments] ${broker_url} - ... ${entity_id} - - Delete Context Source Registration ${registration_id1} broker_url=${broker_url} - Delete Context Source Registration ${registration_id2} broker_url=${broker_url} - Delete Entity ${entity_id} broker_url=${broker_url} \ No newline at end of file + ${reg_3}= Get Variable Value ${registration_id3} ${EMPTY} + IF '${second_broker_url}' != '' + Delete Entity ${first_entity_id} broker_url=${second_broker_url} + Delete Entity ${second_entity_id} broker_url=${second_broker_url} + IF '${third_entity_id}' != '' + Delete Entity ${third_entity_id} broker_url=${second_broker_url} + END + IF '${reg_3}' != '' + Delete Context Source Registration ${registration_id3} broker_url=${first_broker_url} + END + ELSE + Delete Entity ${first_entity_id} broker_url=${first_broker_url} + END \ No newline at end of file -- GitLab From db43d320ea22e49467881586766585535483104a Mon Sep 17 00:00:00 2001 From: Benedetta Arena Date: Thu, 25 Jun 2026 17:57:46 +0200 Subject: [PATCH 6/8] refactory: unify the function for three broker scenario for retrieve --- .../Entity/RetrieveEntity/IOP_CNF_01_01.robot | 10 ++++- .../Entity/RetrieveEntity/IOP_CNF_01_02.robot | 2 +- .../IOPUtils/InteroperabilityUtils.resource | 39 +------------------ 3 files changed, 10 insertions(+), 41 deletions(-) diff --git a/IOP_TP/NGSI-LD/Interoperability/Consumption/Entity/RetrieveEntity/IOP_CNF_01_01.robot b/IOP_TP/NGSI-LD/Interoperability/Consumption/Entity/RetrieveEntity/IOP_CNF_01_01.robot index dbfdc8c8..0a11a1df 100644 --- a/IOP_TP/NGSI-LD/Interoperability/Consumption/Entity/RetrieveEntity/IOP_CNF_01_01.robot +++ b/IOP_TP/NGSI-LD/Interoperability/Consumption/Entity/RetrieveEntity/IOP_CNF_01_01.robot @@ -2,6 +2,7 @@ Documentation Three brokers are set up A, B and C. A has two registrations, one inclusive for the entities created in B and one exclusive for the entity created in C. Resource ${EXECDIR}/resources/IOPUtils/InteroperabilityUtils.resource +Variables ${EXECDIR}/resources/IOPUtils/IOPRegistry.py Test Setup Setup Initial Context Source Registrations Test Teardown Delete Entities and Delete Registrations @@ -40,9 +41,14 @@ Setup Initial Context Source Registrations ${entity_id2}= Generate Random Parking Entity Id Set Suite Variable ${entity_id2} - Initialize Three Broker IOP Scenario For First Retrieve - ... ${entity_id1} + ${response}= Create Entity + ... ${IOP_REGISTRY_URL}[parking][full_2] ... ${entity_id2} + ... broker_url=${broker_B_url} + Check Response Status Code 201 ${response.status_code} + + Initialize Three Broker IOP Scenario For Retrieve + ... ${entity_id1} ... ${entity_id2} ... ${broker_A_url} ... ${broker_B_url} diff --git a/IOP_TP/NGSI-LD/Interoperability/Consumption/Entity/RetrieveEntity/IOP_CNF_01_02.robot b/IOP_TP/NGSI-LD/Interoperability/Consumption/Entity/RetrieveEntity/IOP_CNF_01_02.robot index eeeb024a..8e609e42 100644 --- a/IOP_TP/NGSI-LD/Interoperability/Consumption/Entity/RetrieveEntity/IOP_CNF_01_02.robot +++ b/IOP_TP/NGSI-LD/Interoperability/Consumption/Entity/RetrieveEntity/IOP_CNF_01_02.robot @@ -40,7 +40,7 @@ Setup Initial Context Source Registrations ${entity_id}= Generate Random Parking Entity Id Set Suite Variable ${entity_id} - Initialize Three Broker IOP Scenario For Second Retrieve + Initialize Three Broker IOP Scenario For Retrieve ... ${entity_id} ... ${entity_id} ... ${broker_A_url} diff --git a/resources/IOPUtils/InteroperabilityUtils.resource b/resources/IOPUtils/InteroperabilityUtils.resource index b8a786cf..eeccf8ad 100644 --- a/resources/IOPUtils/InteroperabilityUtils.resource +++ b/resources/IOPUtils/InteroperabilityUtils.resource @@ -76,44 +76,7 @@ Initialize Three Broker IOP Scenario For Query ... ${first_broker_url} ... exclusive -Initialize Three Broker IOP Scenario For First Retrieve - [Arguments] ${first_entity_id} - ... ${second_entity_id} - ... ${third_entity_id} - ... ${first_broker_url} - ... ${second_broker_url} - ... ${third_broker_url} - - ${registration_id1}= Generate Random CSR Id - Set Suite Variable ${registration_id1} - ${registration_id2}= Generate Random CSR Id - Set Suite Variable ${registration_id2} - - ${response}= Create Entity - ... ${IOP_REGISTRY_URL}[parking][full_2] - ... ${second_entity_id} - ... broker_url=${second_broker_url} - Check Response Status Code 201 ${response.status_code} - - ${response}= Provision Entity And Registration For IOP Test - ... ${first_entity_id} - ... ${IOP_REGISTRY_URL}[parking][full_1] - ... ${registration_id1} - ... ${IOP_REGISTRY_URL}[registration][inclusive_2] - ... ${second_broker_url} - ... ${first_broker_url} - ... inclusive - - ${response}= Provision Entity And Registration For IOP Test - ... ${third_entity_id} - ... ${IOP_REGISTRY_URL}[parking][full_2] - ... ${registration_id2} - ... ${IOP_REGISTRY_URL}[registration][exclusive_2] - ... ${third_broker_url} - ... ${first_broker_url} - ... exclusive - -Initialize Three Broker IOP Scenario For Second Retrieve +Initialize Three Broker IOP Scenario For Retrieve [Arguments] ${first_entity_id} ... ${second_entity_id} ... ${first_broker_url} -- GitLab From b53cf3c998c2a42b27a8179511ca8949a5464668 Mon Sep 17 00:00:00 2001 From: Benedetta Arena Date: Tue, 30 Jun 2026 17:41:35 +0200 Subject: [PATCH 7/8] refactor: centralize all operations for first IOP setup --- .../Entity/QueryEntities/IOP_CNF_01_01.robot | 43 ++++- .../Entity/QueryEntities/IOP_CNF_01_02.robot | 43 ++++- .../Entity/RetrieveEntity/IOP_CNF_01_01.robot | 28 ++- .../Entity/RetrieveEntity/IOP_CNF_01_02.robot | 28 ++- .../CreateEntity/IOP_CNF_01_01.robot | 15 +- .../CreateEntity/IOP_CNF_01_02.robot | 15 +- .../IOPUtils/InteroperabilityUtils.resource | 180 ++++-------------- 7 files changed, 174 insertions(+), 178 deletions(-) diff --git a/IOP_TP/NGSI-LD/Interoperability/Consumption/Entity/QueryEntities/IOP_CNF_01_01.robot b/IOP_TP/NGSI-LD/Interoperability/Consumption/Entity/QueryEntities/IOP_CNF_01_01.robot index 9d349bc5..51cb4594 100644 --- a/IOP_TP/NGSI-LD/Interoperability/Consumption/Entity/QueryEntities/IOP_CNF_01_01.robot +++ b/IOP_TP/NGSI-LD/Interoperability/Consumption/Entity/QueryEntities/IOP_CNF_01_01.robot @@ -50,19 +50,48 @@ Setup Initial Context Source Registrations ${second_entity_id}= Generate Random Parking Entity Id Set Suite Variable ${second_entity_id} - Initialize Three Broker IOP Scenario For Query + ${response}= Create Entity + ... ${IOP_REGISTRY_URL}[parking][full_1] ... ${entity_id} + ... broker_url=${broker_B_url} + Check Response Status Code 201 ${response.status_code} + + ${response}= Create Entity + ... ${IOP_REGISTRY_URL}[parking][no_location_and_totalspotnumber_2] ... ${second_entity_id} + ... broker_url=${broker_B_url} + Check Response Status Code 201 ${response.status_code} + + ${response}= Create Entity + ... ${IOP_REGISTRY_URL}[parking][full_2] ... ${entity_id} - ... ${broker_A_url} - ... ${broker_B_url} - ... ${broker_C_url} + ... broker_url=${broker_C_url} + Check Response Status Code 201 ${response.status_code} -Delete Entities And Delete Registrations - Delete Three Broker IOP Scenario + ${registration_id}= Generate Random CSR Id + Set Suite Variable ${registration_id} + ${registration_payload}= Prepare Context Source Registration From File + ... ${registration_id} + ... ${IOP_REGISTRY_URL}[registration][inclusive_2] + ... entity_id=${second_entity_id} + ... mode=inclusive + ... broker_url=${broker_B_url} + ${response}= Create Context Source Registration With Return ${registration_payload} content_type=${CONTENT_TYPE_LD_JSON} broker_url=${broker_A_url} + Check Response Status Code 201 ${response.status_code} + + Initialize IOP CNF 01 ... ${broker_A_url} ... ${entity_id} + ... inclusive ... ${broker_B_url} ... ${second_entity_id} + ... exclusive ... ${broker_C_url} - ... ${entity_id} \ No newline at end of file + +Delete Entities And Delete Registrations + + @{entities_to_delete}= Create List ${entity_id} ${second_entity_id} + @{broker_count}= Create List ${broker_A_url} ${broker_B_url} ${broker_C_url} + Delete Registrations And Entities + ... ${entities_to_delete} + ... ${broker_count} \ No newline at end of file diff --git a/IOP_TP/NGSI-LD/Interoperability/Consumption/Entity/QueryEntities/IOP_CNF_01_02.robot b/IOP_TP/NGSI-LD/Interoperability/Consumption/Entity/QueryEntities/IOP_CNF_01_02.robot index 34880fae..b1a8481a 100644 --- a/IOP_TP/NGSI-LD/Interoperability/Consumption/Entity/QueryEntities/IOP_CNF_01_02.robot +++ b/IOP_TP/NGSI-LD/Interoperability/Consumption/Entity/QueryEntities/IOP_CNF_01_02.robot @@ -2,6 +2,7 @@ Documentation Three brokers are set up A, B and C. A has two registrations, one inclusive for the entities created in B and one exclusive for the entity created in C. Resource ${EXECDIR}/resources/IOPUtils/InteroperabilityUtils.resource +Variables ${EXECDIR}/resources/IOPUtils/IOPRegistry.py Test Setup Setup Initial Context Source Registrations Test Teardown Delete Entities and Delete Registrations @@ -50,19 +51,47 @@ Setup Initial Context Source Registrations ${second_entity_id}= Generate Random Parking Entity Id Set Suite Variable ${second_entity_id} - Initialize Three Broker IOP Scenario For Query + ${response}= Create Entity + ... ${IOP_REGISTRY_URL}[parking][full_1] ... ${entity_id} + ... broker_url=${broker_B_url} + Check Response Status Code 201 ${response.status_code} + + ${response}= Create Entity + ... ${IOP_REGISTRY_URL}[parking][no_location_and_totalspotnumber_2] ... ${second_entity_id} + ... broker_url=${broker_B_url} + Check Response Status Code 201 ${response.status_code} + + ${response}= Create Entity + ... ${IOP_REGISTRY_URL}[parking][full_2] ... ${entity_id} - ... ${broker_A_url} - ... ${broker_B_url} - ... ${broker_C_url} + ... broker_url=${broker_C_url} + Check Response Status Code 201 ${response.status_code} -Delete Entities And Delete Registrations - Delete Three Broker IOP Scenario + ${registration_id}= Generate Random CSR Id + Set Suite Variable ${registration_id} + ${registration_payload}= Prepare Context Source Registration From File + ... ${registration_id} + ... ${IOP_REGISTRY_URL}[registration][inclusive_2] + ... entity_id=${second_entity_id} + ... mode=inclusive + ... broker_url=${broker_B_url} + ${response}= Create Context Source Registration With Return ${registration_payload} content_type=${CONTENT_TYPE_LD_JSON} broker_url=${broker_A_url} + Check Response Status Code 201 ${response.status_code} + + Initialize IOP CNF 01 ... ${broker_A_url} ... ${entity_id} + ... inclusive ... ${broker_B_url} ... ${second_entity_id} + ... exclusive ... ${broker_C_url} - ... ${entity_id} \ No newline at end of file + +Delete Entities And Delete Registrations + @{entities_to_delete}= Create List ${entity_id} ${second_entity_id} + @{broker_count}= Create List ${broker_A_url} ${broker_B_url} ${broker_C_url} + Delete Registrations And Entities + ... ${entities_to_delete} + ... ${broker_count} \ No newline at end of file diff --git a/IOP_TP/NGSI-LD/Interoperability/Consumption/Entity/RetrieveEntity/IOP_CNF_01_01.robot b/IOP_TP/NGSI-LD/Interoperability/Consumption/Entity/RetrieveEntity/IOP_CNF_01_01.robot index 0a11a1df..b643fe1b 100644 --- a/IOP_TP/NGSI-LD/Interoperability/Consumption/Entity/RetrieveEntity/IOP_CNF_01_01.robot +++ b/IOP_TP/NGSI-LD/Interoperability/Consumption/Entity/RetrieveEntity/IOP_CNF_01_01.robot @@ -41,24 +41,36 @@ Setup Initial Context Source Registrations ${entity_id2}= Generate Random Parking Entity Id Set Suite Variable ${entity_id2} + ${response}= Create Entity + ... ${IOP_REGISTRY_URL}[parking][full_1] + ... ${entity_id1} + ... broker_url=${broker_B_url} + Check Response Status Code 201 ${response.status_code} + ${response}= Create Entity ... ${IOP_REGISTRY_URL}[parking][full_2] ... ${entity_id2} ... broker_url=${broker_B_url} Check Response Status Code 201 ${response.status_code} - Initialize Three Broker IOP Scenario For Retrieve - ... ${entity_id1} + ${response}= Create Entity + ... ${IOP_REGISTRY_URL}[parking][full_2] ... ${entity_id2} - ... ${broker_A_url} - ... ${broker_B_url} - ... ${broker_C_url} + ... broker_url=${broker_C_url} + Check Response Status Code 201 ${response.status_code} -Delete Entities And Delete Registrations - Delete Three Broker IOP Scenario + Initialize IOP CNF 01 ... ${broker_A_url} ... ${entity_id1} + ... inclusive ... ${broker_B_url} ... ${entity_id2} + ... exclusive ... ${broker_C_url} - ... ${entity_id2} \ No newline at end of file + +Delete Entities And Delete Registrations + @{entities_to_delete}= Create List ${entity_id1} ${entity_id2} + @{broker_count}= Create List ${broker_A_url} ${broker_B_url} ${broker_C_url} + Delete Registrations And Entities + ... ${entities_to_delete} + ... ${broker_count} \ No newline at end of file diff --git a/IOP_TP/NGSI-LD/Interoperability/Consumption/Entity/RetrieveEntity/IOP_CNF_01_02.robot b/IOP_TP/NGSI-LD/Interoperability/Consumption/Entity/RetrieveEntity/IOP_CNF_01_02.robot index 8e609e42..0ab7b8c1 100644 --- a/IOP_TP/NGSI-LD/Interoperability/Consumption/Entity/RetrieveEntity/IOP_CNF_01_02.robot +++ b/IOP_TP/NGSI-LD/Interoperability/Consumption/Entity/RetrieveEntity/IOP_CNF_01_02.robot @@ -2,6 +2,7 @@ Documentation Three brokers are set up A, B and C. A has two registrations, one inclusive for the the entity created in B and one exclusive for the entity created in C. Resource ${EXECDIR}/resources/IOPUtils/InteroperabilityUtils.resource +Variables ${EXECDIR}/resources/IOPUtils/IOPRegistry.py Test Setup Setup Initial Context Source Registrations Test Teardown Delete Entities and Delete Registrations @@ -40,17 +41,30 @@ Setup Initial Context Source Registrations ${entity_id}= Generate Random Parking Entity Id Set Suite Variable ${entity_id} - Initialize Three Broker IOP Scenario For Retrieve + ${response}= Create Entity + ... ${IOP_REGISTRY_URL}[parking][no_location_2] ... ${entity_id} + ... broker_url=${broker_B_url} + Check Response Status Code 201 ${response.status_code} + + ${response}= Create Entity + ... ${IOP_REGISTRY_URL}[parking][full_2] ... ${entity_id} - ... ${broker_A_url} - ... ${broker_B_url} - ... ${broker_C_url} + ... broker_url=${broker_C_url} + Check Response Status Code 201 ${response.status_code} -Delete Entities And Delete Registrations - Delete Three Broker IOP Scenario + Initialize IOP CNF 01 ... ${broker_A_url} ... ${entity_id} + ... inclusive ... ${broker_B_url} ... ${entity_id} - ... ${broker_C_url} \ No newline at end of file + ... exclusive + ... ${broker_C_url} + +Delete Entities And Delete Registrations + @{entities_to_delete}= Create List ${entity_id} + @{broker_count}= Create List ${broker_A_url} ${broker_B_url} ${broker_C_url} + Delete Registrations And Entities + ... ${entities_to_delete} + ... ${broker_count} \ No newline at end of file diff --git a/IOP_TP/NGSI-LD/Interoperability/Provision/CreateEntity/IOP_CNF_01_01.robot b/IOP_TP/NGSI-LD/Interoperability/Provision/CreateEntity/IOP_CNF_01_01.robot index 755ba4be..9680eddf 100644 --- a/IOP_TP/NGSI-LD/Interoperability/Provision/CreateEntity/IOP_CNF_01_01.robot +++ b/IOP_TP/NGSI-LD/Interoperability/Provision/CreateEntity/IOP_CNF_01_01.robot @@ -46,13 +46,18 @@ Setup Initial Context Source Registrations ${entity_id}= Generate Random Parking Entity Id Set Suite Variable ${entity_id} - Initialize Three Broker IOP Scenario For Create - ... ${entity_id} + Initialize IOP CNF 01 ... ${broker_A_url} + ... ${entity_id} + ... inclusive ... ${broker_B_url} + ... ${entity_id} + ... exclusive ... ${broker_C_url} Delete Entities And Delete Registrations - Delete Three Broker IOP Scenario - ... ${broker_A_url} - ... ${entity_id} \ No newline at end of file + @{entities_to_delete}= Create List ${entity_id} + @{broker_count}= Create List ${broker_A_url} ${broker_B_url} ${broker_C_url} + Delete Registrations And Entities + ... ${entities_to_delete} + ... ${broker_count} \ No newline at end of file diff --git a/IOP_TP/NGSI-LD/Interoperability/Provision/CreateEntity/IOP_CNF_01_02.robot b/IOP_TP/NGSI-LD/Interoperability/Provision/CreateEntity/IOP_CNF_01_02.robot index 29de7e4e..bcd7c999 100644 --- a/IOP_TP/NGSI-LD/Interoperability/Provision/CreateEntity/IOP_CNF_01_02.robot +++ b/IOP_TP/NGSI-LD/Interoperability/Provision/CreateEntity/IOP_CNF_01_02.robot @@ -46,13 +46,18 @@ Setup Initial Context Source Registrations ${entity_id}= Generate Random Parking Entity Id Set Suite Variable ${entity_id} - Initialize Three Broker IOP Scenario For Create - ... ${entity_id} + Initialize IOP CNF 01 ... ${broker_A_url} + ... ${entity_id} + ... inclusive ... ${broker_B_url} + ... ${entity_id} + ... exclusive ... ${broker_C_url} Delete Entities And Delete Registrations - Delete Three Broker IOP Scenario - ... ${broker_A_url} - ... ${entity_id} + @{entities_to_delete}= Create List ${entity_id} + @{brokers_to_delete}= Create List ${broker_A_url} ${broker_B_url} ${broker_C_url} + Delete Registrations And Entities + ... ${entities_to_delete} + ... ${brokers_to_delete} diff --git a/resources/IOPUtils/InteroperabilityUtils.resource b/resources/IOPUtils/InteroperabilityUtils.resource index eeccf8ad..c2543ed5 100644 --- a/resources/IOPUtils/InteroperabilityUtils.resource +++ b/resources/IOPUtils/InteroperabilityUtils.resource @@ -10,150 +10,52 @@ Resource ${EXECDIR}/resources/JsonUtils.resource Variables ${EXECDIR}/resources/IOPUtils/IOPRegistry.py *** Keywords *** -Provision Entity And Registration For IOP Test - [Arguments] ${entity_id} - ... ${entity_payload} - ... ${registration_id} - ... ${registration_payload_file} - ... ${broker_url} - ... ${target_broker_url} - ... ${mode} - - ${response}= Create Entity - ... ${entity_payload} - ... ${entity_id} - ... broker_url=${broker_url} - Check Response Status Code 201 ${response.status_code} - - ${registration_payload}= Prepare Context Source Registration From File - ... ${registration_id} - ... ${registration_payload_file} - ... entity_id=${entity_id} - ... mode=${mode} - ... broker_url=${broker_url} - ${response}= Create Context Source Registration With Return ${registration_payload} content_type=${CONTENT_TYPE_LD_JSON} broker_url=${target_broker_url} - Check Response Status Code 201 ${response.status_code} - -Initialize Three Broker IOP Scenario For Query - [Arguments] ${first_entity_id} - ... ${second_entity_id} - ... ${third_entity_id} - ... ${first_broker_url} +Setup Brokers And Registrations + [Arguments] ${brokers_url} + ... ${entities} + ... ${modes} + + ${len}= Get Length ${brokers_url} + FOR ${i} IN RANGE ${len}-1 + ${broker_url}= Get From List ${brokers_url} ${i} + ${entity_id}= Get From List ${entities} ${i} + ${mode}= Get From List ${modes} ${i} + ${registration_id${i+1}}= Generate Random CSR Id + Set Suite Variable ${registration_id${i+1}} + ${registration_payload}= Prepare Context Source Registration From File + ... ${registration_id${i+1}} + ... ${IOP_REGISTRY_URL}[registration][${mode}_2] + ... entity_id=${entity_id} + ... mode=${mode} + ... broker_url=${broker_url} + ${response}= Create Context Source Registration With Return ${registration_payload} content_type=${CONTENT_TYPE_LD_JSON} broker_url=${brokers_url}[0] + Check Response Status Code 201 ${response.status_code} + END + +Initialize IOP CNF 01 + [Arguments] ${first_broker_url} + ... ${first_entity_id} + ... ${first_reg_mode} ... ${second_broker_url} - ... ${third_broker_url} - - ${registration_id1}= Generate Random CSR Id - Set Suite Variable ${registration_id1} - ${registration_id2}= Generate Random CSR Id - Set Suite Variable ${registration_id2} - ${registration_id3}= Generate Random CSR Id - Set Suite Variable ${registration_id3} - - ${response}= Provision Entity And Registration For IOP Test - ... ${first_entity_id} - ... ${IOP_REGISTRY_URL}[parking][full_1] - ... ${registration_id1} - ... ${IOP_REGISTRY_URL}[registration][inclusive_2] - ... ${second_broker_url} - ... ${first_broker_url} - ... inclusive - - ${response}= Provision Entity And Registration For IOP Test - ... ${second_entity_id} - ... ${IOP_REGISTRY_URL}[parking][no_location_and_totalspotnumber_2] - ... ${registration_id2} - ... ${IOP_REGISTRY_URL}[registration][inclusive_2] - ... ${second_broker_url} - ... ${first_broker_url} - ... inclusive - - ${response}= Provision Entity And Registration For IOP Test - ... ${third_entity_id} - ... ${IOP_REGISTRY_URL}[parking][full_2] - ... ${registration_id3} - ... ${IOP_REGISTRY_URL}[registration][exclusive_2] - ... ${third_broker_url} - ... ${first_broker_url} - ... exclusive - -Initialize Three Broker IOP Scenario For Retrieve - [Arguments] ${first_entity_id} ... ${second_entity_id} - ... ${first_broker_url} - ... ${second_broker_url} + ... ${second_reg_mode} ... ${third_broker_url} - ${registration_id1}= Generate Random CSR Id - Set Suite Variable ${registration_id1} - ${registration_id2}= Generate Random CSR Id - Set Suite Variable ${registration_id2} - - ${response}= Provision Entity And Registration For IOP Test - ... ${first_entity_id} - ... ${IOP_REGISTRY_URL}[parking][no_location_2] - ... ${registration_id1} - ... ${IOP_REGISTRY_URL}[registration][inclusive_2] - ... ${second_broker_url} - ... ${first_broker_url} - ... inclusive + @{brokers_url}= Create List ${first_broker_url} ${second_broker_url} ${third_broker_url} + @{entities}= Create List ${first_entity_id} ${second_entity_id} + @{modes}= Create List ${first_reg_mode} ${second_reg_mode} - ${response}= Provision Entity And Registration For IOP Test - ... ${second_entity_id} - ... ${IOP_REGISTRY_URL}[parking][full_2] - ... ${registration_id2} - ... ${IOP_REGISTRY_URL}[registration][exclusive_2] - ... ${third_broker_url} - ... ${first_broker_url} - ... exclusive - -Initialize Three Broker IOP Scenario For Create - [Arguments] ${entity_id} - ... ${first_broker_url} - ... ${second_broker_url} - ... ${third_broker_url} + Setup Brokers And Registrations + ... ${brokers_url} + ... ${entities} + ... ${modes} - ${registration_id1}= Generate Random CSR Id - Set Suite Variable ${registration_id1} - ${registration_id2}= Generate Random CSR Id - Set Suite Variable ${registration_id2} - - ${registration_payload}= Prepare Context Source Registration From File - ... ${registration_id1} - ... ${IOP_REGISTRY_URL}[registration][inclusive_2] - ... entity_id=${entity_id} - ... mode=inclusive - ... broker_url=${second_broker_url} - ${response}= Create Context Source Registration With Return ${registration_payload} content_type=${CONTENT_TYPE_LD_JSON} broker_url=${first_broker_url} - - ${registration_payload}= Prepare Context Source Registration From File - ... ${registration_id2} - ... ${IOP_REGISTRY_URL}[registration][exclusive_2] - ... entity_id=${entity_id} - ... mode=exclusive - ... broker_url=${third_broker_url} - ${response}= Create Context Source Registration With Return ${registration_payload} content_type=${CONTENT_TYPE_LD_JSON} broker_url=${first_broker_url} - Check Response Status Code 201 ${response.status_code} - -Delete Three Broker IOP Scenario - [Arguments] ${first_broker_url} - ... ${first_entity_id} - ... ${second_broker_url}=${EMPTY} - ... ${second_entity_id}=${EMPTY} - ... ${third_broker_url}=${EMPTY} - ... ${third_entity_id}=${EMPTY} +Delete Registrations And Entities + [Arguments] ${brokers_url} + ... ${entities} - Delete Context Source Registration ${registration_id1} broker_url=${first_broker_url} - Delete Context Source Registration ${registration_id2} broker_url=${first_broker_url} - ${reg_3}= Get Variable Value ${registration_id3} ${EMPTY} - IF '${second_broker_url}' != '' - Delete Entity ${first_entity_id} broker_url=${second_broker_url} - Delete Entity ${second_entity_id} broker_url=${second_broker_url} - IF '${third_entity_id}' != '' - Delete Entity ${third_entity_id} broker_url=${second_broker_url} - END - IF '${reg_3}' != '' - Delete Context Source Registration ${registration_id3} broker_url=${first_broker_url} - END - ELSE - Delete Entity ${first_entity_id} broker_url=${first_broker_url} + ${len}= Get Length ${brokers_url} + FOR ${i} IN RANGE ${len}-1 + Delete Entity ${entities}[${i}] + Delete Context Source Registration ${registration_id${i+1}} END \ No newline at end of file -- GitLab From e0a51303c70b04ea70cc7e63eaf271916184487c Mon Sep 17 00:00:00 2001 From: Benedetta Arena Date: Thu, 2 Jul 2026 16:54:55 +0200 Subject: [PATCH 8/8] fix: improve centralization of tests --- .../Entity/QueryEntities/IOP_CNF_01_01.robot | 32 +++++++------ .../Entity/QueryEntities/IOP_CNF_01_02.robot | 33 ++++++++------ .../Entity/RetrieveEntity/IOP_CNF_01_01.robot | 14 ++++-- .../Entity/RetrieveEntity/IOP_CNF_01_02.robot | 14 ++++-- .../CreateEntity/IOP_CNF_01_01.robot | 16 +++++-- .../CreateEntity/IOP_CNF_01_02.robot | 14 ++++-- .../IOPUtils/InteroperabilityUtils.resource | 45 +++++++++---------- 7 files changed, 105 insertions(+), 63 deletions(-) diff --git a/IOP_TP/NGSI-LD/Interoperability/Consumption/Entity/QueryEntities/IOP_CNF_01_01.robot b/IOP_TP/NGSI-LD/Interoperability/Consumption/Entity/QueryEntities/IOP_CNF_01_01.robot index 51cb4594..dc289fae 100644 --- a/IOP_TP/NGSI-LD/Interoperability/Consumption/Entity/QueryEntities/IOP_CNF_01_01.robot +++ b/IOP_TP/NGSI-LD/Interoperability/Consumption/Entity/QueryEntities/IOP_CNF_01_01.robot @@ -68,25 +68,31 @@ Setup Initial Context Source Registrations ... broker_url=${broker_C_url} Check Response Status Code 201 ${response.status_code} - ${registration_id}= Generate Random CSR Id - Set Suite Variable ${registration_id} - ${registration_payload}= Prepare Context Source Registration From File - ... ${registration_id} - ... ${IOP_REGISTRY_URL}[registration][inclusive_2] - ... entity_id=${second_entity_id} - ... mode=inclusive - ... broker_url=${broker_B_url} - ${response}= Create Context Source Registration With Return ${registration_payload} content_type=${CONTENT_TYPE_LD_JSON} broker_url=${broker_A_url} - Check Response Status Code 201 ${response.status_code} - - Initialize IOP CNF 01 - ... ${broker_A_url} + @{first_set}= Create List ... ${entity_id} + ... ${IOP_REGISTRY_URL}[registration][inclusive_2] ... inclusive ... ${broker_B_url} + ... ${broker_A_url} + + @{second_set}= Create List ... ${second_entity_id} + ... ${IOP_REGISTRY_URL}[registration][inclusive_2] + ... inclusive + ... ${broker_B_url} + ... ${broker_A_url} + + @{third_set}= Create List + ... ${entity_id} + ... ${IOP_REGISTRY_URL}[registration][exclusive_2] ... exclusive ... ${broker_C_url} + ... ${broker_A_url} + + Initialize IOP CNF 01 + ... ${first_set} + ... ${second_set} + ... ${third_set} Delete Entities And Delete Registrations diff --git a/IOP_TP/NGSI-LD/Interoperability/Consumption/Entity/QueryEntities/IOP_CNF_01_02.robot b/IOP_TP/NGSI-LD/Interoperability/Consumption/Entity/QueryEntities/IOP_CNF_01_02.robot index b1a8481a..bca0ece3 100644 --- a/IOP_TP/NGSI-LD/Interoperability/Consumption/Entity/QueryEntities/IOP_CNF_01_02.robot +++ b/IOP_TP/NGSI-LD/Interoperability/Consumption/Entity/QueryEntities/IOP_CNF_01_02.robot @@ -2,7 +2,6 @@ Documentation Three brokers are set up A, B and C. A has two registrations, one inclusive for the entities created in B and one exclusive for the entity created in C. Resource ${EXECDIR}/resources/IOPUtils/InteroperabilityUtils.resource -Variables ${EXECDIR}/resources/IOPUtils/IOPRegistry.py Test Setup Setup Initial Context Source Registrations Test Teardown Delete Entities and Delete Registrations @@ -69,25 +68,31 @@ Setup Initial Context Source Registrations ... broker_url=${broker_C_url} Check Response Status Code 201 ${response.status_code} - ${registration_id}= Generate Random CSR Id - Set Suite Variable ${registration_id} - ${registration_payload}= Prepare Context Source Registration From File - ... ${registration_id} - ... ${IOP_REGISTRY_URL}[registration][inclusive_2] - ... entity_id=${second_entity_id} - ... mode=inclusive - ... broker_url=${broker_B_url} - ${response}= Create Context Source Registration With Return ${registration_payload} content_type=${CONTENT_TYPE_LD_JSON} broker_url=${broker_A_url} - Check Response Status Code 201 ${response.status_code} - - Initialize IOP CNF 01 - ... ${broker_A_url} + @{first_set}= Create List ... ${entity_id} + ... ${IOP_REGISTRY_URL}[registration][inclusive_2] ... inclusive ... ${broker_B_url} + ... ${broker_A_url} + + @{second_set}= Create List ... ${second_entity_id} + ... ${IOP_REGISTRY_URL}[registration][inclusive_2] + ... inclusive + ... ${broker_B_url} + ... ${broker_A_url} + + @{third_set}= Create List + ... ${entity_id} + ... ${IOP_REGISTRY_URL}[registration][exclusive_2] ... exclusive ... ${broker_C_url} + ... ${broker_A_url} + + Initialize IOP CNF 01 + ... ${first_set} + ... ${second_set} + ... ${third_set} Delete Entities And Delete Registrations @{entities_to_delete}= Create List ${entity_id} ${second_entity_id} diff --git a/IOP_TP/NGSI-LD/Interoperability/Consumption/Entity/RetrieveEntity/IOP_CNF_01_01.robot b/IOP_TP/NGSI-LD/Interoperability/Consumption/Entity/RetrieveEntity/IOP_CNF_01_01.robot index b643fe1b..ea5ea6f8 100644 --- a/IOP_TP/NGSI-LD/Interoperability/Consumption/Entity/RetrieveEntity/IOP_CNF_01_01.robot +++ b/IOP_TP/NGSI-LD/Interoperability/Consumption/Entity/RetrieveEntity/IOP_CNF_01_01.robot @@ -2,7 +2,6 @@ Documentation Three brokers are set up A, B and C. A has two registrations, one inclusive for the entities created in B and one exclusive for the entity created in C. Resource ${EXECDIR}/resources/IOPUtils/InteroperabilityUtils.resource -Variables ${EXECDIR}/resources/IOPUtils/IOPRegistry.py Test Setup Setup Initial Context Source Registrations Test Teardown Delete Entities and Delete Registrations @@ -59,14 +58,23 @@ Setup Initial Context Source Registrations ... broker_url=${broker_C_url} Check Response Status Code 201 ${response.status_code} - Initialize IOP CNF 01 - ... ${broker_A_url} + @{first_set}= Create List ... ${entity_id1} + ... ${IOP_REGISTRY_URL}[registration][inclusive_2] ... inclusive ... ${broker_B_url} + ... ${broker_A_url} + + @{second_set}= Create List ... ${entity_id2} + ... ${IOP_REGISTRY_URL}[registration][exclusive_2] ... exclusive ... ${broker_C_url} + ... ${broker_A_url} + + Initialize IOP CNF 01 + ... ${first_set} + ... ${second_set} Delete Entities And Delete Registrations @{entities_to_delete}= Create List ${entity_id1} ${entity_id2} diff --git a/IOP_TP/NGSI-LD/Interoperability/Consumption/Entity/RetrieveEntity/IOP_CNF_01_02.robot b/IOP_TP/NGSI-LD/Interoperability/Consumption/Entity/RetrieveEntity/IOP_CNF_01_02.robot index 0ab7b8c1..f538dc5a 100644 --- a/IOP_TP/NGSI-LD/Interoperability/Consumption/Entity/RetrieveEntity/IOP_CNF_01_02.robot +++ b/IOP_TP/NGSI-LD/Interoperability/Consumption/Entity/RetrieveEntity/IOP_CNF_01_02.robot @@ -2,7 +2,6 @@ Documentation Three brokers are set up A, B and C. A has two registrations, one inclusive for the the entity created in B and one exclusive for the entity created in C. Resource ${EXECDIR}/resources/IOPUtils/InteroperabilityUtils.resource -Variables ${EXECDIR}/resources/IOPUtils/IOPRegistry.py Test Setup Setup Initial Context Source Registrations Test Teardown Delete Entities and Delete Registrations @@ -53,14 +52,23 @@ Setup Initial Context Source Registrations ... broker_url=${broker_C_url} Check Response Status Code 201 ${response.status_code} - Initialize IOP CNF 01 - ... ${broker_A_url} + @{first_set}= Create List ... ${entity_id} + ... ${IOP_REGISTRY_URL}[registration][inclusive_2] ... inclusive ... ${broker_B_url} + ... ${broker_A_url} + + @{second_set}= Create List ... ${entity_id} + ... ${IOP_REGISTRY_URL}[registration][exclusive_2] ... exclusive ... ${broker_C_url} + ... ${broker_A_url} + + Initialize IOP CNF 01 + ... ${first_set} + ... ${second_set} Delete Entities And Delete Registrations @{entities_to_delete}= Create List ${entity_id} diff --git a/IOP_TP/NGSI-LD/Interoperability/Provision/CreateEntity/IOP_CNF_01_01.robot b/IOP_TP/NGSI-LD/Interoperability/Provision/CreateEntity/IOP_CNF_01_01.robot index 9680eddf..bd134815 100644 --- a/IOP_TP/NGSI-LD/Interoperability/Provision/CreateEntity/IOP_CNF_01_01.robot +++ b/IOP_TP/NGSI-LD/Interoperability/Provision/CreateEntity/IOP_CNF_01_01.robot @@ -2,7 +2,6 @@ Documentation Three brokers are set up A, B and C. A has two registrations, one inclusive for the entities created in B and one exclusive for the entity created in C. Resource ${EXECDIR}/resources/IOPUtils/InteroperabilityUtils.resource -Variables ${EXECDIR}/resources/IOPUtils/IOPRegistry.py Test Setup Setup Initial Context Source Registrations Test Teardown Delete Entities and Delete Registrations @@ -21,7 +20,7 @@ IOP_CNF_01_01 Create OffStreetParking:1 ${expected_payload}= Load Entity ${IOP_REGISTRY_URL}[parking][full_1] ${entity_id} ${response}= Create Entity ${IOP_REGISTRY_URL}[parking][full_1] ${entity_id} broker_url=${broker_A_url} Check Response Status Code 201 ${response.status_code} - + #Agent checks, with local=true, that the entity is created in A ${response}= Retrieve Entity ${entity_id} local=true broker_url=${broker_A_url} Check Response Status Code 200 ${response.status_code} @@ -46,14 +45,23 @@ Setup Initial Context Source Registrations ${entity_id}= Generate Random Parking Entity Id Set Suite Variable ${entity_id} - Initialize IOP CNF 01 - ... ${broker_A_url} + @{first_set}= Create List ... ${entity_id} + ... ${IOP_REGISTRY_URL}[registration][inclusive_2] ... inclusive ... ${broker_B_url} + ... ${broker_A_url} + + @{second_set}= Create List ... ${entity_id} + ... ${IOP_REGISTRY_URL}[registration][exclusive_2] ... exclusive ... ${broker_C_url} + ... ${broker_A_url} + + Initialize IOP CNF 01 + ... ${first_set} + ... ${second_set} Delete Entities And Delete Registrations @{entities_to_delete}= Create List ${entity_id} diff --git a/IOP_TP/NGSI-LD/Interoperability/Provision/CreateEntity/IOP_CNF_01_02.robot b/IOP_TP/NGSI-LD/Interoperability/Provision/CreateEntity/IOP_CNF_01_02.robot index bcd7c999..cf48e655 100644 --- a/IOP_TP/NGSI-LD/Interoperability/Provision/CreateEntity/IOP_CNF_01_02.robot +++ b/IOP_TP/NGSI-LD/Interoperability/Provision/CreateEntity/IOP_CNF_01_02.robot @@ -2,7 +2,6 @@ Documentation Three brokers are set up A, B and C. A has two registrations, one inclusive for the entities created in B and one exclusive for the entity created in C. Resource ${EXECDIR}/resources/IOPUtils/InteroperabilityUtils.resource -Variables ${EXECDIR}/resources/IOPUtils/IOPRegistry.py Test Setup Setup Initial Context Source Registrations Test Teardown Delete Entities and Delete Registrations @@ -46,14 +45,23 @@ Setup Initial Context Source Registrations ${entity_id}= Generate Random Parking Entity Id Set Suite Variable ${entity_id} - Initialize IOP CNF 01 - ... ${broker_A_url} + @{first_set}= Create List ... ${entity_id} + ... ${IOP_REGISTRY_URL}[registration][inclusive_2] ... inclusive ... ${broker_B_url} + ... ${broker_A_url} + + @{second_set}= Create List ... ${entity_id} + ... ${IOP_REGISTRY_URL}[registration][exclusive_2] ... exclusive ... ${broker_C_url} + ... ${broker_A_url} + + Initialize IOP CNF 01 + ... ${first_set} + ... ${second_set} Delete Entities And Delete Registrations @{entities_to_delete}= Create List ${entity_id} diff --git a/resources/IOPUtils/InteroperabilityUtils.resource b/resources/IOPUtils/InteroperabilityUtils.resource index c2543ed5..446e1096 100644 --- a/resources/IOPUtils/InteroperabilityUtils.resource +++ b/resources/IOPUtils/InteroperabilityUtils.resource @@ -11,44 +11,43 @@ Variables ${EXECDIR}/resources/IOPUtils/IOPRegistry.py *** Keywords *** Setup Brokers And Registrations - [Arguments] ${brokers_url} - ... ${entities} - ... ${modes} + [Arguments] ${sets} - ${len}= Get Length ${brokers_url} + ${len}= Get Length ${sets} FOR ${i} IN RANGE ${len}-1 - ${broker_url}= Get From List ${brokers_url} ${i} - ${entity_id}= Get From List ${entities} ${i} - ${mode}= Get From List ${modes} ${i} + ${entity_id}= Get From List ${sets}[${i}] 0 + ${registration_filename}= Get From List ${sets}[${i}] 1 + ${mode}= Get From List ${sets}[${i}] 2 + ${broker_url}= Get From List ${sets}[${i}] 3 + ${registration_broker_url}= Get From List ${sets}[${i}] 4 ${registration_id${i+1}}= Generate Random CSR Id Set Suite Variable ${registration_id${i+1}} ${registration_payload}= Prepare Context Source Registration From File ... ${registration_id${i+1}} - ... ${IOP_REGISTRY_URL}[registration][${mode}_2] + ... ${registration_filename} ... entity_id=${entity_id} ... mode=${mode} ... broker_url=${broker_url} - ${response}= Create Context Source Registration With Return ${registration_payload} content_type=${CONTENT_TYPE_LD_JSON} broker_url=${brokers_url}[0] + ${response}= Create Context Source Registration With Return + ... ${registration_payload} + ... content_type=${CONTENT_TYPE_LD_JSON} + ... broker_url=${registration_broker_url} Check Response Status Code 201 ${response.status_code} END Initialize IOP CNF 01 - [Arguments] ${first_broker_url} - ... ${first_entity_id} - ... ${first_reg_mode} - ... ${second_broker_url} - ... ${second_entity_id} - ... ${second_reg_mode} - ... ${third_broker_url} - - @{brokers_url}= Create List ${first_broker_url} ${second_broker_url} ${third_broker_url} - @{entities}= Create List ${first_entity_id} ${second_entity_id} - @{modes}= Create List ${first_reg_mode} ${second_reg_mode} + [Arguments] ${first_set} + ... ${second_set} + ... ${third_set}=${EMPTY} + + IF '$third_set' != '' + @{sets}= Create List ${first_set} ${second_set} ${third_set} + ELSE + @{sets}= Create List ${first_set} ${second_set} + END Setup Brokers And Registrations - ... ${brokers_url} - ... ${entities} - ... ${modes} + ... ${sets} Delete Registrations And Entities [Arguments] ${brokers_url} -- GitLab