From 18283645a707374fd065a9ec08800d1ab4285d9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fernando=20L=C3=B3pez=20Aguilar?= Date: Tue, 12 Sep 2023 21:02:11 +0200 Subject: [PATCH 1/5] Correct the TS --- .../Consumption/Entity/QueryEntities/019_02_01.robot | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_02_01.robot b/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_02_01.robot index cc7199b4..16e60ab3 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_02_01.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_02_01.robot @@ -16,7 +16,7 @@ ${entity_type}= https://ngsi-ld-test-suite/context#Building *** Test Cases *** -Query several entities via POST Interaction based on ids +019_02_01 Query several entities via POST Interaction based on ids [Documentation] Check that you can query several entities via POST Interaction based on ids [Tags] e-query 5_7_2 ${first_entity_id}= Generate Random Entity Id ${building_id_prefix} @@ -26,11 +26,6 @@ Query several entities via POST Interaction based on ids ... ${first_entity_id} ... ${CONTENT_TYPE_LD_JSON} Check Response Status Code 201 ${response.status_code} - ${response}= Create Entity Selecting Content Type - ... ${filename} - ... ${first_entity_id} - ... ${CONTENT_TYPE_LD_JSON} - Check Response Status Code 201 ${response.status_code} ${second_entity_id}= Generate Random Entity Id ${building_id_prefix} Set Suite Variable ${second_entity_id} ${response}= Create Entity Selecting Content Type @@ -45,6 +40,11 @@ Query several entities via POST Interaction based on ids ... ${third_entity_id} ... ${CONTENT_TYPE_LD_JSON} Check Response Status Code 201 ${response.status_code} + ${response}= Create Entity Selecting Content Type + ... ${filename} + ... ${third_entity_id} + ... ${CONTENT_TYPE_LD_JSON} + Check Response Status Code 409 ${response.status_code} @{entities_ids_to_be_compared}= Create List ${first_entity_id} ${second_entity_id} ${entities_ids_to_be_retrieved}= Catenate SEPARATOR=, ${first_entity_id} ${second_entity_id} ${entity_types_to_be_retrieved}= Catenate SEPARATOR=, ${entity_type} -- GitLab From 5c1f46442c9e39f5d7523b84d830099977e4f185 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fernando=20L=C3=B3pez=20Aguilar?= Date: Tue, 12 Sep 2023 21:53:49 +0200 Subject: [PATCH 2/5] Correction an error in the response.status_code --- .../Registration/CreateContextSourceRegistration/033_02.robot | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/TP/NGSI-LD/ContextSource/Registration/CreateContextSourceRegistration/033_02.robot b/TP/NGSI-LD/ContextSource/Registration/CreateContextSourceRegistration/033_02.robot index 97fda2bb..21d13f5f 100644 --- a/TP/NGSI-LD/ContextSource/Registration/CreateContextSourceRegistration/033_02.robot +++ b/TP/NGSI-LD/ContextSource/Registration/CreateContextSourceRegistration/033_02.robot @@ -45,7 +45,7 @@ Create a context source registration with invalid JSON file ${registration_id}= Generate Random Entity Id ${registration_id_prefix} ${response}= Create Context Source Registration ... ${registration_payload_file_path} - Check Response Status Code ${response.status_code} + Check Response Status Code 400 ${response.status_code} Check Response Body Type When Using Session Request ${response.json()} ${ERROR_TYPE_BAD_REQUEST_DATA} Check Response Body Title When Using Session Request ${response.json()} [Teardown] Delete Entity by Id Returning Response ${registration_id} -- GitLab From e6cd6cd3514744bc9f6aac4198f391d46233291c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fernando=20L=C3=B3pez=20Aguilar?= Date: Tue, 12 Sep 2023 22:09:33 +0200 Subject: [PATCH 3/5] Resolution bug --- .../CreateContextSourceRegistration/033_04.robot | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/TP/NGSI-LD/ContextSource/Registration/CreateContextSourceRegistration/033_04.robot b/TP/NGSI-LD/ContextSource/Registration/CreateContextSourceRegistration/033_04.robot index 7a4ac3e6..2189823f 100644 --- a/TP/NGSI-LD/ContextSource/Registration/CreateContextSourceRegistration/033_04.robot +++ b/TP/NGSI-LD/ContextSource/Registration/CreateContextSourceRegistration/033_04.robot @@ -14,7 +14,7 @@ ${registration_payload_file_path}= csourceRegistrations/context-source-regi *** Test Cases *** -Create one context source registration using a provided Link header with JSON content type +025_01_01 Create one context source registration using a provided Link header with JSON content type [Documentation] Check that the @context is obtained from a Link Header if the Content-Type header is "application/json" [Tags] csr-create 6_3_5 ${registration_id}= Generate Random Entity Id ${registration_id_prefix} @@ -27,10 +27,10 @@ Create one context source registration using a provided Link header with JSON co ... ${ngsild_test_suite_context} Check Response Status Code 201 ${response.status_code} ${response}= Retrieve Context Source Registration ${registration_id} context=${ngsild_test_suite_context} - Check JSON Value In Response Body ['information']['entities'][0]['type'] Building ${response.json()} + Check JSON Value In Response Body ['information'][0]['entities'][0]['type'] Building ${response.json()} ${response}= Retrieve Context Source Registration ${registration_id} Check JSON Value In Response Body - ... ['information']['entities'][0]['type'] + ... ['information'][0]['entities'][0]['type'] ... https://ngsi-ld-test-suite/context#Building ... ${response.json()} -- GitLab From cfbaf296953a44ff6c195e1483c889e5cc1f3390 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fernando=20L=C3=B3pez=20Aguilar?= Date: Tue, 12 Sep 2023 22:13:40 +0200 Subject: [PATCH 4/5] Resolution bug --- .../CreateContextSourceRegistration/033_04.robot | 2 +- .../CreateContextSourceRegistration/033_05.robot | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/TP/NGSI-LD/ContextSource/Registration/CreateContextSourceRegistration/033_04.robot b/TP/NGSI-LD/ContextSource/Registration/CreateContextSourceRegistration/033_04.robot index 2189823f..9e4d9e47 100644 --- a/TP/NGSI-LD/ContextSource/Registration/CreateContextSourceRegistration/033_04.robot +++ b/TP/NGSI-LD/ContextSource/Registration/CreateContextSourceRegistration/033_04.robot @@ -14,7 +14,7 @@ ${registration_payload_file_path}= csourceRegistrations/context-source-regi *** Test Cases *** -025_01_01 Create one context source registration using a provided Link header with JSON content type +033_04_01 Create one context source registration using a provided Link header with JSON content type [Documentation] Check that the @context is obtained from a Link Header if the Content-Type header is "application/json" [Tags] csr-create 6_3_5 ${registration_id}= Generate Random Entity Id ${registration_id_prefix} diff --git a/TP/NGSI-LD/ContextSource/Registration/CreateContextSourceRegistration/033_05.robot b/TP/NGSI-LD/ContextSource/Registration/CreateContextSourceRegistration/033_05.robot index a22690bf..6864dd43 100644 --- a/TP/NGSI-LD/ContextSource/Registration/CreateContextSourceRegistration/033_05.robot +++ b/TP/NGSI-LD/ContextSource/Registration/CreateContextSourceRegistration/033_05.robot @@ -14,7 +14,7 @@ ${registration_payload_file_path}= csourceRegistrations/context-source-regi *** Test Cases *** -Create one context source registration using the default context with JSON content type +033_05_01 Create one context source registration using the default context with JSON content type [Documentation] Check that the default @context is used if the Content-Type header is "application/json" and the Link header does not contain a JSON-LD @context [Tags] csr-create 6_3_5 ${registration_id}= Generate Random Entity Id ${registration_id_prefix} @@ -27,11 +27,11 @@ Create one context source registration using the default context with JSON conte Check Response Status Code 201 ${response.status_code} ${response}= Retrieve Context Source Registration ${registration_id} context=${ngsild_test_suite_context} Check JSON Value In Response Body - ... ['information']['entities'][0]['type'] + ... ['information'][0]['entities'][0]['type'] ... ngsi-ld:default-context/Building ... ${response.json()} ${response}= Retrieve Context Source Registration ${registration_id} - Check JSON Value In Response Body ['information']['entities'][0]['type'] Building ${response.json()} + Check JSON Value In Response Body ['information'][0]['entities'][0]['type'] Building ${response.json()} *** Keywords *** -- GitLab From 8597622dd512e7abe129797ec80e9d1b1f017607 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fernando=20L=C3=B3pez=20Aguilar?= Date: Tue, 12 Sep 2023 22:19:05 +0200 Subject: [PATCH 5/5] Resolution bugs --- .../CreateContextSourceRegistration/033_07.robot | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/TP/NGSI-LD/ContextSource/Registration/CreateContextSourceRegistration/033_07.robot b/TP/NGSI-LD/ContextSource/Registration/CreateContextSourceRegistration/033_07.robot index 7af118db..d80bfecd 100644 --- a/TP/NGSI-LD/ContextSource/Registration/CreateContextSourceRegistration/033_07.robot +++ b/TP/NGSI-LD/ContextSource/Registration/CreateContextSourceRegistration/033_07.robot @@ -14,7 +14,7 @@ ${registration_payload_file_path}= csourceRegistrations/context-source-regi *** Test Cases *** -Create one context source registration using a JSON-LD @context obtained from the request payload +033_07_01 Create one context source registration using a JSON-LD @context obtained from the request payload [Documentation] Check that the @context is obtained from the request payload body itself if the Content-Type header is "application/ld+json" [Tags] csr-create 6_3_5 ${registration_id}= Generate Random Entity Id ${registration_id_prefix} @@ -26,10 +26,10 @@ Create one context source registration using a JSON-LD @context obtained from th ... ${CONTENT_TYPE_LD_JSON} Check Response Status Code 201 ${response.status_code} ${response}= Retrieve Context Source Registration ${registration_id} context=${ngsild_test_suite_context} - Check JSON Value In Response Body ['information']['entities'][0]['type'] Building ${response.json()} + Check JSON Value In Response Body ['information'][0]['entities'][0]['type'] Building ${response.json()} ${response}= Retrieve Context Source Registration ${registration_id} Check JSON Value In Response Body - ... ['information']['entities'][0]['type'] + ... ['information'][0]['entities'][0]['type'] ... https://ngsi-ld-test-suite/context#Building ... ${response.json()} -- GitLab