diff --git a/TP/NGSI-LD/ContextInformation/Subscription/CreateSubscription/028_01.robot b/TP/NGSI-LD/ContextInformation/Subscription/CreateSubscription/028_01.robot index 8c618ad7276147abd7a2a39f5fc837f4df12389d..ef67897cb6abca8d504aec7a501d257a32a5756f 100644 --- a/TP/NGSI-LD/ContextInformation/Subscription/CreateSubscription/028_01.robot +++ b/TP/NGSI-LD/ContextInformation/Subscription/CreateSubscription/028_01.robot @@ -29,7 +29,8 @@ ${subscription_expectation_file_path}= subscriptions/expectations/subscript ... id=${subscription_id} ... accept=${CONTENT_TYPE_LD_JSON} ... context=${ngsild_test_suite_context} - Check Created Resource Set To ${expected_subscription} ${response1.json()} + ${ignore_keys}= Create List "jsonldContext" "timesFailed" "timesSent" "notificationTrigger" + Check Created Resource Set To ${expected_subscription} ${response1.json()} ${ignore_keys} *** Keywords *** diff --git a/TP/NGSI-LD/ContextInformation/Subscription/RetrieveSubscription/030_03.robot b/TP/NGSI-LD/ContextInformation/Subscription/RetrieveSubscription/030_03.robot index 69baa4d00be394a1f05b93f096b6223358fa89b1..351d61b07fd095687a7e6d679ad5237e2b8e5f85 100644 --- a/TP/NGSI-LD/ContextInformation/Subscription/RetrieveSubscription/030_03.robot +++ b/TP/NGSI-LD/ContextInformation/Subscription/RetrieveSubscription/030_03.robot @@ -23,10 +23,12 @@ ${expectation_file_path}= subscriptions/expectations/subscriptions ... id=${subscription_id} ... context=${ngsild_test_suite_context} Check Response Status Code 200 ${response.status_code} + ${ignore_keys}= Create List "jsonldContext" "timesFailed" "timesSent" "notificationTrigger" Check Response Body Containing Subscription element ... ${expectation_file_path} ... ${subscription_id} ... ${response.json()} + ... ${ignore_keys} *** Keywords *** diff --git a/TP/NGSI-LD/ContextInformation/Subscription/UpdateSubscription/029_05.robot b/TP/NGSI-LD/ContextInformation/Subscription/UpdateSubscription/029_05.robot index f5100d6a85b7fbc3c30be9006e4794bfa1f1ec86..2923a37e963cb2faae9d4afd69961ca7fe079fe8 100644 --- a/TP/NGSI-LD/ContextInformation/Subscription/UpdateSubscription/029_05.robot +++ b/TP/NGSI-LD/ContextInformation/Subscription/UpdateSubscription/029_05.robot @@ -30,10 +30,12 @@ ${expected_expanded_subscription_payload_file_path}= subscriptions/expectatio ${response1}= Retrieve Subscription ... id=${subscription_id} ... context=${ngsild_test_suite_context} + ${ignore_keys}= Create List "jsonldContext" "timesFailed" "timesSent" "notificationTrigger" Check Response Body Containing Subscription element ... ${expected_subscription_payload_file_path} ... ${subscription_id} ... ${response1.json()} + ... ${ignore_keys} 029_05_02 Update Subscription With Term to Uri Expansion without Context [Documentation] Check that one can update a subcription: Term to URI expansion of Attribute names shall be observed diff --git a/TP/NGSI-LD/ContextInformation/Subscription/UpdateSubscription/029_06.robot b/TP/NGSI-LD/ContextInformation/Subscription/UpdateSubscription/029_06.robot index 45b847e297c51fa3908a021cc816888c8efadc3e..99aa8eceef3651a1bea50a3389e4de1782b75a96 100644 --- a/TP/NGSI-LD/ContextInformation/Subscription/UpdateSubscription/029_06.robot +++ b/TP/NGSI-LD/ContextInformation/Subscription/UpdateSubscription/029_06.robot @@ -31,7 +31,7 @@ ${subscription_update_fragment_file_path}= subscriptions/fragments/subscrip ... id=${subscription_id} ... accept=${CONTENT_TYPE_LD_JSON} ... context=${ngsild_test_suite_context} - ${ignored_attributes}= Create List ${status_regex_expr} notificationTrigger + ${ignored_attributes}= Create List ${status_regex_expr} "jsonldContext" "timesFailed" "timesSent" "notificationTrigger" Check Updated Resource Set To ... updated_resource=${subscription} ... response_body=${response1.json()} diff --git a/doc/analysis/checks.py b/doc/analysis/checks.py index 61c260e355dcc04fc562a75a6d014e6da3300d7c..9eb23fab5684e46efebe720ea2723678be2691f0 100644 --- a/doc/analysis/checks.py +++ b/doc/analysis/checks.py @@ -310,8 +310,8 @@ class Checks: 'position': [0, 1] }, 'Check Response Body Containing Subscription element': { - 'params': ['filename', 'subscription_id', 'response_body'], - 'position': [0, 1, 2] + 'params': ['filename', 'subscription_id', 'response_body', 'additional_ignored_keys'], + 'position': [0, 1, 2, 3] }, 'Wait for notification': { 'params': ['timeout'], diff --git a/resources/AssertionUtils.resource b/resources/AssertionUtils.resource index 1cb78c3fc109789d8a3d0e5852f948693feac065..bde600c79e6b801f1d83cdbbbef77314c62b20f7 100755 --- a/resources/AssertionUtils.resource +++ b/resources/AssertionUtils.resource @@ -232,10 +232,13 @@ Check Response Body Containing List Containing EntityTemporal elements Should Be Empty ${comparison_result} msg=${comparison_result.pretty()} Check Response Body Containing Subscription element - [Arguments] ${expectation_filename} ${subscription_id} ${response_body} + [Arguments] ${expectation_filename} ${subscription_id} ${response_body} ${additional_ignored_keys}=None ${subscription_payload}= Load JSON From File ${EXECDIR}/data/${expectation_filename} ${subscription}= Update Value To JSON ${subscription_payload} $..id ${subscription_id} ${ignored_keys}= Create List ${context_regex_expr} + IF ${additional_ignored_keys} != None + Extend List ${ignored_keys} ${additional_ignored_keys} + END ${comparison_result}= Compare Dictionaries Ignoring Keys ... ${subscription} ... ${response_body} @@ -253,7 +256,7 @@ Check Response Body Containing List Containing Subscription elements ... ${subscription_id} ${index}= Evaluate ${index} + 1 END - ${ignored_keys}= Create List ${context_regex_expr} + ${ignored_keys}= Create List ${context_regex_expr} "jsonldContext" "timesFailed" "timesSent" "notificationTrigger" ${comparison_result}= Compare Dictionaries Ignoring Keys ... ${subscription_payload} ... ${response_body}