From 954a7e51466a3432561ad8797390bc20537acada Mon Sep 17 00:00:00 2001 From: kzangeli Date: Sun, 31 May 2026 22:30:07 +0200 Subject: [PATCH] fix: lowercase boolean URL params (local=true, deleteAll=true) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit NGSI-LD § 4 (URL parameter conventions) and RFC 3986 § 6.2.2.1 both specify that URL parameter values are case-sensitive. The spec uses the literal lowercase tokens `true` and `false` throughout. Nine call sites across eight tests passed `local=${True}` (or `${true}`) — Robot Framework's `${True}`/`${true}` is Python's `True`, which the requests library serializes as the string "True" (capital T) in URL parameters. Plus one `deleteAll=${true}` in 046_22_08. Brokers that strictly enforce the spec's case- sensitive convention correctly reject this as 400 BadRequestData; the affected tests were never reaching their intended assertions. Replaced all nine occurrences with the literal lowercase `true`. Affected tests: - 046_22_08 (deleteAll=true on DELETE attrs) - D010_01_exc, D010_02_exc, D010_02_red - D002_01_exc, D002_02_exc - D003_02_exc, D004_01_exc Verified on swBroker: D010_02_red, D010_02_exc, D002_01_exc, and 046_22_08 now pass cleanly. The remaining four tests still fail — but at strictly later errors (stub-call counts, mock-server timeouts, unexpected 204s) rather than the parseBool 400, exposing unrelated test-side or broker-logic issues that the case-sensitivity rejection had been masking. Those will be addressed independently. Co-Authored-By: Claude Opus 4.7 --- .../SubscriptionNotificationBehaviour/046_22_08.robot | 2 +- .../Consumption/Entity/RetrieveEntity/D010_01_exc.robot | 2 +- .../Consumption/Entity/RetrieveEntity/D010_02_exc.robot | 4 ++-- .../Consumption/Entity/RetrieveEntity/D010_02_red.robot | 2 +- .../Provision/Entities/DeleteEntity/D002_01_exc.robot | 2 +- .../Provision/Entities/DeleteEntity/D002_02_exc.robot | 2 +- .../EntityAttributes/AppendEntityAttributes/D003_02_exc.robot | 2 +- .../EntityAttributes/UpdateEntityAttributes/D004_01_exc.robot | 2 +- 8 files changed, 9 insertions(+), 9 deletions(-) diff --git a/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_22_08.robot b/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_22_08.robot index d1b921f0..6e412324 100644 --- a/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_22_08.robot +++ b/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_22_08.robot @@ -27,7 +27,7 @@ ${entity_expectation_file_path}= entity-deleted-name-attribute-instance-n ... entityId=${entity_id} ... attributeId=name ... datasetId=${EMPTY} - ... deleteAll=${true} + ... deleteAll=true ... context=${ngsild_test_suite_context} Check Response Status Code 204 ${response.status_code} diff --git a/TP/NGSI-LD/DistributedOperations/Consumption/Entity/RetrieveEntity/D010_01_exc.robot b/TP/NGSI-LD/DistributedOperations/Consumption/Entity/RetrieveEntity/D010_01_exc.robot index 98af5396..994e6cda 100644 --- a/TP/NGSI-LD/DistributedOperations/Consumption/Entity/RetrieveEntity/D010_01_exc.robot +++ b/TP/NGSI-LD/DistributedOperations/Consumption/Entity/RetrieveEntity/D010_01_exc.robot @@ -42,7 +42,7 @@ Create Entity And Registration On The Context Broker And Start Context Source Mo ${entity_id}= Generate Random Vehicle Entity Id Set Suite Variable ${entity_id} - ${response}= Create Entity ${entity_payload_filename} ${entity_id} local=${True} + ${response}= Create Entity ${entity_payload_filename} ${entity_id} local=true Check Response Status Code 201 ${response.status_code} ${registration_id}= Generate Random CSR Id diff --git a/TP/NGSI-LD/DistributedOperations/Consumption/Entity/RetrieveEntity/D010_02_exc.robot b/TP/NGSI-LD/DistributedOperations/Consumption/Entity/RetrieveEntity/D010_02_exc.robot index 382fe549..91f259d9 100644 --- a/TP/NGSI-LD/DistributedOperations/Consumption/Entity/RetrieveEntity/D010_02_exc.robot +++ b/TP/NGSI-LD/DistributedOperations/Consumption/Entity/RetrieveEntity/D010_02_exc.robot @@ -28,7 +28,7 @@ D010_02_exc Query Context Broker And Retrieve Entity By Id ${entity_speed}= Load Entity ${entity_speed_filename} ${entity_id} Set Stub Reply GET /broker1/ngsi-ld/v1/entities/${entity_id} 200 ${entity_speed} - ${response}= Retrieve Entity ${entity_id} context=${ngsild_test_suite_context} local=${True} + ${response}= Retrieve Entity ${entity_id} context=${ngsild_test_suite_context} local=true Dictionary Should Not Contain Key ${response.json()} speed *** Keywords *** @@ -36,7 +36,7 @@ Create Entity And Registration On The Context Broker And Start Context Source Mo ${entity_id}= Generate Random Vehicle Entity Id Set Suite Variable ${entity_id} - ${response}= Create Entity ${entity_payload_filename} ${entity_id} local=${True} + ${response}= Create Entity ${entity_payload_filename} ${entity_id} local=true Check Response Status Code 201 ${response.status_code} ${registration_id}= Generate Random CSR Id diff --git a/TP/NGSI-LD/DistributedOperations/Consumption/Entity/RetrieveEntity/D010_02_red.robot b/TP/NGSI-LD/DistributedOperations/Consumption/Entity/RetrieveEntity/D010_02_red.robot index ebb5abca..2156cf15 100644 --- a/TP/NGSI-LD/DistributedOperations/Consumption/Entity/RetrieveEntity/D010_02_red.robot +++ b/TP/NGSI-LD/DistributedOperations/Consumption/Entity/RetrieveEntity/D010_02_red.robot @@ -33,7 +33,7 @@ D010_02_red Query Context Broker And Retrieve Entity By Id ${response}= Retrieve Entity ... ${entity_id} ... context=${ngsild_test_suite_context} - ... local=${true} + ... local=true Check Response Status Code 404 ${response.status_code} ${stub_count}= Get Stub Count GET /broker1/ngsi-ld/v1/entities/${entity_id} diff --git a/TP/NGSI-LD/DistributedOperations/Provision/Entities/DeleteEntity/D002_01_exc.robot b/TP/NGSI-LD/DistributedOperations/Provision/Entities/DeleteEntity/D002_01_exc.robot index 619d5e42..57537c00 100644 --- a/TP/NGSI-LD/DistributedOperations/Provision/Entities/DeleteEntity/D002_01_exc.robot +++ b/TP/NGSI-LD/DistributedOperations/Provision/Entities/DeleteEntity/D002_01_exc.robot @@ -40,7 +40,7 @@ Create Entity And Registration On The Context Broker And Start Context Source Mo ${entity_id}= Generate Random Vehicle Entity Id Set Suite Variable ${entity_id} - ${response}= Create Entity ${entity_payload_filename} ${entity_id} local=${True} + ${response}= Create Entity ${entity_payload_filename} ${entity_id} local=true Check Response Status Code 201 ${response.status_code} ${registration_id}= Generate Random CSR Id diff --git a/TP/NGSI-LD/DistributedOperations/Provision/Entities/DeleteEntity/D002_02_exc.robot b/TP/NGSI-LD/DistributedOperations/Provision/Entities/DeleteEntity/D002_02_exc.robot index 808aea69..da4bbb69 100644 --- a/TP/NGSI-LD/DistributedOperations/Provision/Entities/DeleteEntity/D002_02_exc.robot +++ b/TP/NGSI-LD/DistributedOperations/Provision/Entities/DeleteEntity/D002_02_exc.robot @@ -39,7 +39,7 @@ Create Entity And Registration On The Context Broker And Start Context Source Mo ${entity_id}= Generate Random Vehicle Entity Id Set Suite Variable ${entity_id} - ${response}= Create Entity ${entity_payload_filename} ${entity_id} local=${True} + ${response}= Create Entity ${entity_payload_filename} ${entity_id} local=true Check Response Status Code 201 ${response.status_code} ${registration_id}= Generate Random CSR Id diff --git a/TP/NGSI-LD/DistributedOperations/Provision/EntityAttributes/AppendEntityAttributes/D003_02_exc.robot b/TP/NGSI-LD/DistributedOperations/Provision/EntityAttributes/AppendEntityAttributes/D003_02_exc.robot index 084015b5..61960a02 100644 --- a/TP/NGSI-LD/DistributedOperations/Provision/EntityAttributes/AppendEntityAttributes/D003_02_exc.robot +++ b/TP/NGSI-LD/DistributedOperations/Provision/EntityAttributes/AppendEntityAttributes/D003_02_exc.robot @@ -41,7 +41,7 @@ Create Entity And Registration On The Context Broker And Start Context Source Mo ${entity_id}= Generate Random Vehicle Entity Id Set Suite Variable ${entity_id} - ${response}= Create Entity ${entity_payload_filename} ${entity_id} local=${True} + ${response}= Create Entity ${entity_payload_filename} ${entity_id} local=true Check Response Status Code 201 ${response.status_code} ${registration_id}= Generate Random CSR Id diff --git a/TP/NGSI-LD/DistributedOperations/Provision/EntityAttributes/UpdateEntityAttributes/D004_01_exc.robot b/TP/NGSI-LD/DistributedOperations/Provision/EntityAttributes/UpdateEntityAttributes/D004_01_exc.robot index 3811a848..dade0db1 100644 --- a/TP/NGSI-LD/DistributedOperations/Provision/EntityAttributes/UpdateEntityAttributes/D004_01_exc.robot +++ b/TP/NGSI-LD/DistributedOperations/Provision/EntityAttributes/UpdateEntityAttributes/D004_01_exc.robot @@ -42,7 +42,7 @@ Create Entity And Registration On The Context Broker And Start Context Source Mo ${entity_id}= Generate Random Vehicle Entity Id Set Suite Variable ${entity_id} - ${response}= Create Entity ${entity_payload_filename} ${entity_id} local=${True} + ${response}= Create Entity ${entity_payload_filename} ${entity_id} local=true Check Response Status Code 201 ${response.status_code} ${registration_id}= Generate Random CSR Id -- GitLab