From bce63fb713844f8c2ea17b0904d39176fd8f4dd1 Mon Sep 17 00:00:00 2001 From: Gustavo Lopes Date: Thu, 18 Mar 2021 21:57:53 +0000 Subject: [PATCH 1/3] added validations when the state changes --- .../Provision/EntityAttributes/010_01.robot | 24 +++++--- .../Provision/EntityAttributes/011_01.robot | 19 +++--- .../Provision/EntityAttributes/012_01.robot | 14 +++-- .../Provision/EntityAttributes/013_01.robot | 15 +++-- .../Provision/TemporalEntity/007_01.robot | 4 ++ .../Provision/TemporalEntity/008_01.robot | 5 ++ .../Provision/TemporalEntity/009_01.robot | 5 +- .../Provision/TemporalEntity/014_01.robot | 6 ++ .../Provision/TemporalEntity/015_01.robot | 15 +++-- .../Provision/TemporalEntity/017_01.robot | 6 ++ .../033_01_01.robot | 8 ++- .../033_01_02.robot | 8 ++- .../033_01_03.robot | 6 +- .../035_01.robot | 4 ++ .../034_01.robot | 20 ++++--- .../context-source-registration-sample.jsonld | 52 ++++++++++++---- ...registration-with-expiration-sample.jsonld | 4 +- ...-delete-datasetid-speed-expectation.jsonld | 31 ++++++++++ ...le-delete-default-speed-expectation.jsonld | 31 ++++++++++ ...-delete-deleteall-speed-expectation.jsonld | 21 +++++++ ...vehicle-isparked-update-expectation.jsonld | 38 ++++++++++++ ...ehicle-multi-attributes-expectation.jsonld | 38 ++++++++++++ .../vehicle-speed-appended-expectation.jsonld | 44 ++++++++++++++ ...eed-different-datasetid-expectation.jsonld | 33 ++++++++++ ...hicle-update-attributes-expectation.jsonld | 38 ++++++++++++ ...te-datasetid-attributes-expectation.jsonld | 38 ++++++++++++ .../vehicle-update-speed-expectation.jsonld | 38 ++++++++++++ ...cle-speed-two-datasetid-03-fragment.jsonld | 2 +- ...cle-speed-two-datasetid-04-fragment.jsonld | 12 +--- ...ntation-added-attribute-expectation.jsonld | 60 +++++++++++++++++++ ...ete-fuelLevel-datasetid-expectation.jsonld | 37 ++++++++++++ ...tation-delete-fuelLevel-expectation.jsonld | 33 ++++++++++ ...tion-delete-speed-instanceid-sample.jsonld | 38 ++++++++++++ ...ion-deleteall-fuelLevel-expectation.jsonld | 25 ++++++++ ...l-representation-update-expectation.jsonld | 43 +++++++++++++ ...le-temporal-intanceid-update-sample.jsonld | 12 ---- 36 files changed, 747 insertions(+), 80 deletions(-) create mode 100644 data/entities/expectations/vehicle-delete-datasetid-speed-expectation.jsonld create mode 100644 data/entities/expectations/vehicle-delete-default-speed-expectation.jsonld create mode 100644 data/entities/expectations/vehicle-delete-deleteall-speed-expectation.jsonld create mode 100644 data/entities/expectations/vehicle-isparked-update-expectation.jsonld create mode 100644 data/entities/expectations/vehicle-multi-attributes-expectation.jsonld create mode 100644 data/entities/expectations/vehicle-speed-appended-expectation.jsonld create mode 100644 data/entities/expectations/vehicle-speed-different-datasetid-expectation.jsonld create mode 100644 data/entities/expectations/vehicle-update-attributes-expectation.jsonld create mode 100644 data/entities/expectations/vehicle-update-datasetid-attributes-expectation.jsonld create mode 100644 data/entities/expectations/vehicle-update-speed-expectation.jsonld create mode 100644 data/temporalEntities/expectations/vehicle-temporal-representation-added-attribute-expectation.jsonld create mode 100644 data/temporalEntities/expectations/vehicle-temporal-representation-delete-fuelLevel-datasetid-expectation.jsonld create mode 100644 data/temporalEntities/expectations/vehicle-temporal-representation-delete-fuelLevel-expectation.jsonld create mode 100644 data/temporalEntities/expectations/vehicle-temporal-representation-delete-speed-instanceid-sample.jsonld create mode 100644 data/temporalEntities/expectations/vehicle-temporal-representation-deleteall-fuelLevel-expectation.jsonld create mode 100644 data/temporalEntities/expectations/vehicle-temporal-representation-update-expectation.jsonld delete mode 100644 data/temporalEntities/fragments/vehicle-temporal-intanceid-update-sample.jsonld diff --git a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/010_01.robot b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/010_01.robot index 543cae57..e5c0539b 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/010_01.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/010_01.robot @@ -10,17 +10,17 @@ ${filename}= vehicle-speed-two-datasetid-sample.jsonld *** Test Cases *** 010_01_01_Append entity attributes - Append Attributes Without Params 204 vehicle-new-attribute-fragment.jsonld + Append Attributes Without Params 204 vehicle-new-attribute-fragment.jsonld vehicle-speed-appended-expectation.jsonld 010_01_02_Append entity attributes - Append Attributes With Params 207 vehicle-attribute-to-add-fragment.jsonld add-attribute-expectation.jsonld + Append Attributes With Params 207 vehicle-attribute-to-add-fragment.jsonld add-attribute-expectation.jsonld vehicle-speed-appended-expectation.jsonld 010_01_03_Append entity attributes - Append Attributes Without Params 204 vehicle-speed-different-datasetid-fragment.jsonld + Append Attributes Without Params 204 vehicle-speed-different-datasetid-fragment.jsonld vehicle-speed-different-datasetid-expectation.jsonld 010_01_04_Append entity attributes - Append Attributes With Params 204 vehicle-speed-different-datasetid-fragment.jsonld ${EMPTY} + Append Attributes With Params 204 vehicle-speed-different-datasetid-fragment.jsonld ${EMPTY} vehicle-speed-different-datasetid-expectation.jsonld *** Keywords *** Append Attributes Without Params - [Arguments] ${status_code} ${fragment_filename} + [Arguments] ${status_code} ${fragment_filename} ${expectation_filename} [Documentation] Check that you can append entity attributes [Tags] /entities/{entityId}/attrs/ 5_6_3 @@ -31,10 +31,15 @@ Append Attributes Without Params ${response}= Append Entity Attributes ${entity_id} ${fragment_filename} ${CONTENT_TYPE_LD_JSON} Check Response Status Code ${status_code} ${response['status']} + ${entity_expectation_payload}= Load Test Sample entities/expectations/${expectation_filename} ${entity_id} + Retrieve Entity by Id ${entity_id} context=${ngsild_test_suite_context} accept=${CONTENT_TYPE_LD_JSON} + ${ignored_attributes}= Create List ${status_regex_expr} + Check Updated Resource Set To ${entity_expectation_payload} + [Teardown] Delete Entity by Id Returning Response ${entity_id} Append Attributes With Params - [Arguments] ${status_code} ${fragment_filename} ${expectation_filename} + [Arguments] ${status_code} ${fragment_filename} ${expectation_response_body} ${expectation_filename} [Documentation] Check that you can append entity attributes [Tags] /entities/{entityId}/attrs/ 5_6_3 @@ -44,6 +49,11 @@ Append Attributes With Params ${response}= Append Entity Attributes With Parameters ${entity_id} ${fragment_filename} ${CONTENT_TYPE_LD_JSON} noOverwrite Check Response Status Code ${status_code} ${response['status']} - Run Keyword If "${expectation_filename}"!="${EMPTY}" Check Response Body Content ${expectation_filename} ${response['body']} + Run Keyword If "${expectation_response_body}"!="${EMPTY}" Check Response Body Content ${expectation_response_body} ${response['body']} + + ${entity_expectation_payload}= Load Test Sample entities/expectations/${expectation_filename} ${entity_id} + Retrieve Entity by Id ${entity_id} context=${ngsild_test_suite_context} accept=${CONTENT_TYPE_LD_JSON} + ${ignored_attributes}= Create List ${status_regex_expr} + Check Updated Resource Set To ${entity_expectation_payload} [Teardown] Delete Entity by Id Returning Response ${entity_id} \ No newline at end of file diff --git a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/011_01.robot b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/011_01.robot index b2408731..48b72cf1 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/011_01.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/011_01.robot @@ -10,15 +10,15 @@ Test Template Update Attributes ${vehicle_id_prefix}= urn:ngsi-ld:Vehicle: ${filename}= vehicle-two-datasetid-attributes-sample.jsonld -*** Test Cases *** STATUS_CODE FRAGMENT_FILENAME EXPECTATION_FILENAME -011_01_01_Check that you can update existing attributes with no datasetId 204 vehicle-speed-two-datasetid-01-fragment.jsonld ${EMPTY} -011_01_02_Check that you can update existing attributes with the datasetId 204 vehicle-speed-two-datasetid-02-fragment.jsonld ${EMPTY} -011_01_03_Check that you can update only some attributes while others failed 207 vehicle-speed-two-datasetid-03-fragment.jsonld vehicle-speed-datasetid-expectation.jsonld -011_01_04_Check that you cannot change the type of the attribute 204 vehicle-speed-two-datasetid-04-fragment.jsonld ${EMPTY} +*** Test Cases *** STATUS_CODE FRAGMENT_FILENAME EXPECTATION_RESPONSE_FILENAME EXPECTATION_FILENAME +011_01_01_Check that you can update existing attributes with no datasetId 204 fragments/vehicle-speed-two-datasetid-01-fragment.jsonld ${EMPTY} expectations/vehicle-update-attributes-expectation.jsonld +011_01_02_Check that you can update existing attributes with the datasetId 204 vehicle-speed-two-datasetid-02-fragment.jsonld ${EMPTY} expectations/vehicle-update-datasetid-attributes-expectation.jsonld +011_01_03_Check that you can update only some attributes while others failed 207 vehicle-speed-two-datasetid-03-fragment.jsonld vehicle-speed-datasetid-expectation.jsonld expectations/vehicle-multi-attributes-expectation.jsonld +011_01_04_Check that you cannot change the type of the attribute 204 vehicle-speed-two-datasetid-04-fragment.jsonld ${EMPTY} vehicle-two-datasetid-attributes-sample.jsonld *** Keywords *** Update Attributes - [Arguments] ${status_code} ${fragment_filename} ${expectation_filename} + [Arguments] ${status_code} ${fragment_filename} ${expectation_response_filename} ${expectation_filename} [Documentation] Check that you can update entity attributes [Tags] /entities/{entityId}/attrs/ 5_6_2 @@ -28,6 +28,11 @@ Update Attributes ${response}= Update Entity Attributes ${entity_id} ${fragment_filename} ${CONTENT_TYPE_LD_JSON} Check Response Status Code ${status_code} ${response['status']} - Run Keyword If "${expectation_filename}"!="${EMPTY}" Check Response Body Content ${expectation_filename} ${response['body']} + Run Keyword If "${expectation_response_filename}"!="${EMPTY}" Check Response Body Content ${expectation_response_filename} ${response['body']} + + ${entity_expectation_payload}= Load Test Sample entities/${expectation_filename} ${entity_id} + Retrieve Entity by Id ${entity_id} context=${ngsild_test_suite_context} accept=${CONTENT_TYPE_LD_JSON} + ${ignored_attributes}= Create List ${status_regex_expr} + Check Updated Resource Set To ${entity_expectation_payload} [Teardown] Delete Entity by Id Returning Response ${entity_id} \ No newline at end of file diff --git a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/012_01.robot b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/012_01.robot index ae829b00..ac3141f2 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/012_01.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/012_01.robot @@ -11,13 +11,13 @@ ${vehicle_id_prefix}= urn:ngsi-ld:Vehicle: ${filename}= vehicle-speed-two-datasetid-sample.jsonld ${status_code}= 204 -*** Test Cases *** FRAGMENT_FILENAME ATTRIBUTE_ID -012_01_01_Check that you can partially update an attribute vehicle-isparked-fragment.jsonld isParked -012_01_02_Check that you can partially update an attribute by specifying the datasetId vehicle-speed-equal-datasetid-fragment.jsonld speed +*** Test Cases *** FRAGMENT_FILENAME ATTRIBUTE_ID EXPECTATION_FILENAME +012_01_01_Check that you can partially update an attribute vehicle-isparked-fragment.jsonld isParked vehicle-isparked-update-expectation.jsonld +012_01_02_Check that you can partially update an attribute by specifying the datasetId vehicle-speed-equal-datasetid-fragment.jsonld speed vehicle-update-speed-expectation.jsonld *** Keywords *** Update Attributes - [Arguments] ${fragment_filename} ${attribute_id} + [Arguments] ${fragment_filename} ${attribute_id} ${expectation_filename} [Documentation] Check that you can perform a partial update on an entity attribute [Tags] /entities/{entityId}/attrs/{attrId} 5_6_4 @@ -28,4 +28,10 @@ Update Attributes ${response}= Partial Update Entity Attributes ${entity_id} ${attribute_id} ${fragment_filename} ${CONTENT_TYPE_LD_JSON} Check Response Status Code ${status_code} ${response['status']} + ${entity_expectation_payload}= Load Test Sample entities/expectations/${expectation_filename} ${entity_id} + Retrieve Entity by Id ${entity_id} context=${ngsild_test_suite_context} accept=${CONTENT_TYPE_LD_JSON} + ${ignored_attributes}= Create List ${status_regex_expr} + Check Updated Resource Set To ${entity_expectation_payload} + + [Teardown] Delete Entity by Id Returning Response ${entity_id} \ No newline at end of file diff --git a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/013_01.robot b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/013_01.robot index d9e1bacd..01970573 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/013_01.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/013_01.robot @@ -12,14 +12,14 @@ ${status_code}= 204 ${filename}= vehicle-two-datasetid-attributes-sample.jsonld ${attribute_id}= speed -*** Test Cases *** DATASETID DELETEALL -013_01_01_delete an attribute with the id ${EMPTY} false -013_01_02_delete an attribute with the datasetId urn:ngsi-ld:Property:gpsBxyz123-speed false -013_01_03_delete all target attribute instances with a datasetId urn:ngsi-ld:Property:gpsBxyz123-speed true +*** Test Cases *** DATASETID DELETEALL EXPECTATION_FILENAME +013_01_01_delete an attribute with the id ${EMPTY} false vehicle-delete-default-speed-expectation.jsonld +013_01_02_delete an attribute with the datasetId urn:ngsi-ld:Property:gpsBxyz123-speed false vehicle-delete-datasetid-speed-expectation.jsonld +013_01_03_delete all target attribute instances with a datasetId urn:ngsi-ld:Property:gpsBxyz123-speed true vehicle-delete-deleteall-speed-expectation.jsonld *** Keywords *** Delete Attributes - [Arguments] ${datasetId} ${deleteAll} + [Arguments] ${datasetId} ${deleteAll} ${expectation_filename} [Documentation] Check that you can delete an attribute from an entity [Tags] /entities/{entityId}/attrs/{attrId} 5_6_5 @@ -30,4 +30,9 @@ Delete Attributes ${response}= Delete Entity Attributes ${entity_id} ${attribute_id} ${datasetId} ${deleteAll} Check Response Status Code ${status_code} ${response['status']} + ${entity_expectation_payload}= Load Test Sample entities/expectations/${expectation_filename} ${entity_id} + Retrieve Entity by Id ${entity_id} context=${ngsild_test_suite_context} accept=${CONTENT_TYPE_LD_JSON} + ${ignored_attributes}= Create List ${status_regex_expr} + Check Updated Resource Set To ${entity_expectation_payload} + [Teardown] Delete Entity by Id Returning Response ${entity_id} \ No newline at end of file diff --git a/TP/NGSI-LD/ContextInformation/Provision/TemporalEntity/007_01.robot b/TP/NGSI-LD/ContextInformation/Provision/TemporalEntity/007_01.robot index 7c05ccbb..9f686e75 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/TemporalEntity/007_01.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/TemporalEntity/007_01.robot @@ -23,4 +23,8 @@ Create Temporal Entity ${response}= Create Or Update Temporal Representation Of Entity Selecting Content Type ${temporal_entity_representation_id} ${filename} ${content_type} Check Response Status Code 201 ${response['status']} + ${created_temporal_entity}= Load Test Sample temporalEntities/${filename} ${temporal_entity_representation_id} + Set Test Variable ${response} + Check Created Resource Set To ${created_temporal_entity} + [Teardown] Delete Temporal Representation Of Entity ${temporal_entity_representation_id} \ No newline at end of file diff --git a/TP/NGSI-LD/ContextInformation/Provision/TemporalEntity/008_01.robot b/TP/NGSI-LD/ContextInformation/Provision/TemporalEntity/008_01.robot index 68dd8cf8..b88aba37 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/TemporalEntity/008_01.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/TemporalEntity/008_01.robot @@ -8,6 +8,7 @@ Resource ${EXECDIR}/resources/JsonUtils.resource ${vehicle_id_prefix}= urn:ngsi-ld:Vehicle: ${filename}= vehicle-temporal-representation-sample.jsonld ${update_filename}= vehicle-temporal-representation-update-sample.jsonld +${expectation_filename}= vehicle-temporal-representation-update-expectation.jsonld *** Test Cases *** 008_01_Update a temporal representation of an entity with simple temporal properties @@ -21,5 +22,9 @@ ${update_filename}= vehicle-temporal-representation-update-sample.jsonld ${response}= Create Or Update Temporal Representation Of Entity Selecting Content Type ${temporal_entity_representation_id} ${update_filename} ${CONTENT_TYPE_LD_JSON} Check Response Status Code 204 ${response['status']} + ${temporal_entity_expectation_payload}= Load Test Sample temporalEntities/expectations/${expectation_filename} ${temporal_entity_representation_id} + Retrieve Temporal Representation Of Entity ${temporal_entity_representation_id} context=${ngsild_test_suite_context} accept=${CONTENT_TYPE_LD_JSON} + ${ignored_attributes}= Create List ${status_regex_expr} instanceId + Check Updated Resource Set To ${temporal_entity_expectation_payload} [Teardown] Delete Temporal Representation Of Entity ${temporal_entity_representation_id} \ No newline at end of file diff --git a/TP/NGSI-LD/ContextInformation/Provision/TemporalEntity/009_01.robot b/TP/NGSI-LD/ContextInformation/Provision/TemporalEntity/009_01.robot index 2f87e8dd..31e14452 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/TemporalEntity/009_01.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/TemporalEntity/009_01.robot @@ -18,4 +18,7 @@ Delete a temporal representation of an entity with simple temporal properties Check Response Status Code 201 ${response['status']} ${response}= Delete Temporal Representation Of Entity With Returning Response ${temporal_entity_representation_id} - Check Response Status Code 204 ${response['status']} \ No newline at end of file + Check Response Status Code 204 ${response['status']} + + Retrieve Temporal Representation Of Entity ${temporal_entity_representation_id} context=${ngsild_test_suite_context} + Check SUT Not Containing Resource \ No newline at end of file diff --git a/TP/NGSI-LD/ContextInformation/Provision/TemporalEntity/014_01.robot b/TP/NGSI-LD/ContextInformation/Provision/TemporalEntity/014_01.robot index 254950a7..46182bcf 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/TemporalEntity/014_01.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/TemporalEntity/014_01.robot @@ -8,6 +8,7 @@ Resource ${EXECDIR}/resources/JsonUtils.resource ${vehicle_id_prefix}= urn:ngsi-ld:Vehicle: ${filename}= vehicle-temporal-representation-sample.jsonld ${fragment_filename}= vehicle-temporal-representation-fragment.jsonld +${expectation_filename}= vehicle-temporal-representation-added-attribute-expectation.jsonld *** Test Cases *** 014_01_02_Add an attribute to a temporal entity with simple temporal properties @@ -21,4 +22,9 @@ ${fragment_filename}= vehicle-temporal-representation-fragment.jsonld ${response}= Append Attribute To Temporal Entity ${temporal_entity_representation_id} ${fragment_filename} ${CONTENT_TYPE_LD_JSON} Check Response Status Code 204 ${response['status']} + ${temporal_entity_expectation_payload}= Load Test Sample temporalEntities/expectations/${expectation_filename} ${temporal_entity_representation_id} + Retrieve Temporal Representation Of Entity ${temporal_entity_representation_id} context=${ngsild_test_suite_context} accept=${CONTENT_TYPE_LD_JSON} + ${ignored_attributes}= Create List ${status_regex_expr} instanceId + Check Updated Resource Set To ${temporal_entity_expectation_payload} + [Teardown] Delete Temporal Representation Of Entity ${temporal_entity_representation_id} \ No newline at end of file diff --git a/TP/NGSI-LD/ContextInformation/Provision/TemporalEntity/015_01.robot b/TP/NGSI-LD/ContextInformation/Provision/TemporalEntity/015_01.robot index aeb72a1b..f2d47f1e 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/TemporalEntity/015_01.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/TemporalEntity/015_01.robot @@ -12,14 +12,14 @@ ${filename}= vehicle-temporal-representation-sample.jsonld ${status_code}= 204 ${attribute_id}= fuelLevel -*** Test Cases *** DELETEALL DATASETID -015_01_01_Delete an attribute from a temporal representation of an entity without deleteALL/datasetID false ${EMPTY} -015_01_02_Delete an attribute from a temporal representation of an entity with datasetId false urn:ngsi-ld:Vehicle:12345-fuel -015_01_03_Delete an attribute from a temporal representation of an entity with deleteALL/datasetID true urn:ngsi-ld:Vehicle:12345-fuel +*** Test Cases *** DELETEALL DATASETID EXPECTATION_FILE +015_01_01_Delete an attribute from a temporal representation of an entity without deleteALL/datasetID false ${EMPTY} vehicle-temporal-representation-delete-fuelLevel-expectation.jsonld +015_01_02_Delete an attribute from a temporal representation of an entity with datasetId false urn:ngsi-ld:Vehicle:12345-fuel vehicle-temporal-representation-delete-fuelLevel-datasetid-expectation.jsonld +015_01_03_Delete an attribute from a temporal representation of an entity with deleteALL/datasetID true urn:ngsi-ld:Vehicle:12345-fuel vehicle-temporal-representation-deleteall-fuelLevel-expectation.jsonld *** Keywords *** Delete Attribute From A Temporal Entity - [Arguments] ${deleteAll} ${datasetId} + [Arguments] ${deleteAll} ${datasetId} ${expectation_filename} [Documentation] Check that you can delete an attribute of a temporal representation of an entity with simple temporal properties [Tags] mandatory @@ -30,4 +30,9 @@ Delete Attribute From A Temporal Entity ${response}= Delete Attribute From Temporal Entity ${temporal_entity_representation_id} ${attribute_id} ${CONTENT_TYPE_LD_JSON} ${datasetId} ${deleteAll} Check Response Status Code ${status_code} ${response['status']} + ${temporal_entity_expectation_payload}= Load Test Sample temporalEntities/expectations/${expectation_filename} ${temporal_entity_representation_id} + Retrieve Temporal Representation Of Entity ${temporal_entity_representation_id} context=${ngsild_test_suite_context} accept=${CONTENT_TYPE_LD_JSON} + ${ignored_attributes}= Create List ${status_regex_expr} instanceId + Check Updated Resource Set To ${temporal_entity_expectation_payload} + [Teardown] Delete Temporal Representation Of Entity ${temporal_entity_representation_id} \ No newline at end of file diff --git a/TP/NGSI-LD/ContextInformation/Provision/TemporalEntity/017_01.robot b/TP/NGSI-LD/ContextInformation/Provision/TemporalEntity/017_01.robot index b6b727c8..2da21039 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/TemporalEntity/017_01.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/TemporalEntity/017_01.robot @@ -8,6 +8,7 @@ Resource ${EXECDIR}/resources/JsonUtils.resource ${vehicle_id_prefix}= urn:ngsi-ld:Vehicle: ${filename}= vehicle-temporal-representation-sample.jsonld ${attributeId}= speed +${expectation_filename}= vehicle-temporal-representation-delete-speed-instanceid-sample.jsonld *** Test Cases *** 017_01_Delete an attribute instance in temporal representation of an entity @@ -25,4 +26,9 @@ ${attributeId}= speed ${response}= Delete Attribute Instance From Temporal Entity ${temporal_entity_representation_id} ${attributeId} ${instanceId} ${CONTENT_TYPE_LD_JSON} Check Response Status Code 204 ${response['status']} + ${temporal_entity_expectation_payload}= Load Test Sample temporalEntities/expectations/${expectation_filename} ${temporal_entity_representation_id} + Retrieve Temporal Representation Of Entity ${temporal_entity_representation_id} context=${ngsild_test_suite_context} accept=${CONTENT_TYPE_LD_JSON} + ${ignored_attributes}= Create List ${status_regex_expr} instanceId + Check Updated Resource Set To ${temporal_entity_expectation_payload} + [Teardown] Delete Temporal Representation Of Entity ${temporal_entity_representation_id} \ No newline at end of file diff --git a/TP/NGSI-LD/ContextSource/Registration/CreateContextSourceRegistration/033_01_01.robot b/TP/NGSI-LD/ContextSource/Registration/CreateContextSourceRegistration/033_01_01.robot index 897e492e..8b55bf46 100644 --- a/TP/NGSI-LD/ContextSource/Registration/CreateContextSourceRegistration/033_01_01.robot +++ b/TP/NGSI-LD/ContextSource/Registration/CreateContextSourceRegistration/033_01_01.robot @@ -16,9 +16,13 @@ Create Context Source Registration With Specific Date Expiration Date ${registration_id}= Generate Random Entity Id ${registration_id_prefix} ${payload}= Load Json From File ${EXECDIR}/data/${registration_payload_file_path} - ${updated_payload}= Update Value To Json ${payload} $..id ${registration_id} - ${request} ${response}= Create Context Source Registration With Return ${updated_payload} + ${registration_payload}= Update Value To Json ${payload} $..id ${registration_id} + ${request} ${response}= Create Context Source Registration With Return ${registration_payload} Check Response Status Code 201 ${response['status']} Check Response Headers Containing URI set to ${request['path']}/ ${registration_id} ${response} + Retrieve Context Source Registration ${registration_id} context=${ngsild_test_suite_context} accept=${CONTENT_TYPE_LD_JSON} + ${ignored_attributes}= Create List ${status_regex_expr} + Check Created Resource Set To ${registration_payload} ${ignored_attributes} + [Teardown] Delete Context Source Registration ${registration_id} diff --git a/TP/NGSI-LD/ContextSource/Registration/CreateContextSourceRegistration/033_01_02.robot b/TP/NGSI-LD/ContextSource/Registration/CreateContextSourceRegistration/033_01_02.robot index 1d384107..6df8fa4b 100644 --- a/TP/NGSI-LD/ContextSource/Registration/CreateContextSourceRegistration/033_01_02.robot +++ b/TP/NGSI-LD/ContextSource/Registration/CreateContextSourceRegistration/033_01_02.robot @@ -16,9 +16,13 @@ Create Context Source Registration That Never Expires ${registration_id}= Generate Random Entity Id ${registration_id_prefix} ${payload}= Load Json From File ${EXECDIR}/data/${registration_payload_file_path} - ${updated_payload}= Update Value To Json ${payload} $..id ${registration_id} - ${request} ${response}= Create Context Source Registration With Return ${updated_payload} + ${registration_payload}= Update Value To Json ${payload} $..id ${registration_id} + ${request} ${response}= Create Context Source Registration With Return ${registration_payload} Check Response Status Code 201 ${response['status']} Check Response Headers Containing URI set to ${request['path']}/ ${registration_id} ${response} + Retrieve Context Source Registration ${registration_id} context=${ngsild_test_suite_context} accept=${CONTENT_TYPE_LD_JSON} + ${ignored_attributes}= Create List ${status_regex_expr} + Check Created Resource Set To ${registration_payload} ${ignored_attributes} + [Teardown] Delete Context Source Registration ${registration_id} diff --git a/TP/NGSI-LD/ContextSource/Registration/CreateContextSourceRegistration/033_01_03.robot b/TP/NGSI-LD/ContextSource/Registration/CreateContextSourceRegistration/033_01_03.robot index 97fe3165..ef0aec23 100644 --- a/TP/NGSI-LD/ContextSource/Registration/CreateContextSourceRegistration/033_01_03.robot +++ b/TP/NGSI-LD/ContextSource/Registration/CreateContextSourceRegistration/033_01_03.robot @@ -4,7 +4,6 @@ Resource ${EXECDIR}/resources/ApiUtils.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource - *** Variable *** ${registration_id_prefix}= urn:ngsi-ld:Registration: ${registration_payload_file_path}= csourceRegistrations/context-source-registration-no-id-sample.jsonld @@ -18,5 +17,10 @@ Create Context Source Registration Without A Sprecified ID ${request} ${response}= Create Context Source Registration With Return ${payload} Check Response Status Code 201 ${response['status']} ${registration_id}= Check Response Headers ID Not Empty ${response} + + ${registration_payload}= Update Value To Json ${payload} $..id ${registration_id} + Retrieve Context Source Registration ${registration_id} context=${ngsild_test_suite_context} accept=${CONTENT_TYPE_LD_JSON} + ${ignored_attributes}= Create List ${status_regex_expr} + Check Created Resource Set To ${registration_payload} ${ignored_attributes} [Teardown] Delete Context Source Registration ${registration_id} \ No newline at end of file diff --git a/TP/NGSI-LD/ContextSource/Registration/DeleteContextSourceRegistration/035_01.robot b/TP/NGSI-LD/ContextSource/Registration/DeleteContextSourceRegistration/035_01.robot index a5febdfa..fc8f2502 100644 --- a/TP/NGSI-LD/ContextSource/Registration/DeleteContextSourceRegistration/035_01.robot +++ b/TP/NGSI-LD/ContextSource/Registration/DeleteContextSourceRegistration/035_01.robot @@ -13,6 +13,7 @@ ${registration_payload_file_path}= context-source-registration-simple-sample.j Delete a context source registration by id [Documentation] Check that you can delete a context source registration by id [Tags] /csourceRegistrations/{registrationId} 5_9_4 + ${registration_id}= Generate Random Entity Id ${registration_id_prefix} ${payload}= Load Json From File ${EXECDIR}/data/csourceRegistrations/${registration_payload_file_path} ${updated_payload}= Update Value To Json ${payload} $..id ${registration_id} @@ -21,3 +22,6 @@ Delete a context source registration by id ${response}= Delete Context Source Registration With Return ${registration_id} Check Response Status Code 204 ${response['status']} + + Retrieve Context Source Registration ${registration_id} context=${ngsild_test_suite_context} + Check SUT Not Containing Resource \ No newline at end of file diff --git a/TP/NGSI-LD/ContextSource/Registration/UpdateContextSourceRegistration/034_01.robot b/TP/NGSI-LD/ContextSource/Registration/UpdateContextSourceRegistration/034_01.robot index 76961327..3153c9d0 100644 --- a/TP/NGSI-LD/ContextSource/Registration/UpdateContextSourceRegistration/034_01.robot +++ b/TP/NGSI-LD/ContextSource/Registration/UpdateContextSourceRegistration/034_01.robot @@ -9,24 +9,30 @@ Test Template Update Context Source *** Variable *** ${registration_id_prefix}= urn:ngsi-ld:Registration: -*** Test Case *** FILENAME UPDATE_FILENAME -034_01_01_Update a context source registration by id context-source-registration-simple-sample.jsonld context-source-registration-with-expiration-sample.jsonld -034_01_02_Update a context source registration to never expire context-source-registration-with-expiration-sample.jsonld context-source-registration-simple-sample.jsonld +*** Test Case *** FILENAME UPDATE_FILENAME +034_01_01_Update a context source registration by id context-source-registration-sample.jsonld context-source-registration-with-expiration-sample.jsonld +034_01_02_Update a context source registration to never expire context-source-registration-with-expiration-sample.jsonld context-source-registration-simple-sample.jsonld *** Keywords *** Update Context Source [Arguments] ${filename} ${update_filename} [Documentation] Check that you can update a context source registration by id [Tags] /csourceRegistrations/{registrationId} 5_9_3 + ${registration_id}= Generate Random Entity Id ${registration_id_prefix} ${payload}= Load Json From File ${EXECDIR}/data/csourceRegistrations/${filename} - ${updated_payload}= Update Value To Json ${payload} $..id ${registration_id} - ${request} ${response}= Create Context Source Registration With Return ${updated_payload} + ${registration_payload}= Update Value To Json ${payload} $..id ${registration_id} + ${request} ${response}= Create Context Source Registration With Return ${registration_payload} Check Response Status Code 201 ${response['status']} ${fragment}= Load Json From File ${EXECDIR}/data/csourceRegistrations/${update_filename} - ${fragment_with_id}= Update Value To Json ${fragment} $..id ${registration_id} - ${response}= Update Context Source Registration With Return ${registration_id} ${fragment_with_id} ${CONTENT_TYPE_LD_JSON} + ${registration_update_fragment}= Update Value To Json ${fragment} $..id ${registration_id} + ${response}= Update Context Source Registration With Return ${registration_id} ${registration_update_fragment} ${CONTENT_TYPE_LD_JSON} Check Response Status Code 204 ${response['status']} + Retrieve Context Source Registration ${registration_id} context=${ngsild_test_suite_context} accept=${CONTENT_TYPE_LD_JSON} + ${ignored_attributes}= Create List ${status_regex_expr} + Check Updated Resource Set To ${registration_payload} + + [Teardown] Delete Context Source Registration ${registration_id} diff --git a/data/csourceRegistrations/context-source-registration-sample.jsonld b/data/csourceRegistrations/context-source-registration-sample.jsonld index 2c8aeeae..4f37b16e 100644 --- a/data/csourceRegistrations/context-source-registration-sample.jsonld +++ b/data/csourceRegistrations/context-source-registration-sample.jsonld @@ -1,17 +1,43 @@ { - "id":"urn:ngsi-ld:ContextSourceRegistration:randomUUID", - "type":"ContextSourceRegistration", - "information":[ - { - "entities":[ - { - "type":"Building" - } - ] - } + "id": "urn:ngsi-ld:ContextSourceRegistration:randomUUID", + "type": "ContextSourceRegistration", + "information": [ + { + "entities": [ + { + "id": "urn:ngsi-ld:Vehicle:A456", + "type": "Vehicle" + } + ], + "propertyNames": ["brandName","speed"], + "relationshipNames": ["isParked"] + }, + { + "entities": [ + { + "idPattern": ".*downtown$", + "type": "OffStreetParking" + }, + { + "idPattern": ".*47$", + "type": "OffStreetParking" + } + ], + "propertyNames": ["availableSpotNumber","totalSpotNumber"], + "relationshipNames": ["isNextToBuilding"] + } ], - "endpoint":"http://my.csource.org:1026", - "@context":[ - "https://raw.githubusercontent.com/easy-global-market/ngsild-api-data-models/feature/add-json-ld-context-for-ngsi-ld-test-suite/ngsi-ld-test-suite/ngsi-ld-test-suite-context.jsonld" + "endpoint": "http://my.csource.org:1026", + "location": { + "type": "Polygon", + "coordinates": [ + [ [100.0, 0.0], [101.0, 0.0], [101.0, 1.0], + [100.0, 1.0], [100.0, 0.0]] ] + }, + "timestamp": { + "startAt": "2017-11-29T14:53:15Z" + }, + "@context": [ + "https://raw.githubusercontent.com/easy-global-market/ngsild-api-data-models/feature/add-json-ld-context-for-ngsi-ld-test-suite/ngsi-ld-test-suite/ngsi-ld-test-suite-context.jsonld" ] } \ No newline at end of file diff --git a/data/csourceRegistrations/context-source-registration-with-expiration-sample.jsonld b/data/csourceRegistrations/context-source-registration-with-expiration-sample.jsonld index 6e0a40b5..3ec95d3b 100644 --- a/data/csourceRegistrations/context-source-registration-with-expiration-sample.jsonld +++ b/data/csourceRegistrations/context-source-registration-with-expiration-sample.jsonld @@ -35,9 +35,9 @@ [100.0, 1.0], [100.0, 0.0]] ] }, "timestamp": { - "startAt": " 2017-11-29T14:53:15Z" + "startAt": "2017-11-29T14:53:15Z" }, - "expiresAt": " 2025-11-29T14:53:15Z", + "expiresAt": "2025-11-29T14:53:15Z", "@context": [ "https://raw.githubusercontent.com/easy-global-market/ngsild-api-data-models/feature/add-json-ld-context-for-ngsi-ld-test-suite/ngsi-ld-test-suite/ngsi-ld-test-suite-context.jsonld" ] diff --git a/data/entities/expectations/vehicle-delete-datasetid-speed-expectation.jsonld b/data/entities/expectations/vehicle-delete-datasetid-speed-expectation.jsonld new file mode 100644 index 00000000..98f1b652 --- /dev/null +++ b/data/entities/expectations/vehicle-delete-datasetid-speed-expectation.jsonld @@ -0,0 +1,31 @@ +{ + "id": "urn:ngsi-ld:Vehicle:randomUUID", + "type": "Vehicle", + "brandName": { + "type": "Property", + "value": "Mercedes" + }, + "isParked": { + "type": "Relationship", + "object": "urn:ngsi-ld:OffStreetParking:Downtown1", + "observedAt": "2017-07-29T12:00:04Z", + "providedBy": { + "type": "Relationship", + "object": "urn:ngsi-ld:Person:Bob" + }, + "datasetId": "urn:ngsi-ld:Relationship:parked12345" + }, + "speed": + { + "type": "Property", + "value": 54.5, + "source": { + "type": "Property", + "value": "GPS" + }, + "datasetId": "urn:ngsi-ld:Property:gpsBxyz123-speed" + }, + "@context": [ + "https://raw.githubusercontent.com/easy-global-market/ngsild-api-data-models/feature/add-json-ld-context-for-ngsi-ld-test-suite/ngsi-ld-test-suite/ngsi-ld-test-suite-context.jsonld" + ] +} \ No newline at end of file diff --git a/data/entities/expectations/vehicle-delete-default-speed-expectation.jsonld b/data/entities/expectations/vehicle-delete-default-speed-expectation.jsonld new file mode 100644 index 00000000..98f1b652 --- /dev/null +++ b/data/entities/expectations/vehicle-delete-default-speed-expectation.jsonld @@ -0,0 +1,31 @@ +{ + "id": "urn:ngsi-ld:Vehicle:randomUUID", + "type": "Vehicle", + "brandName": { + "type": "Property", + "value": "Mercedes" + }, + "isParked": { + "type": "Relationship", + "object": "urn:ngsi-ld:OffStreetParking:Downtown1", + "observedAt": "2017-07-29T12:00:04Z", + "providedBy": { + "type": "Relationship", + "object": "urn:ngsi-ld:Person:Bob" + }, + "datasetId": "urn:ngsi-ld:Relationship:parked12345" + }, + "speed": + { + "type": "Property", + "value": 54.5, + "source": { + "type": "Property", + "value": "GPS" + }, + "datasetId": "urn:ngsi-ld:Property:gpsBxyz123-speed" + }, + "@context": [ + "https://raw.githubusercontent.com/easy-global-market/ngsild-api-data-models/feature/add-json-ld-context-for-ngsi-ld-test-suite/ngsi-ld-test-suite/ngsi-ld-test-suite-context.jsonld" + ] +} \ No newline at end of file diff --git a/data/entities/expectations/vehicle-delete-deleteall-speed-expectation.jsonld b/data/entities/expectations/vehicle-delete-deleteall-speed-expectation.jsonld new file mode 100644 index 00000000..df8c093f --- /dev/null +++ b/data/entities/expectations/vehicle-delete-deleteall-speed-expectation.jsonld @@ -0,0 +1,21 @@ +{ + "id": "urn:ngsi-ld:Vehicle:randomUUID", + "type": "Vehicle", + "brandName": { + "type": "Property", + "value": "Mercedes" + }, + "isParked": { + "type": "Relationship", + "object": "urn:ngsi-ld:OffStreetParking:Downtown1", + "observedAt": "2017-07-29T12:00:04Z", + "providedBy": { + "type": "Relationship", + "object": "urn:ngsi-ld:Person:Bob" + }, + "datasetId": "urn:ngsi-ld:Relationship:parked12345" + }, + "@context": [ + "https://raw.githubusercontent.com/easy-global-market/ngsild-api-data-models/feature/add-json-ld-context-for-ngsi-ld-test-suite/ngsi-ld-test-suite/ngsi-ld-test-suite-context.jsonld" + ] +} \ No newline at end of file diff --git a/data/entities/expectations/vehicle-isparked-update-expectation.jsonld b/data/entities/expectations/vehicle-isparked-update-expectation.jsonld new file mode 100644 index 00000000..18cc1e9f --- /dev/null +++ b/data/entities/expectations/vehicle-isparked-update-expectation.jsonld @@ -0,0 +1,38 @@ +{ + "id": "urn:ngsi-ld:Vehicle:randomUUID", + "type": "Vehicle", + "brandName": { + "type": "Property", + "value": "Mercedes" + }, + "isParked": { + "type": "Relationship", + "object": "urn:ngsi-ld:OffStreetParking:Downtown1", + "observedAt": "2017-07-29T12:00:04Z", + "providedBy": { + "type": "Relationship", + "object": "urn:ngsi-ld:Person:JohnDoe" + } + }, + "speed": [{ + "type": "Property", + "value": 55, + "source": { + "type": "Property", + "value": "Speedometer" + }, + "datasetId": "urn:ngsi-ld:Property:speedometer" + }, + { + "type": "Property", + "value": 54.5, + "source": { + "type": "Property", + "value": "GPS" + }, + "datasetId": "urn:ngsi-ld:Property:gpsBxyz123-speed" + }], + "@context": [ + "https://raw.githubusercontent.com/easy-global-market/ngsild-api-data-models/feature/add-json-ld-context-for-ngsi-ld-test-suite/ngsi-ld-test-suite/ngsi-ld-test-suite-context.jsonld" + ] +} \ No newline at end of file diff --git a/data/entities/expectations/vehicle-multi-attributes-expectation.jsonld b/data/entities/expectations/vehicle-multi-attributes-expectation.jsonld new file mode 100644 index 00000000..08921f20 --- /dev/null +++ b/data/entities/expectations/vehicle-multi-attributes-expectation.jsonld @@ -0,0 +1,38 @@ +{ + "id": "urn:ngsi-ld:Vehicle:randomUUID", + "type": "Vehicle", + "brandName": { + "type": "Property", + "value": "Mercedes" + }, + "isParked": { + "type": "Relationship", + "object": "urn:ngsi-ld:OffStreetParking:Downtown1", + "observedAt": "2017-07-29T12:00:04Z", + "providedBy": { + "type": "Relationship", + "object": "urn:ngsi-ld:Person:Bob" + }, + "datasetId": "urn:ngsi-ld:Relationship:parked12345" + }, + "speed": [{ + "type": "Property", + "value": 55, + "source": { + "type": "Property", + "value": "Speedometer" + } + }, + { + "type": "Property", + "value": 99, + "source": { + "type": "Property", + "value": "GPS" + }, + "datasetId": "urn:ngsi-ld:Property:gpsBxyz123-speed" + }], + "@context": [ + "https://raw.githubusercontent.com/easy-global-market/ngsild-api-data-models/feature/add-json-ld-context-for-ngsi-ld-test-suite/ngsi-ld-test-suite/ngsi-ld-test-suite-context.jsonld" + ] +} \ No newline at end of file diff --git a/data/entities/expectations/vehicle-speed-appended-expectation.jsonld b/data/entities/expectations/vehicle-speed-appended-expectation.jsonld new file mode 100644 index 00000000..9732320d --- /dev/null +++ b/data/entities/expectations/vehicle-speed-appended-expectation.jsonld @@ -0,0 +1,44 @@ +{ + "id": "urn:ngsi-ld:Vehicle:randomUUID", + "type": "Vehicle", + "brandName": { + "type": "Property", + "value": "Mercedes" + }, + "speed": [ + { + "type": "Property", + "source": { + "type": "Property", + "value": "Speedometer" + }, + "datasetId": "urn:ngsi-ld:Property:speedometer", + "value": 55 + }, + { + "type": "Property", + "source": { + "type": "Property", + "value": "GPS" + }, + "datasetId": "urn:ngsi-ld:Property:gpsBxyz123-speed", + "value": 54.5 + } + ], + "attribute_to_be_added": { + "type": "Property", + "value": 23 + }, + "isParked": { + "type": "Relationship", + "providedBy": { + "type": "Relationship", + "object": "urn:ngsi-ld:Person:Bob" + }, + "object": "urn:ngsi-ld:OffStreetParking:Downtown1", + "observedAt": "2017-07-29T12:00:04Z" + }, + "@context": [ + "https://uri.etsi.org/ngsi-ld/v1/ngsi-ld-core-context.jsonld" + ] +} \ No newline at end of file diff --git a/data/entities/expectations/vehicle-speed-different-datasetid-expectation.jsonld b/data/entities/expectations/vehicle-speed-different-datasetid-expectation.jsonld new file mode 100644 index 00000000..887175ed --- /dev/null +++ b/data/entities/expectations/vehicle-speed-different-datasetid-expectation.jsonld @@ -0,0 +1,33 @@ +{ + "id": "urn:ngsi-ld:Vehicle:randomUUID", + "type": "Vehicle", + "brandName": { + "type": "Property", + "value": "Mercedes" + }, + "speed": { + "type": "Property", + "source": { + "type": "Property", + "value": "Speedometer" + }, + "datasetId": "urn:ngsi-ld:Property:speedometerA4567-speed2", + "value": 56 + }, + "attribute_to_be_added": { + "type": "Property", + "value": 23 + }, + "isParked": { + "type": "Relationship", + "providedBy": { + "type": "Relationship", + "object": "urn:ngsi-ld:Person:Bob" + }, + "object": "urn:ngsi-ld:OffStreetParking:Downtown1", + "observedAt": "2017-07-29T12:00:04Z" + }, + "@context": [ + "https://uri.etsi.org/ngsi-ld/v1/ngsi-ld-core-context.jsonld" + ] +} \ No newline at end of file diff --git a/data/entities/expectations/vehicle-update-attributes-expectation.jsonld b/data/entities/expectations/vehicle-update-attributes-expectation.jsonld new file mode 100644 index 00000000..7d74f1b8 --- /dev/null +++ b/data/entities/expectations/vehicle-update-attributes-expectation.jsonld @@ -0,0 +1,38 @@ +{ + "id": "urn:ngsi-ld:Vehicle:randomUUID", + "type": "Vehicle", + "brandName": { + "type": "Property", + "value": "Mercedes" + }, + "isParked": { + "type": "Relationship", + "object": "urn:ngsi-ld:OffStreetParking:Downtown1", + "observedAt": "2017-07-29T12:00:04Z", + "providedBy": { + "type": "Relationship", + "object": "urn:ngsi-ld:Person:Bob" + }, + "datasetId": "urn:ngsi-ld:Relationship:parked12345" + }, + "speed": [{ + "type": "Property", + "value": 99, + "source": { + "type": "Property", + "value": "Speedometer" + } + }, + { + "type": "Property", + "value": 54.5, + "source": { + "type": "Property", + "value": "GPS" + }, + "datasetId": "urn:ngsi-ld:Property:gpsBxyz123-speed" + }], + "@context": [ + "https://raw.githubusercontent.com/easy-global-market/ngsild-api-data-models/feature/add-json-ld-context-for-ngsi-ld-test-suite/ngsi-ld-test-suite/ngsi-ld-test-suite-context.jsonld" + ] +} \ No newline at end of file diff --git a/data/entities/expectations/vehicle-update-datasetid-attributes-expectation.jsonld b/data/entities/expectations/vehicle-update-datasetid-attributes-expectation.jsonld new file mode 100644 index 00000000..2c2c11f9 --- /dev/null +++ b/data/entities/expectations/vehicle-update-datasetid-attributes-expectation.jsonld @@ -0,0 +1,38 @@ +{ + "id": "urn:ngsi-ld:Vehicle:randomUUID", + "type": "Vehicle", + "brandName": { + "type": "Property", + "value": "Mercedes" + }, + "isParked": { + "type": "Relationship", + "object": "urn:ngsi-ld:OffStreetParking:Downtown1", + "observedAt": "2017-07-29T12:00:04Z", + "providedBy": { + "type": "Relationship", + "object": "urn:ngsi-ld:Person:JohnDoe" + }, + "datasetId": "urn:ngsi-ld:Relationship:parked12345" + }, + "speed": [{ + "type": "Property", + "value": 55, + "source": { + "type": "Property", + "value": "Speedometer" + } + }, + { + "type": "Property", + "value": 54.5, + "source": { + "type": "Property", + "value": "GPS" + }, + "datasetId": "urn:ngsi-ld:Property:gpsBxyz123-speed" + }], + "@context": [ + "https://raw.githubusercontent.com/easy-global-market/ngsild-api-data-models/feature/add-json-ld-context-for-ngsi-ld-test-suite/ngsi-ld-test-suite/ngsi-ld-test-suite-context.jsonld" + ] +} \ No newline at end of file diff --git a/data/entities/expectations/vehicle-update-speed-expectation.jsonld b/data/entities/expectations/vehicle-update-speed-expectation.jsonld new file mode 100644 index 00000000..b44a810c --- /dev/null +++ b/data/entities/expectations/vehicle-update-speed-expectation.jsonld @@ -0,0 +1,38 @@ +{ + "id": "urn:ngsi-ld:Vehicle:randomUUID", + "type": "Vehicle", + "brandName": { + "type": "Property", + "value": "Mercedes" + }, + "isParked": { + "type": "Relationship", + "object": "urn:ngsi-ld:OffStreetParking:Downtown1", + "observedAt": "2017-07-29T12:00:04Z", + "providedBy": { + "type": "Relationship", + "object": "urn:ngsi-ld:Person:Bob" + } + }, + "speed": [{ + "type": "Property", + "value": 55, + "source": { + "type": "Property", + "value": "Speedometer" + }, + "datasetId": "urn:ngsi-ld:Property:speedometer" + }, + { + "type": "Property", + "value": 54.5, + "source": { + "type": "Property", + "value": "GPS" + }, + "datasetId": "urn:ngsi-ld:Property:gpsBxyz123-speed" + }], + "@context": [ + "https://raw.githubusercontent.com/easy-global-market/ngsild-api-data-models/feature/add-json-ld-context-for-ngsi-ld-test-suite/ngsi-ld-test-suite/ngsi-ld-test-suite-context.jsonld" + ] +} \ No newline at end of file diff --git a/data/entities/fragmentEntities/vehicle-speed-two-datasetid-03-fragment.jsonld b/data/entities/fragmentEntities/vehicle-speed-two-datasetid-03-fragment.jsonld index a1cfae90..375db489 100644 --- a/data/entities/fragmentEntities/vehicle-speed-two-datasetid-03-fragment.jsonld +++ b/data/entities/fragmentEntities/vehicle-speed-two-datasetid-03-fragment.jsonld @@ -16,7 +16,7 @@ "type": "Property", "value": "Speedometer" }, - "datasetId": "urn:ngsi-ld:Property:speedometerA4567-speed" + "datasetId": "urn:ngsi-ld:Property:gpsBxyz123-speed" }, "@context": [ "https://raw.githubusercontent.com/easy-global-market/ngsild-api-data-models/feature/add-json-ld-context-for-ngsi-ld-test-suite/ngsi-ld-test-suite/ngsi-ld-test-suite-context.jsonld" diff --git a/data/entities/fragmentEntities/vehicle-speed-two-datasetid-04-fragment.jsonld b/data/entities/fragmentEntities/vehicle-speed-two-datasetid-04-fragment.jsonld index 6794ae23..addf83fb 100644 --- a/data/entities/fragmentEntities/vehicle-speed-two-datasetid-04-fragment.jsonld +++ b/data/entities/fragmentEntities/vehicle-speed-two-datasetid-04-fragment.jsonld @@ -1,16 +1,6 @@ { - "isParked2": { + "speed": { "type": "Relationship", - "object": "urn:ngsi-ld:OffStreetParking:Downtown1", - "observedAt": "2017-07-29T12:00:04Z", - "providedBy": { - "type": "Relationship", - "object": "urn:ngsi-ld:Person:JohnDoe" - }, - "datasetId": "urn:ngsi-ld:Relationship:parked12345" - }, - "speed2": { - "type": "Property", "value": 99, "source": { "type": "Property", diff --git a/data/temporalEntities/expectations/vehicle-temporal-representation-added-attribute-expectation.jsonld b/data/temporalEntities/expectations/vehicle-temporal-representation-added-attribute-expectation.jsonld new file mode 100644 index 00000000..bac6a5d2 --- /dev/null +++ b/data/temporalEntities/expectations/vehicle-temporal-representation-added-attribute-expectation.jsonld @@ -0,0 +1,60 @@ +{ + "id":"urn:ngsi-ld:Vehicle:randomUUID", + "type":"Vehicle", + "brandName":[ + { + "type":"Property", + "value":"BMW" + } + ], + "speed":[ + { + "type":"Property", + "value":120, + "observedAt":"2020-09-01T12:03:00Z" + }, + { + "type":"Property", + "value":80, + "observedAt":"2020-09-01T12:05:00Z" + } + ], + "fuelLevel":[ + { + "type":"Property", + "value":67, + "observedAt":"2020-09-01T12:03:00Z" + }, + { + "type":"Property", + "value":53, + "observedAt":"2020-09-01T13:05:00Z" + }, + { + "type":"Property", + "value":40, + "observedAt":"2020-09-01T14:07:00Z", + "datasetId":"urn:ngsi-ld:Vehicle:12345-fuel" + } + ], + "added_attribute":[ + { + "type":"Property", + "value":120, + "observedAt":"2020-09-01T12:03:00Z" + }, + { + "type":"Property", + "value":80, + "observedAt":"2020-09-01T12:05:00Z" + }, + { + "type":"Property", + "value":100, + "observedAt":"2020-09-01T12:07:00Z" + } + ], + "@context":[ + "https://uri.etsi.org/ngsi-ld/v1/ngsi-ld-core-context.jsonld" + ] +} \ No newline at end of file diff --git a/data/temporalEntities/expectations/vehicle-temporal-representation-delete-fuelLevel-datasetid-expectation.jsonld b/data/temporalEntities/expectations/vehicle-temporal-representation-delete-fuelLevel-datasetid-expectation.jsonld new file mode 100644 index 00000000..595adf93 --- /dev/null +++ b/data/temporalEntities/expectations/vehicle-temporal-representation-delete-fuelLevel-datasetid-expectation.jsonld @@ -0,0 +1,37 @@ +{ + "id":"urn:ngsi-ld:Vehicle:randomUUID", + "type":"Vehicle", + "brandName":[ + { + "type":"Property", + "value":"BMW" + } + ], + "speed":[ + { + "type":"Property", + "value":120, + "observedAt":"2020-09-01T12:03:00Z" + }, + { + "type":"Property", + "value":80, + "observedAt":"2020-09-01T12:05:00Z" + } + ], + "fuelLevel":[ + { + "type":"Property", + "value":67, + "observedAt":"2020-09-01T12:03:00Z" + }, + { + "type":"Property", + "value":53, + "observedAt":"2020-09-01T13:05:00Z" + } + ], + "@context":[ + "https://uri.etsi.org/ngsi-ld/v1/ngsi-ld-core-context.jsonld" + ] +} \ No newline at end of file diff --git a/data/temporalEntities/expectations/vehicle-temporal-representation-delete-fuelLevel-expectation.jsonld b/data/temporalEntities/expectations/vehicle-temporal-representation-delete-fuelLevel-expectation.jsonld new file mode 100644 index 00000000..a9184301 --- /dev/null +++ b/data/temporalEntities/expectations/vehicle-temporal-representation-delete-fuelLevel-expectation.jsonld @@ -0,0 +1,33 @@ +{ + "id":"urn:ngsi-ld:Vehicle:randomUUID", + "type":"Vehicle", + "brandName":[ + { + "type":"Property", + "value":"BMW" + } + ], + "speed":[ + { + "type":"Property", + "value":120, + "observedAt":"2020-09-01T12:03:00Z" + }, + { + "type":"Property", + "value":80, + "observedAt":"2020-09-01T12:05:00Z" + } + ], + "fuelLevel":[ + { + "type":"Property", + "value":40, + "observedAt":"2020-09-01T14:07:00Z", + "datasetId":"urn:ngsi-ld:Vehicle:12345-fuel" + } + ], + "@context":[ + "https://uri.etsi.org/ngsi-ld/v1/ngsi-ld-core-context.jsonld" + ] +} \ No newline at end of file diff --git a/data/temporalEntities/expectations/vehicle-temporal-representation-delete-speed-instanceid-sample.jsonld b/data/temporalEntities/expectations/vehicle-temporal-representation-delete-speed-instanceid-sample.jsonld new file mode 100644 index 00000000..6a3ff6d6 --- /dev/null +++ b/data/temporalEntities/expectations/vehicle-temporal-representation-delete-speed-instanceid-sample.jsonld @@ -0,0 +1,38 @@ +{ + "id":"urn:ngsi-ld:Vehicle:randomUUID", + "type":"Vehicle", + "brandName":[ + { + "type":"Property", + "value":"BMW" + } + ], + "speed":[ + { + "type":"Property", + "value":80, + "observedAt":"2020-09-01T12:05:00Z" + } + ], + "fuelLevel":[ + { + "type":"Property", + "value":67, + "observedAt":"2020-09-01T12:03:00Z" + }, + { + "type":"Property", + "value":53, + "observedAt":"2020-09-01T13:05:00Z" + }, + { + "type":"Property", + "value":40, + "observedAt":"2020-09-01T14:07:00Z", + "datasetId":"urn:ngsi-ld:Vehicle:12345-fuel" + } + ], + "@context":[ + "https://raw.githubusercontent.com/easy-global-market/ngsild-api-data-models/feature/add-json-ld-context-for-ngsi-ld-test-suite/ngsi-ld-test-suite/ngsi-ld-test-suite-context.jsonld" + ] +} \ No newline at end of file diff --git a/data/temporalEntities/expectations/vehicle-temporal-representation-deleteall-fuelLevel-expectation.jsonld b/data/temporalEntities/expectations/vehicle-temporal-representation-deleteall-fuelLevel-expectation.jsonld new file mode 100644 index 00000000..21f9b9a4 --- /dev/null +++ b/data/temporalEntities/expectations/vehicle-temporal-representation-deleteall-fuelLevel-expectation.jsonld @@ -0,0 +1,25 @@ +{ + "id":"urn:ngsi-ld:Vehicle:randomUUID", + "type":"Vehicle", + "brandName":[ + { + "type":"Property", + "value":"BMW" + } + ], + "speed":[ + { + "type":"Property", + "value":120, + "observedAt":"2020-09-01T12:03:00Z" + }, + { + "type":"Property", + "value":80, + "observedAt":"2020-09-01T12:05:00Z" + } + ], + "@context":[ + "https://uri.etsi.org/ngsi-ld/v1/ngsi-ld-core-context.jsonld" + ] +} \ No newline at end of file diff --git a/data/temporalEntities/expectations/vehicle-temporal-representation-update-expectation.jsonld b/data/temporalEntities/expectations/vehicle-temporal-representation-update-expectation.jsonld new file mode 100644 index 00000000..5fd7bd26 --- /dev/null +++ b/data/temporalEntities/expectations/vehicle-temporal-representation-update-expectation.jsonld @@ -0,0 +1,43 @@ + { + "id":"urn:ngsi-ld:Vehicle:randomUUID", + "type":"Vehicle", + "brandName":[ + { + "type":"Property", + "value":"BMW" + } + ], + "speed":[ + { + "type":"Property", + "value":129, + "observedAt":"2020-09-01T12:03:00Z" + }, + { + "type":"Property", + "value":80, + "observedAt":"2020-09-01T12:05:00Z" + } + ], + "fuelLevel":[ + { + "type":"Property", + "value":67, + "observedAt":"2020-09-01T12:03:00Z" + }, + { + "type":"Property", + "value":53, + "observedAt":"2020-09-01T13:05:00Z" + }, + { + "type":"Property", + "value":40, + "observedAt":"2020-09-01T14:07:00Z", + "datasetId":"urn:ngsi-ld:Vehicle:12345-fuel" + } + ], + "@context":[ + "https://uri.etsi.org/ngsi-ld/v1/ngsi-ld-core-context.jsonld" + ] + } \ No newline at end of file diff --git a/data/temporalEntities/fragments/vehicle-temporal-intanceid-update-sample.jsonld b/data/temporalEntities/fragments/vehicle-temporal-intanceid-update-sample.jsonld deleted file mode 100644 index d7433ad6..00000000 --- a/data/temporalEntities/fragments/vehicle-temporal-intanceid-update-sample.jsonld +++ /dev/null @@ -1,12 +0,0 @@ -{ - "speed":[ - { - "type":"Property", - "value":129, - "observedAt":"2020-09-01T12:03:00Z" - } - ], - "@context":[ - "https://raw.githubusercontent.com/easy-global-market/ngsild-api-data-models/feature/add-json-ld-context-for-ngsi-ld-test-suite/ngsi-ld-test-suite/ngsi-ld-test-suite-context.jsonld" - ] -} \ No newline at end of file -- GitLab From a5e2d0017127163d9971293ce6c7911c677cbee3 Mon Sep 17 00:00:00 2001 From: Gustavo Lopes Date: Fri, 19 Mar 2021 10:37:49 +0000 Subject: [PATCH 2/3] added missing test validation --- .../Provision/TemporalEntity/016_01.robot | 8 +++++++- .../Provision/TemporalEntity/016_02.robot | 2 +- .../Provision/TemporalEntity/016_03.robot | 2 +- ...=> vehicle-temporal-instanceid-update-fragment.jsonld} | 0 4 files changed, 9 insertions(+), 3 deletions(-) rename data/temporalEntities/fragments/{vehicle-temporal-intanceid-update-fragment.jsonld => vehicle-temporal-instanceid-update-fragment.jsonld} (100%) diff --git a/TP/NGSI-LD/ContextInformation/Provision/TemporalEntity/016_01.robot b/TP/NGSI-LD/ContextInformation/Provision/TemporalEntity/016_01.robot index 53df2e11..9c47b57a 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/TemporalEntity/016_01.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/TemporalEntity/016_01.robot @@ -7,7 +7,8 @@ Resource ${EXECDIR}/resources/JsonUtils.resource *** Variable *** ${vehicle_id_prefix}= urn:ngsi-ld:Vehicle: ${filename}= vehicle-temporal-representation-sample.jsonld -${fragment_filename}= vehicle-temporal-intanceid-update-fragment.jsonld +${fragment_filename}= vehicle-temporal-instanceid-update-fragment.jsonld +${expectation_filename}= vehicle-temporal-representation-update-expectation.jsonld ${attributeId}= speed *** Test Cases *** @@ -37,4 +38,9 @@ ${attributeId}= speed ${modifiedAt_after_update_date}= Convert Date ${modifiedAt_after_update} epoch Should Be True ${modifiedAt_before_update_date}<${modifiedAt_after_update_date} + ${temporal_entity_expectation_payload}= Load Test Sample temporalEntities/expectations/${expectation_filename} ${temporal_entity_representation_id} + Retrieve Temporal Representation Of Entity ${temporal_entity_representation_id} context=${ngsild_test_suite_context} accept=${CONTENT_TYPE_LD_JSON} + ${ignored_attributes}= Create List ${status_regex_expr} instanceId + Check Updated Resource Set To ${temporal_entity_expectation_payload} + [Teardown] Delete Temporal Representation Of Entity ${temporal_entity_representation_id} \ No newline at end of file diff --git a/TP/NGSI-LD/ContextInformation/Provision/TemporalEntity/016_02.robot b/TP/NGSI-LD/ContextInformation/Provision/TemporalEntity/016_02.robot index d53614c8..436e9a8a 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/TemporalEntity/016_02.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/TemporalEntity/016_02.robot @@ -10,7 +10,7 @@ Test Template Partially Update Temporal Entity *** Variable *** ${vehicle_id_prefix}= urn:ngsi-ld:Vehicle: ${filename}= vehicle-temporal-representation-sample.jsonld -${fragment_filename}= vehicle-temporal-intanceid-update-fragment.jsonld +${fragment_filename}= vehicle-temporal-instanceid-update-fragment.jsonld ${status_code}= 400 *** Test Cases *** TEMPORAL_ENTITY_ID ATTRIBUTE_ID INSTANCE_ID diff --git a/TP/NGSI-LD/ContextInformation/Provision/TemporalEntity/016_03.robot b/TP/NGSI-LD/ContextInformation/Provision/TemporalEntity/016_03.robot index 8037375f..ccb1005e 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/TemporalEntity/016_03.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/TemporalEntity/016_03.robot @@ -10,7 +10,7 @@ Test Template Partially Update Temporal Entity *** Variable *** ${vehicle_id_prefix}= urn:ngsi-ld:Vehicle: ${filename}= vehicle-temporal-representation-sample.jsonld -${fragment_filename}= vehicle-temporal-intanceid-update-fragment.jsonld +${fragment_filename}= vehicle-temporal-instanceid-update-fragment.jsonld ${status_code}= 404 *** Test Cases *** TEMPORAL_ENTITY_ID ATTRIBUTE_ID INSTANCE_ID diff --git a/data/temporalEntities/fragments/vehicle-temporal-intanceid-update-fragment.jsonld b/data/temporalEntities/fragments/vehicle-temporal-instanceid-update-fragment.jsonld similarity index 100% rename from data/temporalEntities/fragments/vehicle-temporal-intanceid-update-fragment.jsonld rename to data/temporalEntities/fragments/vehicle-temporal-instanceid-update-fragment.jsonld -- GitLab From 16b10d87ea03681219ccfe36e6593484419c68cd Mon Sep 17 00:00:00 2001 From: Gustavo Lopes Date: Fri, 19 Mar 2021 14:26:39 +0000 Subject: [PATCH 3/3] added context attribute to ignore list when validating --- .../ContextInformation/Provision/EntityAttributes/010_01.robot | 2 +- .../ContextInformation/Provision/EntityAttributes/011_01.robot | 2 +- .../ContextInformation/Provision/EntityAttributes/012_01.robot | 2 +- .../ContextInformation/Provision/EntityAttributes/013_01.robot | 2 +- .../ContextInformation/Provision/TemporalEntity/008_01.robot | 2 +- .../ContextInformation/Provision/TemporalEntity/014_01.robot | 2 +- .../ContextInformation/Provision/TemporalEntity/015_01.robot | 2 +- .../ContextInformation/Provision/TemporalEntity/016_01.robot | 2 +- .../ContextInformation/Provision/TemporalEntity/017_01.robot | 2 +- .../Registration/UpdateContextSourceRegistration/034_01.robot | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/010_01.robot b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/010_01.robot index e5c0539b..bf47e81f 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/010_01.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/010_01.robot @@ -53,7 +53,7 @@ Append Attributes With Params ${entity_expectation_payload}= Load Test Sample entities/expectations/${expectation_filename} ${entity_id} Retrieve Entity by Id ${entity_id} context=${ngsild_test_suite_context} accept=${CONTENT_TYPE_LD_JSON} - ${ignored_attributes}= Create List ${status_regex_expr} + ${ignored_attributes}= Create List ${status_regex_expr} @context Check Updated Resource Set To ${entity_expectation_payload} [Teardown] Delete Entity by Id Returning Response ${entity_id} \ No newline at end of file diff --git a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/011_01.robot b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/011_01.robot index 48b72cf1..e9a66102 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/011_01.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/011_01.robot @@ -32,7 +32,7 @@ Update Attributes ${entity_expectation_payload}= Load Test Sample entities/${expectation_filename} ${entity_id} Retrieve Entity by Id ${entity_id} context=${ngsild_test_suite_context} accept=${CONTENT_TYPE_LD_JSON} - ${ignored_attributes}= Create List ${status_regex_expr} + ${ignored_attributes}= Create List ${status_regex_expr} @context Check Updated Resource Set To ${entity_expectation_payload} [Teardown] Delete Entity by Id Returning Response ${entity_id} \ No newline at end of file diff --git a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/012_01.robot b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/012_01.robot index ac3141f2..3d58d8d1 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/012_01.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/012_01.robot @@ -30,7 +30,7 @@ Update Attributes ${entity_expectation_payload}= Load Test Sample entities/expectations/${expectation_filename} ${entity_id} Retrieve Entity by Id ${entity_id} context=${ngsild_test_suite_context} accept=${CONTENT_TYPE_LD_JSON} - ${ignored_attributes}= Create List ${status_regex_expr} + ${ignored_attributes}= Create List ${status_regex_expr} @context Check Updated Resource Set To ${entity_expectation_payload} diff --git a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/013_01.robot b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/013_01.robot index 01970573..839a04c8 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/013_01.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/013_01.robot @@ -32,7 +32,7 @@ Delete Attributes ${entity_expectation_payload}= Load Test Sample entities/expectations/${expectation_filename} ${entity_id} Retrieve Entity by Id ${entity_id} context=${ngsild_test_suite_context} accept=${CONTENT_TYPE_LD_JSON} - ${ignored_attributes}= Create List ${status_regex_expr} + ${ignored_attributes}= Create List ${status_regex_expr} @context Check Updated Resource Set To ${entity_expectation_payload} [Teardown] Delete Entity by Id Returning Response ${entity_id} \ No newline at end of file diff --git a/TP/NGSI-LD/ContextInformation/Provision/TemporalEntity/008_01.robot b/TP/NGSI-LD/ContextInformation/Provision/TemporalEntity/008_01.robot index b88aba37..0afda983 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/TemporalEntity/008_01.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/TemporalEntity/008_01.robot @@ -24,7 +24,7 @@ ${expectation_filename}= vehicle-temporal-representation-update-expectation.jso ${temporal_entity_expectation_payload}= Load Test Sample temporalEntities/expectations/${expectation_filename} ${temporal_entity_representation_id} Retrieve Temporal Representation Of Entity ${temporal_entity_representation_id} context=${ngsild_test_suite_context} accept=${CONTENT_TYPE_LD_JSON} - ${ignored_attributes}= Create List ${status_regex_expr} instanceId + ${ignored_attributes}= Create List ${status_regex_expr} instanceId @context Check Updated Resource Set To ${temporal_entity_expectation_payload} [Teardown] Delete Temporal Representation Of Entity ${temporal_entity_representation_id} \ No newline at end of file diff --git a/TP/NGSI-LD/ContextInformation/Provision/TemporalEntity/014_01.robot b/TP/NGSI-LD/ContextInformation/Provision/TemporalEntity/014_01.robot index 46182bcf..4faf3c8b 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/TemporalEntity/014_01.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/TemporalEntity/014_01.robot @@ -24,7 +24,7 @@ ${expectation_filename}= vehicle-temporal-representation-added-attribute-expect ${temporal_entity_expectation_payload}= Load Test Sample temporalEntities/expectations/${expectation_filename} ${temporal_entity_representation_id} Retrieve Temporal Representation Of Entity ${temporal_entity_representation_id} context=${ngsild_test_suite_context} accept=${CONTENT_TYPE_LD_JSON} - ${ignored_attributes}= Create List ${status_regex_expr} instanceId + ${ignored_attributes}= Create List ${status_regex_expr} instanceId @context Check Updated Resource Set To ${temporal_entity_expectation_payload} [Teardown] Delete Temporal Representation Of Entity ${temporal_entity_representation_id} \ No newline at end of file diff --git a/TP/NGSI-LD/ContextInformation/Provision/TemporalEntity/015_01.robot b/TP/NGSI-LD/ContextInformation/Provision/TemporalEntity/015_01.robot index f2d47f1e..9ab31c23 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/TemporalEntity/015_01.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/TemporalEntity/015_01.robot @@ -32,7 +32,7 @@ Delete Attribute From A Temporal Entity ${temporal_entity_expectation_payload}= Load Test Sample temporalEntities/expectations/${expectation_filename} ${temporal_entity_representation_id} Retrieve Temporal Representation Of Entity ${temporal_entity_representation_id} context=${ngsild_test_suite_context} accept=${CONTENT_TYPE_LD_JSON} - ${ignored_attributes}= Create List ${status_regex_expr} instanceId + ${ignored_attributes}= Create List ${status_regex_expr} instanceId @context Check Updated Resource Set To ${temporal_entity_expectation_payload} [Teardown] Delete Temporal Representation Of Entity ${temporal_entity_representation_id} \ No newline at end of file diff --git a/TP/NGSI-LD/ContextInformation/Provision/TemporalEntity/016_01.robot b/TP/NGSI-LD/ContextInformation/Provision/TemporalEntity/016_01.robot index 9c47b57a..68ceb697 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/TemporalEntity/016_01.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/TemporalEntity/016_01.robot @@ -40,7 +40,7 @@ ${attributeId}= speed ${temporal_entity_expectation_payload}= Load Test Sample temporalEntities/expectations/${expectation_filename} ${temporal_entity_representation_id} Retrieve Temporal Representation Of Entity ${temporal_entity_representation_id} context=${ngsild_test_suite_context} accept=${CONTENT_TYPE_LD_JSON} - ${ignored_attributes}= Create List ${status_regex_expr} instanceId + ${ignored_attributes}= Create List ${status_regex_expr} instanceId @context Check Updated Resource Set To ${temporal_entity_expectation_payload} [Teardown] Delete Temporal Representation Of Entity ${temporal_entity_representation_id} \ No newline at end of file diff --git a/TP/NGSI-LD/ContextInformation/Provision/TemporalEntity/017_01.robot b/TP/NGSI-LD/ContextInformation/Provision/TemporalEntity/017_01.robot index 2da21039..4ddd57c3 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/TemporalEntity/017_01.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/TemporalEntity/017_01.robot @@ -28,7 +28,7 @@ ${expectation_filename}= vehicle-temporal-representation-delete-speed-instancei ${temporal_entity_expectation_payload}= Load Test Sample temporalEntities/expectations/${expectation_filename} ${temporal_entity_representation_id} Retrieve Temporal Representation Of Entity ${temporal_entity_representation_id} context=${ngsild_test_suite_context} accept=${CONTENT_TYPE_LD_JSON} - ${ignored_attributes}= Create List ${status_regex_expr} instanceId + ${ignored_attributes}= Create List ${status_regex_expr} instanceId @context Check Updated Resource Set To ${temporal_entity_expectation_payload} [Teardown] Delete Temporal Representation Of Entity ${temporal_entity_representation_id} \ No newline at end of file diff --git a/TP/NGSI-LD/ContextSource/Registration/UpdateContextSourceRegistration/034_01.robot b/TP/NGSI-LD/ContextSource/Registration/UpdateContextSourceRegistration/034_01.robot index 3153c9d0..59cc7773 100644 --- a/TP/NGSI-LD/ContextSource/Registration/UpdateContextSourceRegistration/034_01.robot +++ b/TP/NGSI-LD/ContextSource/Registration/UpdateContextSourceRegistration/034_01.robot @@ -31,7 +31,7 @@ Update Context Source Check Response Status Code 204 ${response['status']} Retrieve Context Source Registration ${registration_id} context=${ngsild_test_suite_context} accept=${CONTENT_TYPE_LD_JSON} - ${ignored_attributes}= Create List ${status_regex_expr} + ${ignored_attributes}= Create List ${status_regex_expr} @context Check Updated Resource Set To ${registration_payload} -- GitLab