From 7c5b73377a9fa214c041fa8448e82c93e9e6c803 Mon Sep 17 00:00:00 2001 From: Benedetta Arena Date: Tue, 28 Apr 2026 16:46:03 +0200 Subject: [PATCH 01/10] feat: add test case for loop detection in context source registrations --- .../LoopDetection/D018_01.robot | 55 +++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 TP/NGSI-LD/DistributedOperations/LoopDetection/D018_01.robot diff --git a/TP/NGSI-LD/DistributedOperations/LoopDetection/D018_01.robot b/TP/NGSI-LD/DistributedOperations/LoopDetection/D018_01.robot new file mode 100644 index 00000000..a8877467 --- /dev/null +++ b/TP/NGSI-LD/DistributedOperations/LoopDetection/D018_01.robot @@ -0,0 +1,55 @@ +*** Settings *** +Documentation Verify that the broker prevents loop when forwarding operations through Context Source Registrations + +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 + +Test Setup Create Entity And Registration On The Context Broker And Start Context Source Mock Server +Test Teardown Delete Registrations And Stop Context Source Mock Server + +*** Variables *** +${entity_payload_filename} vehicle-simple-attributes-second-different.jsonld +${registration_payload_file_path} csourceRegistrations/context-source-registration-vehicle-speed-with-redirection-ops.jsonld + +*** Test Cases *** +D018_01 Loop Detection In Context Source Registrations + [Documentation] Verify that the broker prevents loop when forwarding operations through Context Source Registrations + [Tags] since_v1.6.1 dist-ops 4_3_3 cf_06 proxy-exclusive 4_3_6_3 5_6_6 + + ${response}= Delete Entity ${entity_id} context=${ngsild_test_suite_context} + + ${response}= Get Request Headers + ${actual_payload}= Get From Dictionary ${response} Via + Dictionary Should Contain Key ${actual_payload} ${expected_payload} + Reply By 508 + + +*** Keywords *** +Create Entity And Registration On The Context Broker And Start Context Source Mock Server + ${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} + + ${response}= Get Request Headers + ${expected_payload}= Get From Dictionary ${response} Via + Set Suite Variable ${expected_payload} + + ${registration_id}= Generate Random CSR Id + Set Suite Variable ${registration_id} + ${registration_payload}= Prepare Context Source Registration From File + ... ${registration_id} + ... ${registration_payload_file_path} + ... mode=exclusive + ${response}= Create Context Source Registration With Return ${registration_payload} + Check Response Status Code 201 ${response.status_code} + +Delete Registrations And Stop Context Source Mock Server + Delete Entity ${entity_id} + Delete Context Source Registration ${registration_id} -- GitLab From fc04ea9f08c2ec29dff36b57f7ca157845c327e2 Mon Sep 17 00:00:00 2001 From: Benedetta Arena Date: Tue, 28 Apr 2026 17:54:57 +0200 Subject: [PATCH 02/10] feat: add test case for loop detection with two different Vias --- .../LoopDetection/D018_01.robot | 2 +- .../LoopDetection/D018_02.robot | 72 +++++++++++++++++++ 2 files changed, 73 insertions(+), 1 deletion(-) create mode 100644 TP/NGSI-LD/DistributedOperations/LoopDetection/D018_02.robot diff --git a/TP/NGSI-LD/DistributedOperations/LoopDetection/D018_01.robot b/TP/NGSI-LD/DistributedOperations/LoopDetection/D018_01.robot index a8877467..fef88c3d 100644 --- a/TP/NGSI-LD/DistributedOperations/LoopDetection/D018_01.robot +++ b/TP/NGSI-LD/DistributedOperations/LoopDetection/D018_01.robot @@ -20,7 +20,7 @@ ${registration_payload_file_path} csourceRegistrations/context-source-registr *** Test Cases *** D018_01 Loop Detection In Context Source Registrations [Documentation] Verify that the broker prevents loop when forwarding operations through Context Source Registrations - [Tags] since_v1.6.1 dist-ops 4_3_3 cf_06 proxy-exclusive 4_3_6_3 5_6_6 + [Tags] since_v1.6.1 dist-ops 4_3_3 cf_06 proxy-exclusive 5_6_6 6_3_18 ${response}= Delete Entity ${entity_id} context=${ngsild_test_suite_context} diff --git a/TP/NGSI-LD/DistributedOperations/LoopDetection/D018_02.robot b/TP/NGSI-LD/DistributedOperations/LoopDetection/D018_02.robot new file mode 100644 index 00000000..401e2f8a --- /dev/null +++ b/TP/NGSI-LD/DistributedOperations/LoopDetection/D018_02.robot @@ -0,0 +1,72 @@ +*** Settings *** +Documentation Verify that the broker prevents loop when forwarding operations through Context Source Registrations + +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 + +Test Setup Create Entity And Registration On The Context Broker And Start Context Source Mock Server +Test Teardown Delete Registrations And Stop Context Source Mock Server + +*** Variables *** +${entity_payload_filename} vehicle-simple-attributes-second-different.jsonld +${registration_payload_file_path} csourceRegistrations/context-source-registration-vehicle-speed-with-redirection-ops.jsonld +${registration_inclusive_payload_file_path} csourceRegistrations/context-source-registration-vehicle-redirection-ops.jsonld + +*** Test Cases *** +D018_02 Loop Detection In Context Source Registrations + [Documentation] Verify that the broker prevents loop when Via header is already presents + [Tags] since_v1.6.1 dist-ops 4_3_3 cf_06 proxy-exclusive additive-inclusive 5_6_6 6_3_18 + + Set Stub Reply DELETE /broker1/ngsi-ld/v1/entities/${entity_id} 204 + ${response}= Delete Entity ${entity_id} context=${ngsild_test_suite_context} + Check Response Status Code 204 ${response.status_code} + + ${response}= Get Request Headers + ${expected_payload}= Get From Dictionary ${response} Via + + ${stub_count}= Get Stub Count DELETE /ngsi-ld/v1/entities/${entity_id} + Should Be Equal ${stub_count} 0 + + ${response}= Get Request Headers + ${actual_payload}= Get From Dictionary ${response} Via + Dictionary Should Contain Key ${actual_payload} ${expected_payload} + Reply By 508 + +*** Keywords *** +Create Entity And Registration On The Context Broker And Start Context Source Mock Server + ${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 CSR Id + Set Suite Variable ${registration_id} + ${registration_payload}= Prepare Context Source Registration From File + ... ${registration_id} + ... ${registration_payload_file_path} + ... mode=exclusive + ... endpoint=/broker1 + ${response}= Create Context Source Registration With Return ${registration_payload} + Check Response Status Code 201 ${response.status_code} + + ${registration_id2}= Generate Random CSR Id + Set Suite Variable ${registration_id2} + ${registration_inclusive_payload}= Prepare Context Source Registration From File + ... ${registration_id2} + ... ${registration_inclusive_payload_file_path} + ... mode=inclusive + ${response}= Create Context Source Registration With Return ${registration_inclusive_payload} + Check Response Status Code 201 ${response.status_code} + Start Context Source Mock Server + +Delete Registrations And Stop Context Source Mock Server + Delete Entity ${entity_id} + Delete Context Source Registration ${registration_id} + Delete Context Source Registration ${registration_id2} + Stop Context Source Mock Server -- GitLab From e93693ecf3968d5c6a21e93de32e5a4d6b1b88ba Mon Sep 17 00:00:00 2001 From: Benedetta Arena Date: Thu, 30 Apr 2026 12:00:29 +0200 Subject: [PATCH 03/10] feat: update test cases for loop detection to verify Via header presence --- .../LoopDetection/D018_01.robot | 64 +++++++++---------- .../LoopDetection/D018_02.robot | 38 ++++------- 2 files changed, 40 insertions(+), 62 deletions(-) diff --git a/TP/NGSI-LD/DistributedOperations/LoopDetection/D018_01.robot b/TP/NGSI-LD/DistributedOperations/LoopDetection/D018_01.robot index fef88c3d..c65db534 100644 --- a/TP/NGSI-LD/DistributedOperations/LoopDetection/D018_01.robot +++ b/TP/NGSI-LD/DistributedOperations/LoopDetection/D018_01.robot @@ -1,5 +1,5 @@ *** Settings *** -Documentation Verify that the broker prevents loop when forwarding operations through Context Source Registrations +Documentation Verify that a loop is detected when the Via header contains the broker's identifier. Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource @@ -10,46 +10,40 @@ Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource Resource ${EXECDIR}/resources/MockServerUtils.resource -Test Setup Create Entity And Registration On The Context Broker And Start Context Source Mock Server -Test Teardown Delete Registrations And Stop Context Source Mock Server +Test Teardown Delete Initial Entity +Test Template Create Entity Scenarios -*** Variables *** -${entity_payload_filename} vehicle-simple-attributes-second-different.jsonld -${registration_payload_file_path} csourceRegistrations/context-source-registration-vehicle-speed-with-redirection-ops.jsonld - -*** Test Cases *** -D018_01 Loop Detection In Context Source Registrations - [Documentation] Verify that the broker prevents loop when forwarding operations through Context Source Registrations - [Tags] since_v1.6.1 dist-ops 4_3_3 cf_06 proxy-exclusive 5_6_6 6_3_18 - - ${response}= Delete Entity ${entity_id} context=${ngsild_test_suite_context} - - ${response}= Get Request Headers - ${actual_payload}= Get From Dictionary ${response} Via - Dictionary Should Contain Key ${actual_payload} ${expected_payload} - Reply By 508 +*** Test Cases *** FILENAME +D018_01 Loop Detection With Header Via + [Tags] since_v1.6.1 dist-ops 4_3_3 cf_06 5_6_6 6_3_18 + vehicle-simple-attributes.jsonld *** Keywords *** -Create Entity And Registration On The Context Broker And Start Context Source Mock Server +Create Entity Scenarios + [Documentation] Verify that a loop is detected when the Via header contains the broker's identifier. + [Arguments] ${filename} + ${entity_id}= Generate Random Vehicle Entity Id - Set Suite Variable ${entity_id} - ${response}= Create Entity ${entity_payload_filename} ${entity_id} + Set Test Variable ${entity_id} + ${response}= Create Entity ${filename} ${entity_id} local=true Check Response Status Code 201 ${response.status_code} + Wait For Request ${response}= Get Request Headers - ${expected_payload}= Get From Dictionary ${response} Via - Set Suite Variable ${expected_payload} - - ${registration_id}= Generate Random CSR Id - Set Suite Variable ${registration_id} - ${registration_payload}= Prepare Context Source Registration From File - ... ${registration_id} - ... ${registration_payload_file_path} - ... mode=exclusive - ${response}= Create Context Source Registration With Return ${registration_payload} - Check Response Status Code 201 ${response.status_code} + ${payload}= Convert To Dictionary ${response} + ${expected_payload}= Get From Dictionary ${payload} Via + + ${response}= Delete Entity ${entity_id} local=true + + Wait For Request + ${response}= Get Request Headers + ${payload}= Convert To Dictionary ${response} + ${actual_payload}= Get From Dictionary ${payload} Via + + Should Be Equal ${actual_payload} ${expected_payload} + Reply By 508 + -Delete Registrations And Stop Context Source Mock Server - Delete Entity ${entity_id} - Delete Context Source Registration ${registration_id} +Delete Initial Entity + Delete Entity ${entity_id} local=true diff --git a/TP/NGSI-LD/DistributedOperations/LoopDetection/D018_02.robot b/TP/NGSI-LD/DistributedOperations/LoopDetection/D018_02.robot index 401e2f8a..80a598b4 100644 --- a/TP/NGSI-LD/DistributedOperations/LoopDetection/D018_02.robot +++ b/TP/NGSI-LD/DistributedOperations/LoopDetection/D018_02.robot @@ -1,5 +1,5 @@ *** Settings *** -Documentation Verify that the broker prevents loop when forwarding operations through Context Source Registrations +Documentation Verify that the request contains the VIA when forwarding operations through Context Source Registrations Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource @@ -14,29 +14,22 @@ Test Setup Create Entity And Registration On The Context Broker And Sta Test Teardown Delete Registrations And Stop Context Source Mock Server *** Variables *** -${entity_payload_filename} vehicle-simple-attributes-second-different.jsonld -${registration_payload_file_path} csourceRegistrations/context-source-registration-vehicle-speed-with-redirection-ops.jsonld -${registration_inclusive_payload_file_path} csourceRegistrations/context-source-registration-vehicle-redirection-ops.jsonld +${entity_payload_filename} vehicle-simple-attributes.jsonld +${registration_payload_file_path} csourceRegistrations/context-source-registration-vehicle-redirection-ops.jsonld *** Test Cases *** D018_02 Loop Detection In Context Source Registrations - [Documentation] Verify that the broker prevents loop when Via header is already presents - [Tags] since_v1.6.1 dist-ops 4_3_3 cf_06 proxy-exclusive additive-inclusive 5_6_6 6_3_18 + [Documentation] Verify that the request contains the VIA when forwarding operations through Context Source Registrations + [Tags] since_v1.6.1 dist-ops 4_3_3 cf_06 additive-inclusive 5_6_6 6_3_18 Set Stub Reply DELETE /broker1/ngsi-ld/v1/entities/${entity_id} 204 - ${response}= Delete Entity ${entity_id} context=${ngsild_test_suite_context} + ${response}= Delete Entity ${entity_id} Check Response Status Code 204 ${response.status_code} + Wait For Request ${response}= Get Request Headers - ${expected_payload}= Get From Dictionary ${response} Via - - ${stub_count}= Get Stub Count DELETE /ngsi-ld/v1/entities/${entity_id} - Should Be Equal ${stub_count} 0 - - ${response}= Get Request Headers - ${actual_payload}= Get From Dictionary ${response} Via - Dictionary Should Contain Key ${actual_payload} ${expected_payload} - Reply By 508 + ${payload}= Convert To Dictionary ${response} + Dictionary Should Contain Key ${payload} Via *** Keywords *** Create Entity And Registration On The Context Broker And Start Context Source Mock Server @@ -50,23 +43,14 @@ Create Entity And Registration On The Context Broker And Start Context Source Mo ${registration_payload}= Prepare Context Source Registration From File ... ${registration_id} ... ${registration_payload_file_path} - ... mode=exclusive + ... entity_id=${entity_id} + ... mode=inclusive ... endpoint=/broker1 ${response}= Create Context Source Registration With Return ${registration_payload} Check Response Status Code 201 ${response.status_code} - ${registration_id2}= Generate Random CSR Id - Set Suite Variable ${registration_id2} - ${registration_inclusive_payload}= Prepare Context Source Registration From File - ... ${registration_id2} - ... ${registration_inclusive_payload_file_path} - ... mode=inclusive - ${response}= Create Context Source Registration With Return ${registration_inclusive_payload} - Check Response Status Code 201 ${response.status_code} Start Context Source Mock Server Delete Registrations And Stop Context Source Mock Server - Delete Entity ${entity_id} Delete Context Source Registration ${registration_id} - Delete Context Source Registration ${registration_id2} Stop Context Source Mock Server -- GitLab From f7c06e088f5a921e4906c5a6f01d87c166e91fde Mon Sep 17 00:00:00 2001 From: Benedetta Arena Date: Thu, 30 Apr 2026 13:03:58 +0200 Subject: [PATCH 04/10] feat: add new test for loop detection with two Via --- .../LoopDetection/D018_02.robot | 6 +- .../LoopDetection/D018_03.robot | 63 +++++++++++++++++++ 2 files changed, 66 insertions(+), 3 deletions(-) create mode 100644 TP/NGSI-LD/DistributedOperations/LoopDetection/D018_03.robot diff --git a/TP/NGSI-LD/DistributedOperations/LoopDetection/D018_02.robot b/TP/NGSI-LD/DistributedOperations/LoopDetection/D018_02.robot index 80a598b4..70a0989f 100644 --- a/TP/NGSI-LD/DistributedOperations/LoopDetection/D018_02.robot +++ b/TP/NGSI-LD/DistributedOperations/LoopDetection/D018_02.robot @@ -1,5 +1,5 @@ *** Settings *** -Documentation Verify that the request contains the VIA when forwarding operations through Context Source Registrations +Documentation Verify that the request contains the VIA when forwarding operations to the Context Broker Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource @@ -18,8 +18,8 @@ ${entity_payload_filename} vehicle-simple-attributes.jsonld ${registration_payload_file_path} csourceRegistrations/context-source-registration-vehicle-redirection-ops.jsonld *** Test Cases *** -D018_02 Loop Detection In Context Source Registrations - [Documentation] Verify that the request contains the VIA when forwarding operations through Context Source Registrations +D018_02 Check Via Header For Loop Detection + [Documentation] Verify that the request contains the VIA when forwarding operations to the Context Broker [Tags] since_v1.6.1 dist-ops 4_3_3 cf_06 additive-inclusive 5_6_6 6_3_18 Set Stub Reply DELETE /broker1/ngsi-ld/v1/entities/${entity_id} 204 diff --git a/TP/NGSI-LD/DistributedOperations/LoopDetection/D018_03.robot b/TP/NGSI-LD/DistributedOperations/LoopDetection/D018_03.robot new file mode 100644 index 00000000..6f681eb2 --- /dev/null +++ b/TP/NGSI-LD/DistributedOperations/LoopDetection/D018_03.robot @@ -0,0 +1,63 @@ +*** Settings *** +Documentation Verify that the request contains both the VIA header from the Context Broker and the Via from the Context Source + +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 + +Test Setup Create Entity And Registration On The Context Broker And Start Context Source Mock Server +Test Teardown Delete Registrations And Stop Context Source Mock Server + +*** Variables *** +${entity_payload_filename} vehicle-simple-attributes.jsonld +${registration_payload_file_path} csourceRegistrations/context-source-registration-vehicle-redirection-ops.jsonld + +*** Test Cases *** +D018_03 Check Via Header For Loop Detection + [Documentation] Verify that the request contains both the VIA header from the Context Broker and the Via from the Context Source + [Tags] since_v1.6.1 dist-ops 4_3_3 cf_06 additive-inclusive 5_6_6 6_3_18 + + Set Stub Reply DELETE /broker1/ngsi-ld/v1/entities/${entity_id} 204 + ${response}= Delete Entity ${entity_id} + Check Response Status Code 204 ${response.status_code} + + Wait For Request + ${response}= Get Request Headers + ${payload}= Convert To Dictionary ${response} + Dictionary Should Contain Key ${payload} Via + Dictionary Should Contain Key ${payload} ${expected_payload} + +*** Keywords *** +Create Entity And Registration On The Context Broker And Start Context Source Mock Server + ${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} + + Wait For Request + ${response}= Get Request Headers + ${payload}= Convert To Dictionary ${response} + ${expected_payload}= Get From Dictionary ${payload} Via + Set Suite Variable ${expected_payload} + + ${registration_id}= Generate Random CSR Id + Set Suite Variable ${registration_id} + ${registration_payload}= Prepare Context Source Registration From File + ... ${registration_id} + ... ${registration_payload_file_path} + ... entity_id=${entity_id} + ... mode=inclusive + ... endpoint=/broker1 + ${response}= Create Context Source Registration With Return ${registration_payload} + Check Response Status Code 201 ${response.status_code} + + Start Context Source Mock Server + +Delete Registrations And Stop Context Source Mock Server + Delete Context Source Registration ${registration_id} + Stop Context Source Mock Server -- GitLab From c9f59e17b01af7db3eab7bbd0f5b6e876b96aa40 Mon Sep 17 00:00:00 2001 From: Benedetta Arena Date: Tue, 5 May 2026 17:34:14 +0200 Subject: [PATCH 05/10] fix: minor typos and improve test D018_01 and D018_03 logic --- .../LoopDetection/D018_01.robot | 56 +++++++++++-------- .../LoopDetection/D018_02.robot | 8 +-- .../LoopDetection/D018_03.robot | 30 +++++----- 3 files changed, 53 insertions(+), 41 deletions(-) diff --git a/TP/NGSI-LD/DistributedOperations/LoopDetection/D018_01.robot b/TP/NGSI-LD/DistributedOperations/LoopDetection/D018_01.robot index c65db534..0a3540e6 100644 --- a/TP/NGSI-LD/DistributedOperations/LoopDetection/D018_01.robot +++ b/TP/NGSI-LD/DistributedOperations/LoopDetection/D018_01.robot @@ -10,40 +10,52 @@ Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource Resource ${EXECDIR}/resources/MockServerUtils.resource -Test Teardown Delete Initial Entity -Test Template Create Entity Scenarios +Test Setup Create Entity And Registration On The Context Broker And Start Context Source Mock Server +Test Teardown Delete Registrations And Stop Context Source Mock Server -*** Test Cases *** FILENAME -D018_01 Loop Detection With Header Via - [Tags] since_v1.6.1 dist-ops 4_3_3 cf_06 5_6_6 6_3_18 - vehicle-simple-attributes.jsonld +*** Variables *** +${entity_payload_filename} vehicle-simple-attributes.jsonld +${registration_payload_file_path} csourceRegistrations/context-source-registration-vehicle-redirection-ops.jsonld - -*** Keywords *** -Create Entity Scenarios +*** Test Cases *** +D018_01 Loop Detection With Via Header [Documentation] Verify that a loop is detected when the Via header contains the broker's identifier. - [Arguments] ${filename} - - ${entity_id}= Generate Random Vehicle Entity Id - Set Test Variable ${entity_id} - ${response}= Create Entity ${filename} ${entity_id} local=true + [Tags] since_v1.8.1 dist-ops 4_3_3 cf_06 5_6_6 6_3_18 + + ${response}= Create Entity ${entity_payload_filename} ${entity_id} Check Response Status Code 201 ${response.status_code} Wait For Request ${response}= Get Request Headers ${payload}= Convert To Dictionary ${response} - ${expected_payload}= Get From Dictionary ${payload} Via + ${expected_via_header}= Get From Dictionary ${payload} Via - ${response}= Delete Entity ${entity_id} local=true + ${response}= Delete Entity ${entity_id} + Check Response Status Code 508 ${response.status_code} Wait For Request ${response}= Get Request Headers - ${payload}= Convert To Dictionary ${response} - ${actual_payload}= Get From Dictionary ${payload} Via + ${actual_via_header}= Convert To Dictionary ${response} + Should Contain ${actual_via_header} ${expected_via_header} - Should Be Equal ${actual_payload} ${expected_payload} - Reply By 508 +*** Keywords *** +Create Entity And Registration On The Context Broker And Start Context Source Mock Server + ${entity_id}= Generate Random Vehicle Entity Id + Set Test Variable ${entity_id} + + ${registration_id}= Generate Random CSR Id + Set Suite Variable ${registration_id} + ${registration_payload}= Prepare Context Source Registration From File + ... ${registration_id} + ... ${registration_payload_file_path} + ... entity_id=${entity_id} + ... mode=inclusive + ${response}= Create Context Source Registration With Return ${registration_payload} + Check Response Status Code 201 ${response.status_code} + Start Context Source Mock Server -Delete Initial Entity - Delete Entity ${entity_id} local=true +Delete Registrations And Stop Context Source Mock Server + Delete Entity ${entity_id} + Delete Context Source Registration ${registration_id} + Stop Context Source Mock Server diff --git a/TP/NGSI-LD/DistributedOperations/LoopDetection/D018_02.robot b/TP/NGSI-LD/DistributedOperations/LoopDetection/D018_02.robot index 70a0989f..d985c38f 100644 --- a/TP/NGSI-LD/DistributedOperations/LoopDetection/D018_02.robot +++ b/TP/NGSI-LD/DistributedOperations/LoopDetection/D018_02.robot @@ -1,5 +1,5 @@ *** Settings *** -Documentation Verify that the request contains the VIA when forwarding operations to the Context Broker +Documentation Verify that the request contains the Via header when forwarding operations to the Context Broker Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource @@ -18,9 +18,9 @@ ${entity_payload_filename} vehicle-simple-attributes.jsonld ${registration_payload_file_path} csourceRegistrations/context-source-registration-vehicle-redirection-ops.jsonld *** Test Cases *** -D018_02 Check Via Header For Loop Detection - [Documentation] Verify that the request contains the VIA when forwarding operations to the Context Broker - [Tags] since_v1.6.1 dist-ops 4_3_3 cf_06 additive-inclusive 5_6_6 6_3_18 +D018_02 Check Via Header Forwarding To Context Source + [Documentation] Verify that the request contains the Via header when forwarding operations to the Context Source + [Tags] since_v1.8.1 dist-ops 4_3_3 cf_06 additive-inclusive 5_6_6 6_3_18 Set Stub Reply DELETE /broker1/ngsi-ld/v1/entities/${entity_id} 204 ${response}= Delete Entity ${entity_id} diff --git a/TP/NGSI-LD/DistributedOperations/LoopDetection/D018_03.robot b/TP/NGSI-LD/DistributedOperations/LoopDetection/D018_03.robot index 6f681eb2..fb45f10a 100644 --- a/TP/NGSI-LD/DistributedOperations/LoopDetection/D018_03.robot +++ b/TP/NGSI-LD/DistributedOperations/LoopDetection/D018_03.robot @@ -1,5 +1,5 @@ *** Settings *** -Documentation Verify that the request contains both the VIA header from the Context Broker and the Via from the Context Source +Documentation Verify that the request contains both the Via header from the Context Broker and the Via from the Context Source Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource @@ -18,9 +18,18 @@ ${entity_payload_filename} vehicle-simple-attributes.jsonld ${registration_payload_file_path} csourceRegistrations/context-source-registration-vehicle-redirection-ops.jsonld *** Test Cases *** -D018_03 Check Via Header For Loop Detection - [Documentation] Verify that the request contains both the VIA header from the Context Broker and the Via from the Context Source - [Tags] since_v1.6.1 dist-ops 4_3_3 cf_06 additive-inclusive 5_6_6 6_3_18 +D018_03 Check Via Header Forwarding To Context Source + [Documentation] Verify that the request contains the Via header from both the Context Broker and the Context Source + [Tags] since_v1.8.1 dist-ops 4_3_3 cf_06 additive-inclusive 5_6_6 6_3_18 + + ${response}= Create Entity ${entity_payload_filename} ${entity_id} + Check Response Status Code 201 ${response.status_code} + + Wait For Request + ${response}= Get Request Headers + ${payload}= Convert To Dictionary ${response} + ${create_via_header}= Get From Dictionary ${payload} Via + Set Suite Variable ${create_via_header} Set Stub Reply DELETE /broker1/ngsi-ld/v1/entities/${entity_id} 204 ${response}= Delete Entity ${entity_id} @@ -28,22 +37,13 @@ D018_03 Check Via Header For Loop Detection Wait For Request ${response}= Get Request Headers - ${payload}= Convert To Dictionary ${response} - Dictionary Should Contain Key ${payload} Via - Dictionary Should Contain Key ${payload} ${expected_payload} + ${delete_via_header}= Convert To Dictionary ${response} + Should Contain ${delete_via_header} ${create_via_header} *** Keywords *** Create Entity And Registration On The Context Broker And Start Context Source Mock Server ${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} - - Wait For Request - ${response}= Get Request Headers - ${payload}= Convert To Dictionary ${response} - ${expected_payload}= Get From Dictionary ${payload} Via - Set Suite Variable ${expected_payload} ${registration_id}= Generate Random CSR Id Set Suite Variable ${registration_id} -- GitLab From be5a4081a35f4637ea12d37b65537e9d6a11f4ac Mon Sep 17 00:00:00 2001 From: Benedetta Arena Date: Tue, 5 May 2026 17:54:14 +0200 Subject: [PATCH 06/10] fix: improve loop detection validation --- .../DistributedOperations/LoopDetection/D018_01.robot | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/TP/NGSI-LD/DistributedOperations/LoopDetection/D018_01.robot b/TP/NGSI-LD/DistributedOperations/LoopDetection/D018_01.robot index 0a3540e6..de0069c1 100644 --- a/TP/NGSI-LD/DistributedOperations/LoopDetection/D018_01.robot +++ b/TP/NGSI-LD/DistributedOperations/LoopDetection/D018_01.robot @@ -31,12 +31,13 @@ D018_01 Loop Detection With Via Header ${expected_via_header}= Get From Dictionary ${payload} Via ${response}= Delete Entity ${entity_id} - Check Response Status Code 508 ${response.status_code} + Check Response Status Code 201 ${response.status_code} Wait For Request ${response}= Get Request Headers - ${actual_via_header}= Convert To Dictionary ${response} - Should Contain ${actual_via_header} ${expected_via_header} + ${payload}= Convert To Dictionary ${response} + ${actual_via_header}= Get From Dictionary ${payload} Via + Should Be Equal ${actual_via_header} ${expected_via_header} *** Keywords *** Create Entity And Registration On The Context Broker And Start Context Source Mock Server -- GitLab From a4e14f7ddd4c96532b97d1a2f797c81a8fe81fdc Mon Sep 17 00:00:00 2001 From: Benedetta Arena Date: Tue, 5 May 2026 18:04:02 +0200 Subject: [PATCH 07/10] fix: correct response status code --- TP/NGSI-LD/DistributedOperations/LoopDetection/D018_01.robot | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/TP/NGSI-LD/DistributedOperations/LoopDetection/D018_01.robot b/TP/NGSI-LD/DistributedOperations/LoopDetection/D018_01.robot index de0069c1..eee369bf 100644 --- a/TP/NGSI-LD/DistributedOperations/LoopDetection/D018_01.robot +++ b/TP/NGSI-LD/DistributedOperations/LoopDetection/D018_01.robot @@ -31,7 +31,7 @@ D018_01 Loop Detection With Via Header ${expected_via_header}= Get From Dictionary ${payload} Via ${response}= Delete Entity ${entity_id} - Check Response Status Code 201 ${response.status_code} + Check Response Status Code 508 ${response.status_code} Wait For Request ${response}= Get Request Headers -- GitLab From dc567f892d798ba0194b47a890e2e9056e695747 Mon Sep 17 00:00:00 2001 From: Benedetta Arena Date: Thu, 7 May 2026 15:06:59 +0200 Subject: [PATCH 08/10] fix: enhance loop detection tests and add Via header validation for all endpoints --- .../LoopDetection/D018_01.robot | 8 +-- .../LoopDetection/D018_02.robot | 69 +++++++++++++++++-- .../ContextInformationProvision.resource | 11 ++- 3 files changed, 76 insertions(+), 12 deletions(-) diff --git a/TP/NGSI-LD/DistributedOperations/LoopDetection/D018_01.robot b/TP/NGSI-LD/DistributedOperations/LoopDetection/D018_01.robot index eee369bf..24c2cd61 100644 --- a/TP/NGSI-LD/DistributedOperations/LoopDetection/D018_01.robot +++ b/TP/NGSI-LD/DistributedOperations/LoopDetection/D018_01.robot @@ -30,15 +30,9 @@ D018_01 Loop Detection With Via Header ${payload}= Convert To Dictionary ${response} ${expected_via_header}= Get From Dictionary ${payload} Via - ${response}= Delete Entity ${entity_id} + ${response}= Delete Entity ${entity_id} check_via=${expected_via_header} Check Response Status Code 508 ${response.status_code} - Wait For Request - ${response}= Get Request Headers - ${payload}= Convert To Dictionary ${response} - ${actual_via_header}= Get From Dictionary ${payload} Via - Should Be Equal ${actual_via_header} ${expected_via_header} - *** Keywords *** Create Entity And Registration On The Context Broker And Start Context Source Mock Server ${entity_id}= Generate Random Vehicle Entity Id diff --git a/TP/NGSI-LD/DistributedOperations/LoopDetection/D018_02.robot b/TP/NGSI-LD/DistributedOperations/LoopDetection/D018_02.robot index d985c38f..7cff4252 100644 --- a/TP/NGSI-LD/DistributedOperations/LoopDetection/D018_02.robot +++ b/TP/NGSI-LD/DistributedOperations/LoopDetection/D018_02.robot @@ -1,5 +1,5 @@ *** Settings *** -Documentation Verify that the request contains the Via header when forwarding operations to the Context Broker +Documentation Check Via Header Forwarding To Context Source across multiple NGSI-LD endpoints Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource @@ -14,11 +14,42 @@ Test Setup Create Entity And Registration On The Context Broker And Sta Test Teardown Delete Registrations And Stop Context Source Mock Server *** Variables *** -${entity_payload_filename} vehicle-simple-attributes.jsonld +${first_entity_payload_filename} vehicle-simple-attributes.jsonld +${second_entity_payload_filename} vehicle-simple-attributes-second-different.jsonld +${brandname_payload_filename} vehicle-brandname-fragment.jsonld ${registration_payload_file_path} csourceRegistrations/context-source-registration-vehicle-redirection-ops.jsonld *** Test Cases *** -D018_02 Check Via Header Forwarding To Context Source +D018_02_01 Check Post Via Header Forwarding To Context Source + [Documentation] Verify that the request contains the Via header when forwarding operations to the Context Source + [Tags] since_v1.8.1 dist-ops 4_3_3 cf_06 additive-inclusive 5_6_6 6_3_18 + + Set Stub Reply POST /broker1/ngsi-ld/v1/entities 201 + ${response}= Create Entity ${second_entity_payload_filename} ${entity_id} + Check Response Status Code 201 ${response.status_code} + + Wait For Request + ${response}= Get Request Headers + ${payload}= Convert To Dictionary ${response} + Dictionary Should Contain Key ${payload} Via + +D018_02_02 Check Update Via Header Forwarding To Context Source + [Documentation] Verify that the request contains the Via header when forwarding operations to the Context Source + [Tags] since_v1.8.1 dist-ops 4_3_3 cf_06 additive-inclusive 5_6_6 6_3_18 + + Set Stub Reply PATCH /broker1/ngsi-ld/v1/entities/${entity_id} 204 + ${response}= Update Entity Attributes + ... ${entity_id} + ... ${brandname_payload_filename} + ... content_type=${CONTENT_TYPE_LD_JSON} + Check Response Status Code 204 ${response.status_code} + + Wait For Request + ${response}= Get Request Headers + ${payload}= Convert To Dictionary ${response} + Dictionary Should Contain Key ${payload} Via + +D018_02_03 Check Delete Via Header Forwarding To Context Source [Documentation] Verify that the request contains the Via header when forwarding operations to the Context Source [Tags] since_v1.8.1 dist-ops 4_3_3 cf_06 additive-inclusive 5_6_6 6_3_18 @@ -31,11 +62,40 @@ D018_02 Check Via Header Forwarding To Context Source ${payload}= Convert To Dictionary ${response} Dictionary Should Contain Key ${payload} Via +D018_02_04 Check Put Via Header Forwarding To Context Source + [Documentation] Verify that the request contains the Via header when forwarding operations to the Context Source + [Tags] since_v1.8.1 dist-ops 4_3_3 cf_06 additive-inclusive 5_6_6 6_3_18 + + Set Stub Reply PUT /broker1/ngsi-ld/v1/entities/${entity_id} 204 + ${response}= Replace Entity + ... ${entity_id} + ... ${second_entity_payload_filename} + ... ${CONTENT_TYPE_LD_JSON} + Check Response Status Code 204 ${response.status_code} + + Wait For Request + ${response}= Get Request Headers + ${payload}= Convert To Dictionary ${response} + Dictionary Should Contain Key ${payload} Via + +D018_02_05 Check Get Via Header Forwarding To Context Source + [Documentation] Verify that the request contains the Via header when forwarding operations to the Context Source + [Tags] since_v1.8.1 dist-ops 4_3_3 cf_06 additive-inclusive 5_6_6 6_3_18 + + Set Stub Reply GET /broker1/ngsi-ld/v1/entities/${entity_id} 200 + ${response}= Retrieve Entity ${entity_id} + Check Response Status Code 200 ${response.status_code} + + Wait For Request + ${response}= Get Request Headers + ${payload}= Convert To Dictionary ${response} + Dictionary Should Contain Key ${payload} Via + *** Keywords *** Create Entity And Registration On The Context Broker And Start Context Source Mock Server ${entity_id}= Generate Random Vehicle Entity Id Set Suite Variable ${entity_id} - ${response}= Create Entity ${entity_payload_filename} ${entity_id} + ${response}= Create Entity ${first_entity_payload_filename} ${entity_id} Check Response Status Code 201 ${response.status_code} ${registration_id}= Generate Random CSR Id @@ -52,5 +112,6 @@ Create Entity And Registration On The Context Broker And Start Context Source Mo Start Context Source Mock Server Delete Registrations And Stop Context Source Mock Server + Delete Entity ${entity_id} Delete Context Source Registration ${registration_id} Stop Context Source Mock Server diff --git a/resources/ApiUtils/ContextInformationProvision.resource b/resources/ApiUtils/ContextInformationProvision.resource index c812d5ec..192ae50d 100755 --- a/resources/ApiUtils/ContextInformationProvision.resource +++ b/resources/ApiUtils/ContextInformationProvision.resource @@ -5,6 +5,7 @@ Library RequestsLibrary Library OperatingSystem Library Collections Library JSONLibrary +Library HttpCtrl.Server Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/TemporalContextInformationProvision.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -271,7 +272,7 @@ Delete Entity Attributes Delete Entity [Tags] actor_context-producer - [Arguments] ${id} ${local}=${EMPTY} ${broker_url}=${EMPTY} + [Arguments] ${id} ${local}=${EMPTY} ${broker_url}=${EMPTY} ${check_via}=${EMPTY} &{params}= Create Dictionary IF '${local}'!='' Set To Dictionary ${params} local=${local} ${final_url}= Set Variable If '${broker_url}' != '' ${broker_url} ${url} @@ -279,6 +280,14 @@ Delete Entity ... url=${final_url}/${ENTITIES_ENDPOINT_PATH}${id} ... params=${params} ... expected_status=any + IF '${check_via}' != '${EMPTY}' + Wait For Request + ${request_headers}= Get Request Headers + ${payload}= Convert To Dictionary ${request_headers} + ${actual_via}= Get From Dictionary ${payload} Via + Should Be Equal ${check_via} ${actual_via} + Output ${response} Delete Entity + END IF ${delete_temporal_on_core_delete} Delete Temporal Representation Of Entity ${id} END -- GitLab From b42a88c96969f7cb7aca988ee0aed2794fa67fcd Mon Sep 17 00:00:00 2001 From: Benedetta Arena Date: Thu, 7 May 2026 16:15:12 +0200 Subject: [PATCH 09/10] fix: correct check header value in loop detection test --- TP/NGSI-LD/DistributedOperations/LoopDetection/D018_03.robot | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/TP/NGSI-LD/DistributedOperations/LoopDetection/D018_03.robot b/TP/NGSI-LD/DistributedOperations/LoopDetection/D018_03.robot index fb45f10a..3a74d2ce 100644 --- a/TP/NGSI-LD/DistributedOperations/LoopDetection/D018_03.robot +++ b/TP/NGSI-LD/DistributedOperations/LoopDetection/D018_03.robot @@ -38,7 +38,7 @@ D018_03 Check Via Header Forwarding To Context Source Wait For Request ${response}= Get Request Headers ${delete_via_header}= Convert To Dictionary ${response} - Should Contain ${delete_via_header} ${create_via_header} + Should Contain ${delete_via_header}[Via]\[value] ${create_via_header} *** Keywords *** Create Entity And Registration On The Context Broker And Start Context Source Mock Server -- GitLab From 375ae74abad0b787076be30fbb141d48a4257486 Mon Sep 17 00:00:00 2001 From: Benedetta Arena Date: Thu, 7 May 2026 17:30:07 +0200 Subject: [PATCH 10/10] fix: update test to improve entity handling --- .../LoopDetection/D018_02.robot | 30 +++++++++++-------- 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/TP/NGSI-LD/DistributedOperations/LoopDetection/D018_02.robot b/TP/NGSI-LD/DistributedOperations/LoopDetection/D018_02.robot index 7cff4252..42244ad2 100644 --- a/TP/NGSI-LD/DistributedOperations/LoopDetection/D018_02.robot +++ b/TP/NGSI-LD/DistributedOperations/LoopDetection/D018_02.robot @@ -16,16 +16,18 @@ Test Teardown Delete Registrations And Stop Context Source Mock Server *** Variables *** ${first_entity_payload_filename} vehicle-simple-attributes.jsonld ${second_entity_payload_filename} vehicle-simple-attributes-second-different.jsonld -${brandname_payload_filename} vehicle-brandname-fragment.jsonld +${third_entity_payload_filename} vehicle-simple-attributes-second.json +${brandname_payload_filename} vehicle-brandname-complete-fragment.jsonld +${entity_pattern} urn:ngsi-ld:Vehicle:* ${registration_payload_file_path} csourceRegistrations/context-source-registration-vehicle-redirection-ops.jsonld *** Test Cases *** D018_02_01 Check Post Via Header Forwarding To Context Source - [Documentation] Verify that the request contains the Via header when forwarding operations to the Context Source + [Documentation] Verify that the request contains the POST Via header when forwarding operations to the Context Source [Tags] since_v1.8.1 dist-ops 4_3_3 cf_06 additive-inclusive 5_6_6 6_3_18 Set Stub Reply POST /broker1/ngsi-ld/v1/entities 201 - ${response}= Create Entity ${second_entity_payload_filename} ${entity_id} + ${response}= Create Entity ${second_entity_payload_filename} ${entity_id2} Check Response Status Code 201 ${response.status_code} Wait For Request @@ -34,14 +36,14 @@ D018_02_01 Check Post Via Header Forwarding To Context Source Dictionary Should Contain Key ${payload} Via D018_02_02 Check Update Via Header Forwarding To Context Source - [Documentation] Verify that the request contains the Via header when forwarding operations to the Context Source + [Documentation] Verify that the request contains the PATCH Via header when forwarding operations to the Context Source [Tags] since_v1.8.1 dist-ops 4_3_3 cf_06 additive-inclusive 5_6_6 6_3_18 - Set Stub Reply PATCH /broker1/ngsi-ld/v1/entities/${entity_id} 204 + Set Stub Reply PATCH /broker1/ngsi-ld/v1/entities/${entity_id}/attrs/ 204 ${response}= Update Entity Attributes ... ${entity_id} ... ${brandname_payload_filename} - ... content_type=${CONTENT_TYPE_LD_JSON} + ... ${CONTENT_TYPE_LD_JSON} Check Response Status Code 204 ${response.status_code} Wait For Request @@ -50,7 +52,7 @@ D018_02_02 Check Update Via Header Forwarding To Context Source Dictionary Should Contain Key ${payload} Via D018_02_03 Check Delete Via Header Forwarding To Context Source - [Documentation] Verify that the request contains the Via header when forwarding operations to the Context Source + [Documentation] Verify that the request contains the DELETE Via header when forwarding operations to the Context Source [Tags] since_v1.8.1 dist-ops 4_3_3 cf_06 additive-inclusive 5_6_6 6_3_18 Set Stub Reply DELETE /broker1/ngsi-ld/v1/entities/${entity_id} 204 @@ -63,14 +65,15 @@ D018_02_03 Check Delete Via Header Forwarding To Context Source Dictionary Should Contain Key ${payload} Via D018_02_04 Check Put Via Header Forwarding To Context Source - [Documentation] Verify that the request contains the Via header when forwarding operations to the Context Source + [Documentation] Verify that the request contains the PUT Via header when forwarding operations to the Context Source [Tags] since_v1.8.1 dist-ops 4_3_3 cf_06 additive-inclusive 5_6_6 6_3_18 Set Stub Reply PUT /broker1/ngsi-ld/v1/entities/${entity_id} 204 ${response}= Replace Entity ... ${entity_id} - ... ${second_entity_payload_filename} - ... ${CONTENT_TYPE_LD_JSON} + ... ${third_entity_payload_filename} + ... ${CONTENT_TYPE_JSON} + ... context=${ngsild_test_suite_context} Check Response Status Code 204 ${response.status_code} Wait For Request @@ -79,7 +82,7 @@ D018_02_04 Check Put Via Header Forwarding To Context Source Dictionary Should Contain Key ${payload} Via D018_02_05 Check Get Via Header Forwarding To Context Source - [Documentation] Verify that the request contains the Via header when forwarding operations to the Context Source + [Documentation] Verify that the request contains the GET Via header when forwarding operations to the Context Source [Tags] since_v1.8.1 dist-ops 4_3_3 cf_06 additive-inclusive 5_6_6 6_3_18 Set Stub Reply GET /broker1/ngsi-ld/v1/entities/${entity_id} 200 @@ -95,6 +98,8 @@ D018_02_05 Check Get Via Header Forwarding To Context Source Create Entity And Registration On The Context Broker And Start Context Source Mock Server ${entity_id}= Generate Random Vehicle Entity Id Set Suite Variable ${entity_id} + ${entity_id2}= Generate Random Vehicle Entity Id + Set Suite Variable ${entity_id2} ${response}= Create Entity ${first_entity_payload_filename} ${entity_id} Check Response Status Code 201 ${response.status_code} @@ -103,7 +108,7 @@ Create Entity And Registration On The Context Broker And Start Context Source Mo ${registration_payload}= Prepare Context Source Registration From File ... ${registration_id} ... ${registration_payload_file_path} - ... entity_id=${entity_id} + ... entity_id_pattern=${entity_pattern} ... mode=inclusive ... endpoint=/broker1 ${response}= Create Context Source Registration With Return ${registration_payload} @@ -113,5 +118,6 @@ Create Entity And Registration On The Context Broker And Start Context Source Mo Delete Registrations And Stop Context Source Mock Server Delete Entity ${entity_id} + Delete Entity ${entity_id2} Delete Context Source Registration ${registration_id} Stop Context Source Mock Server -- GitLab