From f73c6bb19e85316a78f93dab838a249941daf0a9 Mon Sep 17 00:00:00 2001 From: Benoit Orihuela Date: Tue, 18 Nov 2025 21:26:45 +0100 Subject: [PATCH] chore: remove usages of no longer existing Generate Random Entity Id keyword --- .../Consumption/Entity/QueryEntities/D011_01_aux.robot | 7 +++---- .../Consumption/Entity/QueryEntities/D011_03_inc.robot | 7 +++---- .../Consumption/Entity/QueryEntities/D011_04_inc.robot | 7 +++---- .../Consumption/Entity/RetrieveEntity/D010_01_aux.robot | 7 +++---- .../Consumption/Entity/RetrieveEntity/D010_03_inc.robot | 7 +++---- .../Provision/Entities/CreateEntity/D001_04_inc.robot | 7 +++---- .../Provision/Entities/DeleteEntity/D002_03_inc.robot | 6 ++---- 7 files changed, 20 insertions(+), 28 deletions(-) diff --git a/TP/NGSI-LD/DistributedOperations/Consumption/Entity/QueryEntities/D011_01_aux.robot b/TP/NGSI-LD/DistributedOperations/Consumption/Entity/QueryEntities/D011_01_aux.robot index 41e9203a..4aef3d59 100644 --- a/TP/NGSI-LD/DistributedOperations/Consumption/Entity/QueryEntities/D011_01_aux.robot +++ b/TP/NGSI-LD/DistributedOperations/Consumption/Entity/QueryEntities/D011_01_aux.robot @@ -1,6 +1,7 @@ *** Settings *** Documentation Verify that when an auxiliary registration exists on a Context Broker and an entity with the same ID exists both locally in the Context Broker and remotely in the Context Source with different attributes, a query request to the Context Broker is correctly forwarded to the Context Source, and the response includes the local entity enriched with additional, non-conflicting attributes from the Context Source +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextSourceRegistration.resource Resource ${EXECDIR}/resources/ApiUtils/ContextSourceDiscovery.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource @@ -14,10 +15,8 @@ Test Teardown Delete Created Entity And Registration And Stop Context Sour *** Variables *** -${entity_id_prefix} urn:ngsi-ld:Vehicle: ${entity_payload_filename} vehicle-simple-attributes.json ${entity_payload_filename2} vehicle-simple-attributes-second.jsonld -${registration_id_prefix} urn:ngsi-ld:Registration: ${registration_payload_file_path} csourceRegistrations/context-source-registration-vehicle-complete.jsonld ${fragment_filename} vehicle-brandname-fragment.json ${expected_attribute} brandName @@ -43,13 +42,13 @@ D011_01_aux Query Entities That Exists On Both The Context Source And The Contex *** Keywords *** Create Entity And Registration On The Context Broker And Start Context Source Mock Server - ${entity_id}= Generate Random Entity Id ${entity_id_prefix} + ${entity_id}= Generate Random Vehicle Entity Id Set Suite Variable ${entity_id} ${response}= Create Entity ${entity_payload_filename2} ${entity_id} Check Response Status Code 201 ${response.status_code} - ${registration_id}= Generate Random Entity Id ${registration_id_prefix} + ${registration_id}= Generate Random CSR Id Set Suite Variable ${registration_id} ${registration_payload}= Prepare Context Source Registration From File ... ${registration_id} diff --git a/TP/NGSI-LD/DistributedOperations/Consumption/Entity/QueryEntities/D011_03_inc.robot b/TP/NGSI-LD/DistributedOperations/Consumption/Entity/QueryEntities/D011_03_inc.robot index cd8c7415..9ade915d 100644 --- a/TP/NGSI-LD/DistributedOperations/Consumption/Entity/QueryEntities/D011_03_inc.robot +++ b/TP/NGSI-LD/DistributedOperations/Consumption/Entity/QueryEntities/D011_03_inc.robot @@ -1,6 +1,7 @@ *** Settings *** Documentation Verify that, when one has an inclusive registration on a Context Broker and an entity only on a Context Source, if one queries the Context Broker the request gets forwarded to the Context Source correctly using the appropriate operation +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextSourceRegistration.resource Resource ${EXECDIR}/resources/ApiUtils/ContextSourceDiscovery.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource @@ -14,9 +15,7 @@ Test Template Setup Registration, Context Source Mock Server And Query The *** Variables *** -${entity_id_prefix} urn:ngsi-ld:Vehicle: ${entity_payload_filename} vehicle-simple-attributes.json -${registration_id_prefix} urn:ngsi-ld:Registration: ${registration_payload_file_path} csourceRegistrations/context-source-registration-vehicle-complete.jsonld @@ -36,9 +35,9 @@ D011_03_02_inc Query The Context Broker By Id Using The queryBatch Operation *** Keywords *** Setup Registration, Context Source Mock Server And Query The Context Broker With Type [Arguments] ${operation} ${method} ${url} - ${entity_id}= Generate Random Entity Id ${entity_id_prefix} + ${entity_id}= Generate Random Vehicle Entity Id - ${registration_id}= Generate Random Entity Id ${registration_id_prefix} + ${registration_id}= Generate Random CSR Id Set Suite Variable ${registration_id} ${operations}= Create List ${operation} ${registration_payload}= Prepare Context Source Registration From File diff --git a/TP/NGSI-LD/DistributedOperations/Consumption/Entity/QueryEntities/D011_04_inc.robot b/TP/NGSI-LD/DistributedOperations/Consumption/Entity/QueryEntities/D011_04_inc.robot index 3a6cff7e..33febdd3 100644 --- a/TP/NGSI-LD/DistributedOperations/Consumption/Entity/QueryEntities/D011_04_inc.robot +++ b/TP/NGSI-LD/DistributedOperations/Consumption/Entity/QueryEntities/D011_04_inc.robot @@ -1,6 +1,7 @@ *** Settings *** Documentation Verify that, when one has an inclusive registration on a Context Broker and an entity only on a Context Source, if one queries the Context Broker Via Post the request gets forwarded to the Context Source correctly using the appropriate operation +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextSourceRegistration.resource Resource ${EXECDIR}/resources/ApiUtils/ContextSourceDiscovery.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource @@ -14,9 +15,7 @@ Test Template Setup Registration, Context Source Mock Server And Query The *** Variables *** -${entity_id_prefix} urn:ngsi-ld:Vehicle: ${entity_payload_filename} vehicle-simple-attributes.json -${registration_id_prefix} urn:ngsi-ld:Registration: ${registration_payload_file_path} csourceRegistrations/context-source-registration-vehicle-complete.jsonld @@ -36,9 +35,9 @@ D011_04_02_inc Query The Context Broker By Id Via POST Using The queryEntity Ope *** Keywords *** Setup Registration, Context Source Mock Server And Query The Context Broker With Type Via POST [Arguments] ${operation} ${method} ${url} - ${entity_id}= Generate Random Entity Id ${entity_id_prefix} + ${entity_id}= Generate Random Vehicle Entity Id - ${registration_id}= Generate Random Entity Id ${registration_id_prefix} + ${registration_id}= Generate Random CSR Id Set Suite Variable ${registration_id} ${operations}= Create List ${operation} ${registration_payload}= Prepare Context Source Registration From File diff --git a/TP/NGSI-LD/DistributedOperations/Consumption/Entity/RetrieveEntity/D010_01_aux.robot b/TP/NGSI-LD/DistributedOperations/Consumption/Entity/RetrieveEntity/D010_01_aux.robot index 5138b9bf..615cb4f5 100644 --- a/TP/NGSI-LD/DistributedOperations/Consumption/Entity/RetrieveEntity/D010_01_aux.robot +++ b/TP/NGSI-LD/DistributedOperations/Consumption/Entity/RetrieveEntity/D010_01_aux.robot @@ -1,6 +1,7 @@ *** Settings *** Documentation Verify that when an auxiliary registration exists on a Context Broker and an entity with the same ID exists both locally in the Context Broker and remotely in the Context Source with different attributes, a retrieval request to the Context Broker is correctly forwarded to the Context Source, and the response includes the local entity enriched with additional, non-conflicting attributes from the Context Source +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextSourceRegistration.resource Resource ${EXECDIR}/resources/ApiUtils/ContextSourceDiscovery.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource @@ -14,10 +15,8 @@ Test Teardown Delete Created Entity And Registration And Stop Context Sour *** Variables *** -${entity_id_prefix} urn:ngsi-ld:Vehicle: ${entity_payload_filename} vehicle-simple-attributes.json ${entity_payload_filename2} vehicle-simple-attributes-second.jsonld -${registration_id_prefix} urn:ngsi-ld:Registration: ${registration_payload_file_path} csourceRegistrations/context-source-registration-vehicle-complete.jsonld ${fragment_filename} vehicle-brandname-fragment.json ${expected_attribute} brandName @@ -43,13 +42,13 @@ D010_01_aux Retrieve Entity That Exists On Both The Context Source And The Conte *** Keywords *** Create Entity And Registration On The Context Broker And Start Context Source Mock Server - ${entity_id}= Generate Random Entity Id ${entity_id_prefix} + ${entity_id}= Generate Random Vehicle Entity Id Set Suite Variable ${entity_id} ${response}= Create Entity ${entity_payload_filename2} ${entity_id} Check Response Status Code 201 ${response.status_code} - ${registration_id}= Generate Random Entity Id ${registration_id_prefix} + ${registration_id}= Generate Random CSR Id Set Suite Variable ${registration_id} ${registration_payload}= Prepare Context Source Registration From File ... ${registration_id} diff --git a/TP/NGSI-LD/DistributedOperations/Consumption/Entity/RetrieveEntity/D010_03_inc.robot b/TP/NGSI-LD/DistributedOperations/Consumption/Entity/RetrieveEntity/D010_03_inc.robot index 59dac609..b3a4489d 100644 --- a/TP/NGSI-LD/DistributedOperations/Consumption/Entity/RetrieveEntity/D010_03_inc.robot +++ b/TP/NGSI-LD/DistributedOperations/Consumption/Entity/RetrieveEntity/D010_03_inc.robot @@ -1,6 +1,7 @@ *** Settings *** Documentation Verify that, when one has an inclusive registration on a Context Broker and an entity only on a Context Source, a retrieval request to the Context Broker the request is forwarded correcty to the Context Source using the appropriate operation +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextSourceRegistration.resource Resource ${EXECDIR}/resources/ApiUtils/ContextSourceDiscovery.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource @@ -14,9 +15,7 @@ Test Template Setup Registration, Context Source Mock Server And Retrieve *** Variables *** -${entity_id_prefix} urn:ngsi-ld:Vehicle: ${entity_payload_filename} vehicle-simple-attributes.json -${registration_id_prefix} urn:ngsi-ld:Registration: ${registration_payload_file_path} csourceRegistrations/context-source-registration-vehicle-complete.jsonld @@ -41,13 +40,13 @@ D010_03_03_inc Retrieve Entity By Id Using The queryBatch Operation *** Keywords *** Setup Registration, Context Source Mock Server And Retrieve Entity [Arguments] ${operation} ${method} ${url} - ${entity_id}= Generate Random Entity Id ${entity_id_prefix} + ${entity_id}= Generate Random Vehicle Entity Id IF '${operation}' == 'retrieveEntity' ${url}= Set Variable ${url}${entity_id} END - ${registration_id}= Generate Random Entity Id ${registration_id_prefix} + ${registration_id}= Generate Random CSR Id Set Suite Variable ${registration_id} ${operations}= Create List ${operation} ${registration_payload}= Prepare Context Source Registration From File diff --git a/TP/NGSI-LD/DistributedOperations/Provision/Entities/CreateEntity/D001_04_inc.robot b/TP/NGSI-LD/DistributedOperations/Provision/Entities/CreateEntity/D001_04_inc.robot index a008538e..c1273b2b 100644 --- a/TP/NGSI-LD/DistributedOperations/Provision/Entities/CreateEntity/D001_04_inc.robot +++ b/TP/NGSI-LD/DistributedOperations/Provision/Entities/CreateEntity/D001_04_inc.robot @@ -1,6 +1,7 @@ *** Settings *** Documentation Verify that when an entity creation request is made to the Context Broker with the local parameter, the request is not forwarded to the Context Source, and the entity is created only on the Context Broker +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextSourceRegistration.resource Resource ${EXECDIR}/resources/ApiUtils/ContextSourceDiscovery.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource @@ -14,9 +15,7 @@ Test Teardown Delete Created Entity And Registration And Stop Context Sour *** Variables *** -${entity_id_prefix} urn:ngsi-ld:Vehicle: ${entity_payload_filename} vehicle-simple-attributes.jsonld -${registration_id_prefix} urn:ngsi-ld:Registration: ${registration_payload_file_path} csourceRegistrations/context-source-registration-vehicle-redirection-ops.jsonld @@ -32,10 +31,10 @@ D001_04_inc Create Entity With Local Flag *** Keywords *** Setup Entity Id And Registration And Start Context Source Mock Server - ${entity_id}= Generate Random Entity Id ${entity_id_prefix} + ${entity_id}= Generate Random Vehice Id Set Suite Variable ${entity_id} - ${registration_id}= Generate Random Entity Id ${registration_id_prefix} + ${registration_id}= Generate Random CSR Id Set Suite Variable ${registration_id} ${registration_payload}= Prepare Context Source Registration From File ... ${registration_id} diff --git a/TP/NGSI-LD/DistributedOperations/Provision/Entities/DeleteEntity/D002_03_inc.robot b/TP/NGSI-LD/DistributedOperations/Provision/Entities/DeleteEntity/D002_03_inc.robot index 55db9c4b..be6c11c4 100644 --- a/TP/NGSI-LD/DistributedOperations/Provision/Entities/DeleteEntity/D002_03_inc.robot +++ b/TP/NGSI-LD/DistributedOperations/Provision/Entities/DeleteEntity/D002_03_inc.robot @@ -11,9 +11,7 @@ Suite Teardown Delete Created Entity And Registration And Stop Context Sour *** Variables *** -${entity_id_prefix} urn:ngsi-ld:Vehicle: ${entity_payload_filename} vehicle-simple-attributes.jsonld -${registration_id_prefix} urn:ngsi-ld:Registration: ${registration_payload_file_path} csourceRegistrations/context-source-registration-vehicle-redirection-ops.jsonld @@ -29,12 +27,12 @@ D002_03_inc Delete Entity With Local Flag *** Keywords *** Create Entity And Registration On The Context Broker And Start Context Source Mock Server - ${entity_id}= Generate Random Entity Id ${entity_id_prefix} + ${entity_id}= Generate Random Vehicle Entity Id Set Suite Variable ${entity_id} ${response}= Create Entity ${entity_payload_filename} ${entity_id} Check Response Status Code 201 ${response.status_code} - ${registration_id}= Generate Random Entity Id ${registration_id_prefix} + ${registration_id}= Generate Random CSR Id Set Suite Variable ${registration_id} ${registration_payload}= Prepare Context Source Registration From File ... ${registration_id} -- GitLab