From 7475ef0720bd7677d7c9c48a05f2b8f4d202b823 Mon Sep 17 00:00:00 2001 From: gpoujol Date: Thu, 1 Jun 2023 15:53:47 +0200 Subject: [PATCH] fix: forgot to use argument for one function, reformat some file and fix some errors --- .../Consumption/Entity/QueryEntities/019_01_01.robot | 1 - .../Consumption/Entity/QueryEntities/019_01_02.robot | 1 - .../Consumption/Entity/QueryEntities/019_01_03.robot | 1 - .../Consumption/Entity/QueryEntities/019_01_04.robot | 1 - .../Consumption/Entity/QueryEntities/019_01_05.robot | 1 - .../Consumption/Entity/QueryEntities/019_02_01.robot | 1 - .../Consumption/Entity/QueryEntities/019_02_02.robot | 1 - .../Consumption/Entity/QueryEntities/019_02_03.robot | 1 - .../Consumption/Entity/QueryEntities/019_02_04.robot | 1 - .../Consumption/Entity/QueryEntities/019_02_05.robot | 1 - .../Consumption/Entity/QueryEntities/019_03_01.robot | 1 - .../Consumption/Entity/QueryEntities/019_03_02.robot | 1 - .../Consumption/Entity/QueryEntities/019_03_03.robot | 1 - .../Consumption/Entity/QueryEntities/019_03_04.robot | 1 - .../Consumption/Entity/QueryEntities/019_03_05.robot | 1 - .../Consumption/Entity/QueryEntities/019_04.robot | 1 - .../Consumption/Entity/QueryEntities/019_05.robot | 1 - .../Consumption/Entity/QueryEntities/019_06.robot | 1 - .../Subscription/CreateSubscription/028_01.robot | 2 ++ .../Subscription/CreateSubscription/028_04.robot | 2 ++ .../038_02.robot | 2 +- resources/AssertionUtils.resource | 8 -------- resources/HttpUtils.resource | 3 ++- 23 files changed, 7 insertions(+), 28 deletions(-) diff --git a/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_01_01.robot b/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_01_01.robot index c5e99b57..ed65fa40 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_01_01.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_01_01.robot @@ -53,7 +53,6 @@ Query several entities based on ids ... ${response.json()} - *** Keywords *** Delete Entities Delete Entity by Id Returning Response ${first_entity_id} diff --git a/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_01_02.robot b/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_01_02.robot index c6b3284a..c2f7962c 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_01_02.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_01_02.robot @@ -56,7 +56,6 @@ Query several entities based on the entities types ... ${response.json()} - *** Keywords *** Delete Entities Delete Entity by Id Returning Response ${building_entity_id} diff --git a/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_01_03.robot b/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_01_03.robot index f14f2d82..72a618ae 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_01_03.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_01_03.robot @@ -46,7 +46,6 @@ Query several entities based on the given id pattern ... ${response.json()} - *** Keywords *** Delete Entities Delete Entity by Id Returning Response ${first_entity_id} diff --git a/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_01_04.robot b/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_01_04.robot index e4a4b8ed..272a1ee7 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_01_04.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_01_04.robot @@ -53,7 +53,6 @@ Query several entities based on attribute names ... ${expectation_filename} ... ${entities_ids_to_be_compared} ... ${response.json()} - [Teardown] Delete Entities ${first_entity_id} ${second_entity_id} *** Keywords *** diff --git a/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_01_05.robot b/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_01_05.robot index fe67c7db..99cc51c3 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_01_05.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_01_05.robot @@ -48,7 +48,6 @@ Query several entities based on a list of properties ... ${response.json()} - *** Keywords *** Delete Entities Delete Entity by Id Returning Response ${first_entity_id} 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 4121d010..cc7199b4 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 @@ -58,7 +58,6 @@ Query several entities via POST Interaction based on ids ... ${response.json()} - *** Keywords *** Delete Entities Delete Entity by Id Returning Response ${first_entity_id} diff --git a/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_02_02.robot b/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_02_02.robot index e258d448..8c512bbc 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_02_02.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_02_02.robot @@ -56,7 +56,6 @@ Query several entities via POST Interaction based on the entities types ... ${response.json()} - *** Keywords *** Delete Entities Delete Entity by Id Returning Response ${building_entity_id} diff --git a/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_02_03.robot b/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_02_03.robot index 3e99510f..a1721f0f 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_02_03.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_02_03.robot @@ -46,7 +46,6 @@ Query several entities via POST Interaction based on the given id pattern ... ${response.json()} - *** Keywords *** Delete Entities Delete Entity by Id Returning Response ${first_entity_id} diff --git a/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_02_04.robot b/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_02_04.robot index 12dc6cbc..24f80776 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_02_04.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_02_04.robot @@ -47,7 +47,6 @@ Query several entities via POST Interaction based on attribute names ... ${response.json()} - *** Keywords *** Delete Entities Delete Entity by Id Returning Response ${first_entity_id} diff --git a/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_02_05.robot b/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_02_05.robot index 0a9f36bf..341131df 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_02_05.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_02_05.robot @@ -46,7 +46,6 @@ Query several entities via POST Interaction based on a list of properties ... ${response.json()} - *** Keywords *** Delete Entities Delete Entity by Id Returning Response ${first_entity_id} diff --git a/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_03_01.robot b/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_03_01.robot index 4a67b778..1dfa4dc1 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_03_01.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_03_01.robot @@ -46,7 +46,6 @@ Query entities based on incorrect ids Check Response Body Containing ProblemDetails Element Containing Title Element ${response.json()} - *** Keywords *** Delete Entities Delete Entity by Id Returning Response ${first_entity_id} diff --git a/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_03_02.robot b/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_03_02.robot index d6b7d2f4..dec550f8 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_03_02.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_03_02.robot @@ -47,7 +47,6 @@ Query entities based on incorrect entity types Check Response Body Containing ProblemDetails Element Containing Title Element ${response.json()} - *** Keywords *** Delete Entities Delete Entity by Id Returning Response ${building_entity_id} diff --git a/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_03_03.robot b/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_03_03.robot index 1a204195..f676b05f 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_03_03.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_03_03.robot @@ -44,7 +44,6 @@ Query several entities based on incorrect id pattern Check Response Body Containing ProblemDetails Element Containing Title Element ${response.json()} - *** Keywords *** Delete Entities Delete Entity by Id Returning Response ${first_entity_id} diff --git a/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_03_04.robot b/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_03_04.robot index 2b545522..56c089cb 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_03_04.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_03_04.robot @@ -43,7 +43,6 @@ Query several entities based on incorrect attribute names Check Response Body Containing ProblemDetails Element Containing Title Element ${response.json()} - *** Keywords *** Delete Entities Delete Entity by Id Returning Response ${first_entity_id} diff --git a/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_03_05.robot b/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_03_05.robot index 190d8a8a..4c037f03 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_03_05.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_03_05.robot @@ -51,7 +51,6 @@ Query entitites when the request has a wrong geometryProperty Check Response Body Containing ProblemDetails Element Containing Title Element ${response.json()} - *** Keywords *** Delete Entities Delete Entity by Id Returning Response ${first_entity_id} diff --git a/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_04.robot b/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_04.robot index 6d84cd57..84fc6886 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_04.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_04.robot @@ -55,7 +55,6 @@ Query entities in a simplified representation ... ${response.json()} - *** Keywords *** Delete Entities Delete Entity by Id Returning Response ${first_entity_id} diff --git a/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_05.robot b/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_05.robot index f2f0e280..9b34595b 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_05.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_05.robot @@ -55,7 +55,6 @@ Get an entity by id that can be returned in a geoJSON format ... ${response.json()} - *** Keywords *** Delete Entities Delete Entity by Id Returning Response ${first_entity_id} diff --git a/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_06.robot b/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_06.robot index f2bd2ebd..610ec02e 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_06.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_06.robot @@ -55,7 +55,6 @@ Query entities specifying a maximum number of results Check Response Body Containing Number Of Entities ${entity_type} ${2} ${response.json()} - *** Keywords *** Delete Entities Delete Entity by Id Returning Response ${first_entity_id} diff --git a/TP/NGSI-LD/ContextInformation/Subscription/CreateSubscription/028_01.robot b/TP/NGSI-LD/ContextInformation/Subscription/CreateSubscription/028_01.robot index 7b2569d2..d932dbce 100644 --- a/TP/NGSI-LD/ContextInformation/Subscription/CreateSubscription/028_01.robot +++ b/TP/NGSI-LD/ContextInformation/Subscription/CreateSubscription/028_01.robot @@ -31,5 +31,7 @@ Create Subscription ... context=${ngsild_test_suite_context} Check Created Resource Set To ${expected_subscription} ${response.json()} + +*** Keywords *** Delete Initial Subscriptions Delete Subscription ${subscription_id} diff --git a/TP/NGSI-LD/ContextInformation/Subscription/CreateSubscription/028_04.robot b/TP/NGSI-LD/ContextInformation/Subscription/CreateSubscription/028_04.robot index 8af0f6e3..b37fbad1 100644 --- a/TP/NGSI-LD/ContextInformation/Subscription/CreateSubscription/028_04.robot +++ b/TP/NGSI-LD/ContextInformation/Subscription/CreateSubscription/028_04.robot @@ -33,5 +33,7 @@ Create a subscription with an id known to the system ... ${ERROR_TYPE_ALREADY_EXISTS} Check Response Body Containing ProblemDetails Element Containing Title Element ${response.json()} + +*** Keywords *** Delete Initial Subscriptions Delete Subscription ${subscription_id} diff --git a/TP/NGSI-LD/ContextSource/RegistrationSubscription/CreateContextSourceRegistrationSubscription/038_02.robot b/TP/NGSI-LD/ContextSource/RegistrationSubscription/CreateContextSourceRegistrationSubscription/038_02.robot index e54d7e86..5caf4ed3 100644 --- a/TP/NGSI-LD/ContextSource/RegistrationSubscription/CreateContextSourceRegistrationSubscription/038_02.robot +++ b/TP/NGSI-LD/ContextSource/RegistrationSubscription/CreateContextSourceRegistrationSubscription/038_02.robot @@ -19,7 +19,7 @@ Create Context Source Registration Subscription Without An Id [Tags] csrsub-create 5_11_2 ${subscription_payload}= Load Test Sample ${subscription_payload_file_path} ${response}= Create Context Source Registration Subscription ${subscription_payload} - ${subscription_id}= Fetch Id From Response Location Header + ${subscription_id}= Fetch Id From Response Location Header ${response.headers} Check Response Status Code 201 ${response.status_code} Check Response Headers Containing URI set to ${subscription_id} ${response.headers} Set Suite Variable ${subscription_id} diff --git a/resources/AssertionUtils.resource b/resources/AssertionUtils.resource index 7bb0f037..c6dd0a89 100755 --- a/resources/AssertionUtils.resource +++ b/resources/AssertionUtils.resource @@ -26,14 +26,6 @@ Check Response Body Containing Array Of URIs set to Lists Should Be Equal ${expected_entities_ids} ${response_body} ignore_order=True Check Response Body Content - [Arguments] ${expectation_filename} ${response_body} ${additional_ignored_path}=${EMPTY} - ${entity_payload}= Load Json From File ${EXECDIR}/data/entities/expectations/${expectation_filename} - ${all_ignored_paths}= Create List ${instance_id_regex_expr} ${additional_ignored_path} - ${comparison_result}= Compare Dictionaries Ignoring Keys - ... ${entity_payload} - ... ${response_body} - ... ${all_ignored_paths} - Should Be Empty ${comparison_result} msg=${comparison_result.pretty()} [Arguments] ${expectation_filename} ${response_body} ${additional_ignored_path}=${EMPTY} ${entity_payload}= Load JSON From File ${EXECDIR}/data/entities/expectations/${expectation_filename} ${all_ignored_paths}= Create List ${instance_id_regex_expr} ${additional_ignored_path} diff --git a/resources/HttpUtils.resource b/resources/HttpUtils.resource index 1dab3303..8c68b6a0 100755 --- a/resources/HttpUtils.resource +++ b/resources/HttpUtils.resource @@ -5,5 +5,6 @@ Library String *** Keywords *** Fetch Id From Response Location Header - ${id}= Fetch From Right ${response.headers['Location']} / + [Arguments] ${response_headers} + ${id}= Fetch From Right ${response_headers['Location']} / RETURN ${id} -- GitLab