From 3275c2b0b225cccf17e9d0deb24f6e5783c89caa Mon Sep 17 00:00:00 2001 From: Ranim Naimi <156652078+ranim-n@users.noreply.github.com> Date: Fri, 19 Jul 2024 14:59:08 +0200 Subject: [PATCH 1/2] feat: add TCs for filtering of attributes instances based on datasetId --- .../Entity/QueryEntities/019_12.robot | 74 +++++++++ .../021_18.robot | 78 +++++++++ .../CreateSubscription/028_06.robot | 37 +++++ .../046_19.robot | 74 +++++++++ .../building-default-instances.jsonld | 15 ++ .../building-french-datasetid-only.jsonld | 17 ++ ...ing-name-attribute-default-instance.jsonld | 11 ++ ...ding-name-attribute-german-instance.jsonld | 12 ++ .../building-name-attribute.jsonld | 23 +++ .../building-no-attributes.jsonld | 7 + .../building-two-datasetids.jsonld | 24 +++ .../building-name-fragment.jsonld | 10 ++ .../entity-with-datasetid-046-19.jsonld | 15 ++ .../subscription-with-datasetId.jsonld | 27 ++++ ...ubscription-building-with-datasetId.jsonld | 22 +++ data/temporalEntities/expectations/empty.json | 1 + ...poral-representation-common-datasetid.json | 30 ++++ ...oral-representation-default-instances.json | 28 ++++ ...on-fuellevel-attribute-fuel-datasetid.json | 16 ++ ...mporal-representation-speed-attribute.json | 45 ++++++ ...representation-speed-default-instance.json | 15 ++ ...emporal-representation-two-datasetids.json | 46 ++++++ ...ion-with-multi-attributes-instances.jsonld | 62 +++++++ doc/analysis/requests.py | 14 +- .../Consumption/019_12.json | 152 ++++++++++++++++++ .../Consumption/021_18.json | 152 ++++++++++++++++++ .../Subscription/028_06.json | 40 +++++ .../Subscription/046_19.json | 45 ++++++ .../test_ContextInformation_Consumption.py | 21 +++ .../test_ContextInformation_Subscription.py | 14 ++ .../ContextInformationConsumption.resource | 5 + ...oralContextInformationConsumption.resource | 4 + 32 files changed, 1132 insertions(+), 4 deletions(-) create mode 100644 TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_12.robot create mode 100644 TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_18.robot create mode 100644 TP/NGSI-LD/ContextInformation/Subscription/CreateSubscription/028_06.robot create mode 100644 TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_19.robot create mode 100644 data/entities/expectations/building-default-instances.jsonld create mode 100644 data/entities/expectations/building-french-datasetid-only.jsonld create mode 100644 data/entities/expectations/building-name-attribute-default-instance.jsonld create mode 100644 data/entities/expectations/building-name-attribute-german-instance.jsonld create mode 100644 data/entities/expectations/building-name-attribute.jsonld create mode 100644 data/entities/expectations/building-no-attributes.jsonld create mode 100644 data/entities/expectations/building-two-datasetids.jsonld create mode 100644 data/entities/fragmentEntities/building-name-fragment.jsonld create mode 100644 data/subscriptions/expectations/entity-with-datasetid-046-19.jsonld create mode 100644 data/subscriptions/expectations/subscription-with-datasetId.jsonld create mode 100644 data/subscriptions/subscription-building-with-datasetId.jsonld create mode 100644 data/temporalEntities/expectations/empty.json create mode 100644 data/temporalEntities/expectations/vehicle-temporal-representation-common-datasetid.json create mode 100644 data/temporalEntities/expectations/vehicle-temporal-representation-default-instances.json create mode 100644 data/temporalEntities/expectations/vehicle-temporal-representation-fuellevel-attribute-fuel-datasetid.json create mode 100644 data/temporalEntities/expectations/vehicle-temporal-representation-speed-attribute.json create mode 100644 data/temporalEntities/expectations/vehicle-temporal-representation-speed-default-instance.json create mode 100644 data/temporalEntities/expectations/vehicle-temporal-representation-two-datasetids.json create mode 100644 data/temporalEntities/vehicle-temporal-representation-with-multi-attributes-instances.jsonld create mode 100644 doc/files/ContextInformation/Consumption/019_12.json create mode 100644 doc/files/ContextInformation/Consumption/021_18.json create mode 100644 doc/files/ContextInformation/Subscription/028_06.json create mode 100644 doc/files/ContextInformation/Subscription/046_19.json diff --git a/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_12.robot b/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_12.robot new file mode 100644 index 000000000..038b832af --- /dev/null +++ b/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_12.robot @@ -0,0 +1,74 @@ +*** Settings *** +Documentation Check that one can filter attribute instances based on datasetId. + +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource +Resource ${EXECDIR}/resources/AssertionUtils.resource +Resource ${EXECDIR}/resources/JsonUtils.resource + +Suite Setup Setup Initial Entity +Suite Teardown Delete Entity +Test Template Filter attribute instances based on datasetId + + +*** Variables *** +${filename} building-multi-instances-attributes.jsonld + + +*** Test Cases *** ATTRS DATASET_ID EXPECTATION_FILENAME +019_12_01 filter based on attrs only + [Tags] e-query 4_5_5 5_7_2 since_v1.8.1 + name ${EMPTY} building-name-attribute.jsonld +019_12_02 filter based on datasetId only + [Tags] e-query 4_5_5 5_7_2 since_v1.8.1 + ${EMPTY} urn:ngsi-ld:Dataset:french-name building-french-datasetid-only.jsonld +019_12_03 filter based on two datasetIds + [Tags] e-query 4_5_5 5_7_2 since_v1.8.1 + ${EMPTY} urn:ngsi-ld:Dataset:french-name,urn:ngsi-ld:Dataset:spanish-name building-two-datasetids.jsonld +019_12_04 filter based on default instance + [Tags] e-query 4_5_5 5_7_2 since_v1.8.1 + ${EMPTY} @none building-default-instances.jsonld +019_12_05 filter based on attrs and default instance + [Tags] e-query 4_5_5 5_7_2 since_v1.8.1 + name @none building-name-attribute-default-instance.jsonld +019_12_06 filter based on attrs and datasetId + [Tags] e-query 4_5_5 5_7_2 since_v1.8.1 + name urn:ngsi-ld:Dataset:german-name building-name-attribute-german-instance.jsonld +019_12_07 filter based on attrs and datasetId with no match + [Tags] e-query 4_5_5 5_7_2 since_v1.8.1 + name urn:ngsi-ld:Dataset:spanish-name building-no-attributes.jsonld + + +*** Keywords *** +Filter attribute instances based on datasetId + [Documentation] Check that one can filter attribute instances based on datasetId. + [Arguments] ${attrs} ${datasetId} ${expectation_filename} + + ${attrsToMatch}= Catenate + ... SEPARATOR=, + ... ${attrs} + + ${response}= Query Entities + ... attrs=${attrsToMatch} + ... datasetId=${datasetId} + ... entity_types=Building + ... context=${ngsild_test_suite_context} + ... accept=${CONTENT_TYPE_LD_JSON} + + Check Response Status Code 200 ${response.status_code} + Check Response Body Containing Entity element + ... expectation_filename=${expectation_filename} + ... entity_id=${entity_id} + ... response_body=${response.json()[0]} + +Setup Initial Entity + ${entity_id}= Generate Random Building Entity Id + Set Suite Variable ${entity_id} + ${create_response}= Create Entity Selecting Content Type + ... ${filename} + ... ${entity_id} + ... ${CONTENT_TYPE_LD_JSON} + Check Response Status Code 201 ${create_response.status_code} + +Delete Entity + Delete Entity by Id ${entity_id} diff --git a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_18.robot b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_18.robot new file mode 100644 index 000000000..6b395af57 --- /dev/null +++ b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_18.robot @@ -0,0 +1,78 @@ +*** Settings *** +Documentation Check that one can filter attribute instances of a temporal entity based on datasetId. + +Resource ${EXECDIR}/resources/ApiUtils/Common.resource +Resource ${EXECDIR}/resources/ApiUtils/TemporalContextInformationConsumption.resource +Resource ${EXECDIR}/resources/ApiUtils/TemporalContextInformationProvision.resource +Resource ${EXECDIR}/resources/AssertionUtils.resource +Resource ${EXECDIR}/resources/JsonUtils.resource + +Suite Setup Setup Initial Temporal Entity +Suite Teardown Delete Temporal Entity +Test Template Filter attribute instances of a temporal entity based on datasetId + + +*** Variables *** +${filename} vehicle-temporal-representation-with-multi-attributes-instances.jsonld +${timerel} after +${timeat} 2020-08-01T12:04:00Z + + +*** Test Cases *** ATTRS DATASET_ID EXPECTATION_FILENAME +021_18_01 filter based on attrs only + [Tags] te-query 4_5_5 5_7_4 since_v1.8.1 + speed ${EMPTY} vehicle-temporal-representation-speed-attribute.json +021_18_02 filter based on datasetId only + [Tags] te-query 4_5_5 5_7_4 since_v1.8.1 + ${EMPTY} urn:ngsi-ld:Dataset:Common vehicle-temporal-representation-common-datasetid.json +021_18_03 filter based on two datasetIds + [Tags] te-query 4_5_5 5_7_4 since_v1.8.1 + ${EMPTY} urn:ngsi-ld:Dataset:Common,urn:ngsi-ld:Dataset:Speed vehicle-temporal-representation-two-datasetids.json +021_18_04 filter based on default instance + [Tags] te-query 4_5_5 5_7_4 since_v1.8.1 + ${EMPTY} @none vehicle-temporal-representation-default-instances.json +021_18_05 filter based on attrs and default instance + [Tags] te-query 4_5_5 5_7_4 since_v1.8.1 + speed @none vehicle-temporal-representation-speed-default-instance.json +021_18_06 filter based on attrs and datasetId + [Tags] te-query 4_5_5 5_7_4 since_v1.8.1 + fuelLevel urn:ngsi-ld:Dataset:fuel vehicle-temporal-representation-fuellevel-attribute-fuel-datasetid.json +021_18_07 filter based on attrs and datasetId with no match + [Tags] te-query 4_5_5 5_7_4 since_v1.8.1 + speed urn:ngsi-ld:Dataset:fuel empty.json + + +*** Keywords *** +Filter attribute instances of a temporal entity based on datasetId + [Documentation] Check that one can filter attribute instances of a temporal entity based on datasetId. + [Arguments] ${attrs} ${datasetId} ${expectation_filename} + + ${attrsToMatch}= Catenate + ... SEPARATOR=, + ... ${attrs} + + ${response}= Query Temporal Representation Of Entities + ... attrs=${attrsToMatch} + ... datasetId=${datasetId} + ... entity_types=Vehicle + ... timerel=${timerel} + ... timeAt=${timeat} + ... context=${ngsild_test_suite_context} + ... options=temporalValues + + Check Response Status Code 200 ${response.status_code} + Check Response Body Containing EntityTemporal element + ... filename=${expectation_filename} + ... temporal_entity_representation_id=${temporal_entity_id} + ... response_body=${response.json()} + +Setup Initial Temporal Entity + ${temporal_entity_id}= Catenate ${VEHICLE_ID_PREFIX}021-18-A + Set Suite Variable ${temporal_entity_id} + ${create_response}= Create Temporal Representation Of Entity + ... ${filename} + ... ${temporal_entity_id} + Check Response Status Code 201 ${create_response.status_code} + +Delete Temporal Entity + Delete Temporal Representation Of Entity ${temporal_entity_id} diff --git a/TP/NGSI-LD/ContextInformation/Subscription/CreateSubscription/028_06.robot b/TP/NGSI-LD/ContextInformation/Subscription/CreateSubscription/028_06.robot new file mode 100644 index 000000000..dc03464eb --- /dev/null +++ b/TP/NGSI-LD/ContextInformation/Subscription/CreateSubscription/028_06.robot @@ -0,0 +1,37 @@ +*** Settings *** +Documentation Check that one can create a subscription with a datasetId + +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationSubscription.resource +Resource ${EXECDIR}/resources/AssertionUtils.resource +Resource ${EXECDIR}/resources/JsonUtils.resource + +Suite Teardown Delete Initial Subscription + + +*** Variables *** +${subscription_payload_file_path}= subscriptions/subscription-building-with-datasetId.jsonld +${subscription_expectation_file_path} subscriptions/expectations/subscription-with-datasetId.jsonld + + +*** Test Cases *** +028_06 Create a subscription with a datasetId + [Documentation] Check that one can create a subscription with a datasetId + [Tags] sub-create 5_8_1 4_5_5 since_v1.8.1 + ${subscription_id}= Generate Random Subscription Id + Set Suite Variable ${subscription_id} + ${response}= Create Subscription + ... ${subscription_id} + ... ${subscription_payload_file_path} + ... ${CONTENT_TYPE_LD_JSON} + Check Response Status Code 201 ${response.status_code} + ${expected_subscription}= Load Test Sample ${subscription_expectation_file_path} ${subscription_id} + ${response1}= Retrieve Subscription + ... id=${subscription_id} + ... accept=${CONTENT_TYPE_LD_JSON} + ... context=${ngsild_test_suite_context} + Check Created Resource Set To ${expected_subscription} ${response1.json()} + + +*** Keywords *** +Delete Initial Subscription + Delete Subscription ${subscription_id} diff --git a/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_19.robot b/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_19.robot new file mode 100644 index 000000000..6e7c258f8 --- /dev/null +++ b/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_19.robot @@ -0,0 +1,74 @@ +*** Settings *** +Documentation If a subscription has a datasetId member instances should be filtered based on that datasetId. + +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationSubscription.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/AssertionUtils.resource +Resource ${EXECDIR}/resources/JsonUtils.resource +Resource ${EXECDIR}/resources/NotificationUtils.resource + +Suite Setup Before Test +Suite Teardown After Test + + +*** Variables *** +${subscription_payload_file_path}= subscriptions/subscription-building-with-datasetId.jsonld +${entity_building_filepath}= building-multi-instances-attributes.jsonld +${fragment_filename}= building-name-fragment.jsonld +${notification_server_send_url}= http://${notification_server_host}:${notification_server_port}/notify +${entity_expectation_file_path}= entity-with-datasetid-046-19.jsonld + + +*** Test Cases *** +046_19 Check that only the attribute instances that match the datasetId member are included in the entity in the notification + [Documentation] If a subscription has a datasetId member instances should be filtered based on that datasetId. + [Tags] sub-notification 4_5_5 5_8_6 since_v1.8.1 + + ${response}= Update Entity Attributes ${entity_id} ${fragment_filename} ${CONTENT_TYPE_LD_JSON} + + ${notification} ${headers}= Wait for notification timeout=${10} + + Should be Equal ${subscription_id} ${notification}[subscriptionId] + Should be Equal ${entity_id} ${notification}[data][0][id] + + Check Notification Containing Entity Element + ... ${entity_expectation_file_path} + ... ${notification} + + +*** Keywords *** +Before Test + Start Local Server ${notification_server_host} ${notification_server_port} + Add Initial Entity + Sleep 1s + Setup Initial Subscription + +Add Initial Entity + ${entity_id}= Generate Random Building Entity Id + ${create_response}= Create Entity ${entity_building_filepath} ${entity_id} + Check Response Status Code 201 ${create_response.status_code} + Set Suite Variable ${entity_id} + +Setup Initial Subscription + ${subscription_id}= Generate Random Subscription Id + ${subscription_payload}= Load Subscription Sample With Reachable Endpoint + ... ${subscription_payload_file_path} + ... ${subscription_id} + ... ${notification_server_send_url} + ${subscription_payload}= Set Entity Id In Subscription ${subscription_payload} ${entity_id} + ${create_response}= Create Subscription From Subscription Payload + ... ${subscription_payload} + ... ${CONTENT_TYPE_LD_JSON} + Check Response Status Code 201 ${create_response.status_code} + Set Suite Variable ${subscription_id} + +After Test + Delete Initial Subscription + Delete Initial Entity + Stop Local Server + +Delete Initial Subscription + Delete Subscription ${subscription_id} + +Delete Initial Entity + Delete Entity by Id ${entity_id} diff --git a/data/entities/expectations/building-default-instances.jsonld b/data/entities/expectations/building-default-instances.jsonld new file mode 100644 index 000000000..bd7248c7c --- /dev/null +++ b/data/entities/expectations/building-default-instances.jsonld @@ -0,0 +1,15 @@ +{ + "id": "urn:ngsi-ld:Building:randomUUID", + "type": "Building", + "name": { + "type": "Property", + "value": "Eiffel Tower" + }, + "locatedAt": { + "type": "Relationship", + "object": "urn:ngsi-ld:City:Paris" + }, + "@context": [ + "https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/develop/resources/jsonld-contexts/ngsi-ld-test-suite-compound.jsonld" + ] +} \ No newline at end of file diff --git a/data/entities/expectations/building-french-datasetid-only.jsonld b/data/entities/expectations/building-french-datasetid-only.jsonld new file mode 100644 index 000000000..716ab7a27 --- /dev/null +++ b/data/entities/expectations/building-french-datasetid-only.jsonld @@ -0,0 +1,17 @@ +{ + "id": "urn:ngsi-ld:Building:randomUUID", + "type": "Building", + "name": { + "type": "Property", + "value": "Tour Eiffel", + "datasetId": "urn:ngsi-ld:Dataset:french-name" + }, + "locatedAt": { + "type": "Relationship", + "object": "urn:ngsi-ld:Ville:Paris", + "datasetId": "urn:ngsi-ld:Dataset:french-name" + }, + "@context": [ + "https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/develop/resources/jsonld-contexts/ngsi-ld-test-suite-compound.jsonld" + ] +} \ No newline at end of file diff --git a/data/entities/expectations/building-name-attribute-default-instance.jsonld b/data/entities/expectations/building-name-attribute-default-instance.jsonld new file mode 100644 index 000000000..b8b1cc8ee --- /dev/null +++ b/data/entities/expectations/building-name-attribute-default-instance.jsonld @@ -0,0 +1,11 @@ +{ + "id": "urn:ngsi-ld:Building:randomUUID", + "type": "Building", + "name": { + "type": "Property", + "value": "Eiffel Tower" + }, + "@context": [ + "https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/develop/resources/jsonld-contexts/ngsi-ld-test-suite-compound.jsonld" + ] +} \ No newline at end of file diff --git a/data/entities/expectations/building-name-attribute-german-instance.jsonld b/data/entities/expectations/building-name-attribute-german-instance.jsonld new file mode 100644 index 000000000..1317cd4ea --- /dev/null +++ b/data/entities/expectations/building-name-attribute-german-instance.jsonld @@ -0,0 +1,12 @@ +{ + "id": "urn:ngsi-ld:Building:randomUUID", + "type": "Building", + "name": { + "type": "Property", + "value": "Eiffelturm", + "datasetId": "urn:ngsi-ld:Dataset:german-name" + }, + "@context": [ + "https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/develop/resources/jsonld-contexts/ngsi-ld-test-suite-compound.jsonld" + ] +} \ No newline at end of file diff --git a/data/entities/expectations/building-name-attribute.jsonld b/data/entities/expectations/building-name-attribute.jsonld new file mode 100644 index 000000000..c81ab6520 --- /dev/null +++ b/data/entities/expectations/building-name-attribute.jsonld @@ -0,0 +1,23 @@ +{ + "id": "urn:ngsi-ld:Building:randomUUID", + "type": "Building", + "name": [ + { + "type": "Property", + "value": "Eiffel Tower" + }, + { + "type": "Property", + "value": "Tour Eiffel", + "datasetId": "urn:ngsi-ld:Dataset:french-name" + }, + { + "type": "Property", + "value": "Eiffelturm", + "datasetId": "urn:ngsi-ld:Dataset:german-name" + } + ], + "@context": [ + "https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/develop/resources/jsonld-contexts/ngsi-ld-test-suite-compound.jsonld" + ] +} \ No newline at end of file diff --git a/data/entities/expectations/building-no-attributes.jsonld b/data/entities/expectations/building-no-attributes.jsonld new file mode 100644 index 000000000..81f04c1b5 --- /dev/null +++ b/data/entities/expectations/building-no-attributes.jsonld @@ -0,0 +1,7 @@ +{ + "id": "urn:ngsi-ld:Building:randomUUID", + "type": "Building", + "@context": [ + "https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/develop/resources/jsonld-contexts/ngsi-ld-test-suite-compound.jsonld" + ] +} \ No newline at end of file diff --git a/data/entities/expectations/building-two-datasetids.jsonld b/data/entities/expectations/building-two-datasetids.jsonld new file mode 100644 index 000000000..2efaff8e9 --- /dev/null +++ b/data/entities/expectations/building-two-datasetids.jsonld @@ -0,0 +1,24 @@ +{ + "id": "urn:ngsi-ld:Building:randomUUID", + "type": "Building", + "name": { + "type": "Property", + "value": "Tour Eiffel", + "datasetId": "urn:ngsi-ld:Dataset:french-name" + }, + "locatedAt": [ + { + "type": "Relationship", + "object": "urn:ngsi-ld:Ville:Paris", + "datasetId": "urn:ngsi-ld:Dataset:french-name" + }, + { + "type": "Relationship", + "object": "urn:ngsi-ld:Ciudad:ParĂ­s", + "datasetId": "urn:ngsi-ld:Dataset:spanish-name" + } + ], + "@context": [ + "https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/develop/resources/jsonld-contexts/ngsi-ld-test-suite-compound.jsonld" + ] +} \ No newline at end of file diff --git a/data/entities/fragmentEntities/building-name-fragment.jsonld b/data/entities/fragmentEntities/building-name-fragment.jsonld new file mode 100644 index 000000000..7a8ded40e --- /dev/null +++ b/data/entities/fragmentEntities/building-name-fragment.jsonld @@ -0,0 +1,10 @@ +{ + "name": { + "type": "Property", + "value": "Le Tour Eiffel", + "datasetId": "urn:ngsi-ld:Dataset:french-name" + }, + "@context": [ + "https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/develop/resources/jsonld-contexts/ngsi-ld-test-suite-compound.jsonld" + ] +} \ No newline at end of file diff --git a/data/subscriptions/expectations/entity-with-datasetid-046-19.jsonld b/data/subscriptions/expectations/entity-with-datasetid-046-19.jsonld new file mode 100644 index 000000000..fb235a865 --- /dev/null +++ b/data/subscriptions/expectations/entity-with-datasetid-046-19.jsonld @@ -0,0 +1,15 @@ +{ + "id": "urn:ngsi-ld:Building:randomUUID", + "type": "Building", + "name": { + "type": "Property", + "value": "Le Tour Eiffel", + "datasetId": "urn:ngsi-ld:Dataset:french-name" + }, + "locatedAt": { + "type": "Relationship", + "datasetId": "urn:ngsi-ld:Dataset:french-name", + "object": "urn:ngsi-ld:Ville:Paris" + }, + "@context": "https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/develop/resources/jsonld-contexts/ngsi-ld-test-suite-compound.jsonld" +} diff --git a/data/subscriptions/expectations/subscription-with-datasetId.jsonld b/data/subscriptions/expectations/subscription-with-datasetId.jsonld new file mode 100644 index 000000000..2eb1596da --- /dev/null +++ b/data/subscriptions/expectations/subscription-with-datasetId.jsonld @@ -0,0 +1,27 @@ +{ + "id": "urn:ngsi-ld:Subscription:randomUUID", + "type": "Subscription", + "entities": [ + { + "type": "Building" + } + ], + "notificationTrigger": [ + "attributeCreated", + "attributeUpdated" + ], + "notification": { + "format": "normalized", + "endpoint": { + "uri": "http://my.endpoint.org/notify", + "accept": "application/ld+json" + } + }, + "datasetId": [ + "urn:ngsi-ld:Dataset:french-name" + ], + "status": "active", + "@context": [ + "https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/develop/resources/jsonld-contexts/ngsi-ld-test-suite-compound.jsonld" + ] +} \ No newline at end of file diff --git a/data/subscriptions/subscription-building-with-datasetId.jsonld b/data/subscriptions/subscription-building-with-datasetId.jsonld new file mode 100644 index 000000000..4e292dee3 --- /dev/null +++ b/data/subscriptions/subscription-building-with-datasetId.jsonld @@ -0,0 +1,22 @@ +{ + "id": "urn:ngsi-ld:Subscription:randomUUID", + "type": "Subscription", + "entities": [ + { + "type": "Building" + } + ], + "notification": { + "format": "normalized", + "endpoint": { + "uri": "http://my.endpoint.org/notify", + "accept": "application/ld+json" + } + }, + "datasetId": [ + "urn:ngsi-ld:Dataset:french-name" + ], + "@context": [ + "https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/develop/resources/jsonld-contexts/ngsi-ld-test-suite-compound.jsonld" + ] +} \ No newline at end of file diff --git a/data/temporalEntities/expectations/empty.json b/data/temporalEntities/expectations/empty.json new file mode 100644 index 000000000..0637a088a --- /dev/null +++ b/data/temporalEntities/expectations/empty.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/data/temporalEntities/expectations/vehicle-temporal-representation-common-datasetid.json b/data/temporalEntities/expectations/vehicle-temporal-representation-common-datasetid.json new file mode 100644 index 000000000..f9ed855e9 --- /dev/null +++ b/data/temporalEntities/expectations/vehicle-temporal-representation-common-datasetid.json @@ -0,0 +1,30 @@ +[ + { + "id": "urn:ngsi-ld:Vehicle:021-18-A", + "type": "Vehicle", + "speed": { + "type": "Property", + "datasetId": "urn:ngsi-ld:Dataset:Common", + "values": [ + [ + 80.0, + "2020-09-01T12:05:00Z" + ], + [ + 90.0, + "2020-09-01T13:05:00Z" + ] + ] + }, + "fuelLevel": { + "type": "Property", + "datasetId": "urn:ngsi-ld:Dataset:Common", + "values": [ + [ + 53.0, + "2020-09-01T13:05:00Z" + ] + ] + } + } +] \ No newline at end of file diff --git a/data/temporalEntities/expectations/vehicle-temporal-representation-default-instances.json b/data/temporalEntities/expectations/vehicle-temporal-representation-default-instances.json new file mode 100644 index 000000000..783ad10cb --- /dev/null +++ b/data/temporalEntities/expectations/vehicle-temporal-representation-default-instances.json @@ -0,0 +1,28 @@ +[ + { + "id": "urn:ngsi-ld:Vehicle:021-18-A", + "type": "Vehicle", + "speed": { + "type": "Property", + "values": [ + [ + 120, + "2020-09-01T12:03:00Z" + ] + ] + }, + "fuelLevel": { + "type": "Property", + "values": [ + [ + 67.0, + "2020-09-01T12:03:00Z" + ], + [ + 68.0, + "2020-09-01T12:03:30Z" + ] + ] + } + } +] \ No newline at end of file diff --git a/data/temporalEntities/expectations/vehicle-temporal-representation-fuellevel-attribute-fuel-datasetid.json b/data/temporalEntities/expectations/vehicle-temporal-representation-fuellevel-attribute-fuel-datasetid.json new file mode 100644 index 000000000..df207490f --- /dev/null +++ b/data/temporalEntities/expectations/vehicle-temporal-representation-fuellevel-attribute-fuel-datasetid.json @@ -0,0 +1,16 @@ +[ + { + "id": "urn:ngsi-ld:Vehicle:021-18-A", + "type": "Vehicle", + "fuelLevel": { + "type": "Property", + "datasetId": "urn:ngsi-ld:Dataset:fuel", + "values": [ + [ + 40, + "2020-09-01T14:07:00Z" + ] + ] + } + } +] \ No newline at end of file diff --git a/data/temporalEntities/expectations/vehicle-temporal-representation-speed-attribute.json b/data/temporalEntities/expectations/vehicle-temporal-representation-speed-attribute.json new file mode 100644 index 000000000..c5debe31e --- /dev/null +++ b/data/temporalEntities/expectations/vehicle-temporal-representation-speed-attribute.json @@ -0,0 +1,45 @@ +[ + { + "id": "urn:ngsi-ld:Vehicle:021-18-A", + "type": "Vehicle", + "speed": [ + { + "type": "Property", + "values": [ + [ + 120.0, + "2020-09-01T12:03:00Z" + ] + ] + }, + { + "type": "Property", + "datasetId": "urn:ngsi-ld:Dataset:Speed", + "values": [ + [ + 60.0, + "2020-09-01T12:05:00Z" + ], + [ + 62.0, + "2020-09-01T12:15:00Z" + ] + ] + }, + { + "type": "Property", + "datasetId": "urn:ngsi-ld:Dataset:Common", + "values": [ + [ + 80.0, + "2020-09-01T12:05:00Z" + ], + [ + 90.0, + "2020-09-01T13:05:00Z" + ] + ] + } + ] + } +] \ No newline at end of file diff --git a/data/temporalEntities/expectations/vehicle-temporal-representation-speed-default-instance.json b/data/temporalEntities/expectations/vehicle-temporal-representation-speed-default-instance.json new file mode 100644 index 000000000..96ba4ccde --- /dev/null +++ b/data/temporalEntities/expectations/vehicle-temporal-representation-speed-default-instance.json @@ -0,0 +1,15 @@ +[ + { + "id": "urn:ngsi-ld:Vehicle:021-18-A", + "type": "Vehicle", + "speed": { + "type": "Property", + "values": [ + [ + 120, + "2020-09-01T12:03:00Z" + ] + ] + } + } +] \ No newline at end of file diff --git a/data/temporalEntities/expectations/vehicle-temporal-representation-two-datasetids.json b/data/temporalEntities/expectations/vehicle-temporal-representation-two-datasetids.json new file mode 100644 index 000000000..876bc48a6 --- /dev/null +++ b/data/temporalEntities/expectations/vehicle-temporal-representation-two-datasetids.json @@ -0,0 +1,46 @@ +[ + { + "id": "urn:ngsi-ld:Vehicle:021-18-A", + "type": "Vehicle", + "speed": [ + { + "type": "Property", + "datasetId": "urn:ngsi-ld:Dataset:Speed", + "values": [ + [ + 60.0, + "2020-09-01T12:05:00Z" + ], + [ + 62.0, + "2020-09-01T12:15:00Z" + ] + ] + }, + { + "type": "Property", + "datasetId": "urn:ngsi-ld:Dataset:Common", + "values": [ + [ + 80.0, + "2020-09-01T12:05:00Z" + ], + [ + 90.0, + "2020-09-01T13:05:00Z" + ] + ] + } + ], + "fuelLevel": { + "type": "Property", + "datasetId": "urn:ngsi-ld:Dataset:Common", + "values": [ + [ + 53, + "2020-09-01T13:05:00Z" + ] + ] + } + } +] \ No newline at end of file diff --git a/data/temporalEntities/vehicle-temporal-representation-with-multi-attributes-instances.jsonld b/data/temporalEntities/vehicle-temporal-representation-with-multi-attributes-instances.jsonld new file mode 100644 index 000000000..f26b73bc1 --- /dev/null +++ b/data/temporalEntities/vehicle-temporal-representation-with-multi-attributes-instances.jsonld @@ -0,0 +1,62 @@ +{ + "id":"urn:ngsi-ld:Vehicle:randomUUID", + "type":"Vehicle", + "speed":[ + { + "type":"Property", + "value":120, + "observedAt":"2020-09-01T12:03:00Z" + }, + { + "type":"Property", + "value":80, + "observedAt":"2020-09-01T12:05:00Z", + "datasetId": "urn:ngsi-ld:Dataset:Common" + }, + { + "type":"Property", + "value":90, + "observedAt":"2020-09-01T13:05:00Z", + "datasetId": "urn:ngsi-ld:Dataset:Common" + }, + { + "type":"Property", + "value":60, + "observedAt":"2020-09-01T12:05:00Z", + "datasetId": "urn:ngsi-ld:Dataset:Speed" + }, + { + "type":"Property", + "value":62, + "observedAt":"2020-09-01T12:15:00Z", + "datasetId": "urn:ngsi-ld:Dataset:Speed" + } + ], + "fuelLevel":[ + { + "type":"Property", + "value":67, + "observedAt":"2020-09-01T12:03:00Z" + }, + { + "type":"Property", + "value":68, + "observedAt":"2020-09-01T12:03:30Z" + }, + { + "type":"Property", + "value":53, + "observedAt":"2020-09-01T13:05:00Z", + "datasetId": "urn:ngsi-ld:Dataset:Common" + }, + { + "type":"Property", + "value":40, + "observedAt":"2020-09-01T14:07:00Z", + "datasetId":"urn:ngsi-ld:Dataset:fuel" + } + ], + "@context": [ + "https://easy-global-market.github.io/ngsild-api-data-models/ngsildTestSuite/ngsildTestSuiteV1.8-compound.jsonld" + ] +} \ No newline at end of file diff --git a/doc/analysis/requests.py b/doc/analysis/requests.py index adb4ec00e..d098ffa08 100644 --- a/doc/analysis/requests.py +++ b/doc/analysis/requests.py @@ -62,7 +62,8 @@ class Requests: 'params': ['context', 'entity_types', 'entity_ids', 'entity_id_pattern', 'ngsild_query', 'csf', 'georel', 'geometry', 'coordinates', 'geoproperty', 'timerel', 'timeAt', 'endTimeAt', - 'attrs', 'limit', 'lastN', 'accept', 'options', 'aggrMethods', 'aggrPeriodDuration'] + 'attrs', 'limit', 'lastN', 'accept', 'options', 'datasetId', + 'aggrMethods', 'aggrPeriodDuration'] }, 'Query Temporal Representation Of Entities Via Post': { 'positions': [], @@ -85,7 +86,7 @@ class Requests: 'params': ['entity_ids', 'entity_types', 'accept', 'attrs', 'context', 'geoproperty', 'options', 'limit', 'entity_id_pattern', - 'scopeq', 'georel', 'coordinates', 'geometry', 'count', 'q'] + 'scopeq', 'georel', 'coordinates', 'geometry', 'count', 'q', 'datasetId'] }, 'Query Entities Via POST': { 'positions': [], @@ -1132,7 +1133,7 @@ class Requests: expected_parameters = ['context', 'entity_types', 'entity_ids', 'entity_id_pattern', 'ngsild_query', 'csf', 'georel', 'geometry', 'coordinates', 'geoproperty', 'timerel', 'timeAt','endTimeAt', - 'attrs', 'limit', 'lastN', 'accept', 'options','aggrMethods','aggrPeriodDuration'] + 'attrs', 'limit', 'lastN', 'accept', 'options', 'datasetId', 'aggrMethods','aggrPeriodDuration'] result = [x for x in kwargs if x not in expected_parameters] response = "Query Temporal Representation of Entities" @@ -1180,6 +1181,9 @@ class Requests: response = f"{response} and\n Query Parameter: aggrMethods set to '{value}'" case 'aggrPeriodDuration': response = f"{response} and\n Query Parameter: aggrPeriodDuration set to '{value}'" + case 'datasetId': + response = f"{response} and\n Query Parameter: datasetId set to '{value}'" + # If an exact match is not confirmed, this last case will be used if provided case _: raise Exception(f"ERROR: unexpected attribute(s) {result}, the attributes expected are " @@ -1253,7 +1257,7 @@ class Requests: expected_parameters = ['entity_ids', 'entity_types', 'accept', 'attrs', 'context', 'geoproperty', 'options', 'limit', 'entity_id_pattern', - 'scopeq', 'georel', 'coordinates', 'geometry', 'count' , 'q'] + 'scopeq', 'georel', 'coordinates', 'geometry', 'count' , 'q' , 'datasetId'] result = [x for x in kwargs if x not in expected_parameters] response = "Get Entities Request:" @@ -1290,6 +1294,8 @@ class Requests: response = f"{response} and\n Query Parameter: count set to '{value}'" case 'q': response = f"{response} and\n Query Parameter: q set to '{value}'" + case 'datasetId': + response = f"{response} and\n Query Parameter: datasetId set to '{value}'" case _: raise Exception(f"ERROR: unexpected attribute(s) {result}, the attributes expected are " f"{expected_parameters}, but received: {kwargs}") diff --git a/doc/files/ContextInformation/Consumption/019_12.json b/doc/files/ContextInformation/Consumption/019_12.json new file mode 100644 index 000000000..ca52b6223 --- /dev/null +++ b/doc/files/ContextInformation/Consumption/019_12.json @@ -0,0 +1,152 @@ +{ + "tp_id": "TP/NGSI-LD/CI/Cons/E/019_12", + "test_objective": "Check that one can filter attribute instances based on datasetId.", + "reference": "ETSI GS CIM 009 V1.8.1 [], clauses 4.5.5, 5.7.2", + "config_id": "", + "parent_release": "v1.8.1", + "clauses": [ + "4.5.5", + "5.7.2" + ], + "pics_selection": "", + "keywords": [ + "Filter attribute instances based on datasetId", + "Setup Initial Entity", + "Delete Entity" + ], + "teardown": "Delete Entity", + "initial_condition": "with {\n the SUT containing an initial state\n}", + "test_cases": [ + { + "name": "019_12_01 filter based on attrs only", + "permutation_tp_id": "TP/NGSI-LD/CI/Cons/E/019_12_01", + "doc": "Check that one can filter attribute instances based on datasetId.", + "tags": [ + "4_5_5", + "5_7_2", + "e-query", + "since_v1.8.1" + ], + "setup": null, + "teardown": null, + "template": "Filter attribute instances based on datasetId", + "then": "then {\n the SUT sends a valid Response for the operations:\n Query Entities with Response Status Code set to 200 and\n Query Entities with Response Body containing en entity element with id set to 'entity_id=${entity_id}' and body content set to 'building-name-attribute.jsonld'\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/entities/'\n method set to 'GET'\n Get Entities Request: and\n Query Parameter: attrs set to '${attrsToMatch}' and\n Query Parameter: datasetId set to '${datasetId}' and\n Query Parameter: entity_types set to 'Building' and\n Query Parameter: Link set to '<$https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/develop/resources/jsonld-contexts/ngsi-ld-test-suite-compound.jsonld>; rel=\"http://www.w3.org/ns/json-ld#context\";type=\"application/ld+json\"' and\n Query Parameter: accept set to 'application/ld+json'\n}", + "http_verb": "GET", + "endpoint": "entities/" + }, + { + "name": "019_12_02 filter based on datasetId only", + "permutation_tp_id": "TP/NGSI-LD/CI/Cons/E/019_12_02", + "doc": "Check that one can filter attribute instances based on datasetId.", + "tags": [ + "4_5_5", + "5_7_2", + "e-query", + "since_v1.8.1" + ], + "setup": null, + "teardown": null, + "template": "Filter attribute instances based on datasetId", + "then": "then {\n the SUT sends a valid Response for the operations:\n Query Entities with Response Status Code set to 200 and\n Query Entities with Response Body containing en entity element with id set to 'entity_id=${entity_id}' and body content set to 'building-french-datasetid-only.jsonld'\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/entities/'\n method set to 'GET'\n Get Entities Request: and\n Query Parameter: attrs set to '${attrsToMatch}' and\n Query Parameter: datasetId set to '${datasetId}' and\n Query Parameter: entity_types set to 'Building' and\n Query Parameter: Link set to '<$https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/develop/resources/jsonld-contexts/ngsi-ld-test-suite-compound.jsonld>; rel=\"http://www.w3.org/ns/json-ld#context\";type=\"application/ld+json\"' and\n Query Parameter: accept set to 'application/ld+json'\n}", + "http_verb": "GET", + "endpoint": "entities/" + }, + { + "name": "019_12_03 filter based on two datasetIds", + "permutation_tp_id": "TP/NGSI-LD/CI/Cons/E/019_12_03", + "doc": "Check that one can filter attribute instances based on datasetId.", + "tags": [ + "4_5_5", + "5_7_2", + "e-query", + "since_v1.8.1" + ], + "setup": null, + "teardown": null, + "template": "Filter attribute instances based on datasetId", + "then": "then {\n the SUT sends a valid Response for the operations:\n Query Entities with Response Status Code set to 200 and\n Query Entities with Response Body containing en entity element with id set to 'entity_id=${entity_id}' and body content set to 'building-two-datasetids.jsonld'\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/entities/'\n method set to 'GET'\n Get Entities Request: and\n Query Parameter: attrs set to '${attrsToMatch}' and\n Query Parameter: datasetId set to '${datasetId}' and\n Query Parameter: entity_types set to 'Building' and\n Query Parameter: Link set to '<$https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/develop/resources/jsonld-contexts/ngsi-ld-test-suite-compound.jsonld>; rel=\"http://www.w3.org/ns/json-ld#context\";type=\"application/ld+json\"' and\n Query Parameter: accept set to 'application/ld+json'\n}", + "http_verb": "GET", + "endpoint": "entities/" + }, + { + "name": "019_12_04 filter based on default instance", + "permutation_tp_id": "TP/NGSI-LD/CI/Cons/E/019_12_04", + "doc": "Check that one can filter attribute instances based on datasetId.", + "tags": [ + "4_5_5", + "5_7_2", + "e-query", + "since_v1.8.1" + ], + "setup": null, + "teardown": null, + "template": "Filter attribute instances based on datasetId", + "then": "then {\n the SUT sends a valid Response for the operations:\n Query Entities with Response Status Code set to 200 and\n Query Entities with Response Body containing en entity element with id set to 'entity_id=${entity_id}' and body content set to 'building-default-instances.jsonld'\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/entities/'\n method set to 'GET'\n Get Entities Request: and\n Query Parameter: attrs set to '${attrsToMatch}' and\n Query Parameter: datasetId set to '${datasetId}' and\n Query Parameter: entity_types set to 'Building' and\n Query Parameter: Link set to '<$https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/develop/resources/jsonld-contexts/ngsi-ld-test-suite-compound.jsonld>; rel=\"http://www.w3.org/ns/json-ld#context\";type=\"application/ld+json\"' and\n Query Parameter: accept set to 'application/ld+json'\n}", + "http_verb": "GET", + "endpoint": "entities/" + }, + { + "name": "019_12_05 filter based on attrs and default instance", + "permutation_tp_id": "TP/NGSI-LD/CI/Cons/E/019_12_05", + "doc": "Check that one can filter attribute instances based on datasetId.", + "tags": [ + "4_5_5", + "5_7_2", + "e-query", + "since_v1.8.1" + ], + "setup": null, + "teardown": null, + "template": "Filter attribute instances based on datasetId", + "then": "then {\n the SUT sends a valid Response for the operations:\n Query Entities with Response Status Code set to 200 and\n Query Entities with Response Body containing en entity element with id set to 'entity_id=${entity_id}' and body content set to 'building-name-attribute-default-instance.jsonld'\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/entities/'\n method set to 'GET'\n Get Entities Request: and\n Query Parameter: attrs set to '${attrsToMatch}' and\n Query Parameter: datasetId set to '${datasetId}' and\n Query Parameter: entity_types set to 'Building' and\n Query Parameter: Link set to '<$https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/develop/resources/jsonld-contexts/ngsi-ld-test-suite-compound.jsonld>; rel=\"http://www.w3.org/ns/json-ld#context\";type=\"application/ld+json\"' and\n Query Parameter: accept set to 'application/ld+json'\n}", + "http_verb": "GET", + "endpoint": "entities/" + }, + { + "name": "019_12_06 filter based on attrs and datasetId", + "permutation_tp_id": "TP/NGSI-LD/CI/Cons/E/019_12_06", + "doc": "Check that one can filter attribute instances based on datasetId.", + "tags": [ + "4_5_5", + "5_7_2", + "e-query", + "since_v1.8.1" + ], + "setup": null, + "teardown": null, + "template": "Filter attribute instances based on datasetId", + "then": "then {\n the SUT sends a valid Response for the operations:\n Query Entities with Response Status Code set to 200 and\n Query Entities with Response Body containing en entity element with id set to 'entity_id=${entity_id}' and body content set to 'building-name-attribute-german-instance.jsonld'\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/entities/'\n method set to 'GET'\n Get Entities Request: and\n Query Parameter: attrs set to '${attrsToMatch}' and\n Query Parameter: datasetId set to '${datasetId}' and\n Query Parameter: entity_types set to 'Building' and\n Query Parameter: Link set to '<$https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/develop/resources/jsonld-contexts/ngsi-ld-test-suite-compound.jsonld>; rel=\"http://www.w3.org/ns/json-ld#context\";type=\"application/ld+json\"' and\n Query Parameter: accept set to 'application/ld+json'\n}", + "http_verb": "GET", + "endpoint": "entities/" + }, + { + "name": "019_12_07 filter based on attrs and datasetId with no match", + "permutation_tp_id": "TP/NGSI-LD/CI/Cons/E/019_12_07", + "doc": "Check that one can filter attribute instances based on datasetId.", + "tags": [ + "4_5_5", + "5_7_2", + "e-query", + "since_v1.8.1" + ], + "setup": null, + "teardown": null, + "template": "Filter attribute instances based on datasetId", + "then": "then {\n the SUT sends a valid Response for the operations:\n Query Entities with Response Status Code set to 200 and\n Query Entities with Response Body containing en entity element with id set to 'entity_id=${entity_id}' and body content set to 'building-no-attributes.jsonld'\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/entities/'\n method set to 'GET'\n Get Entities Request: and\n Query Parameter: attrs set to '${attrsToMatch}' and\n Query Parameter: datasetId set to '${datasetId}' and\n Query Parameter: entity_types set to 'Building' and\n Query Parameter: Link set to '<$https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/develop/resources/jsonld-contexts/ngsi-ld-test-suite-compound.jsonld>; rel=\"http://www.w3.org/ns/json-ld#context\";type=\"application/ld+json\"' and\n Query Parameter: accept set to 'application/ld+json'\n}", + "http_verb": "GET", + "endpoint": "entities/" + } + ], + "permutations": [ + "then" + ], + "robotpath": "ContextInformation/Consumption/Entity/QueryEntities", + "robotfile": "019_12" +} \ No newline at end of file diff --git a/doc/files/ContextInformation/Consumption/021_18.json b/doc/files/ContextInformation/Consumption/021_18.json new file mode 100644 index 000000000..09d915932 --- /dev/null +++ b/doc/files/ContextInformation/Consumption/021_18.json @@ -0,0 +1,152 @@ +{ + "tp_id": "TP/NGSI-LD/CI/Cons/TE/021_18", + "test_objective": "Check that one can filter attribute instances of a temporal entity based on datasetId.", + "reference": "ETSI GS CIM 009 V1.8.1 [], clauses 4.5.5, 5.7.4", + "config_id": "", + "parent_release": "v1.8.1", + "clauses": [ + "4.5.5", + "5.7.4" + ], + "pics_selection": "", + "keywords": [ + "Filter attribute instances of a temporal entity based on datasetId", + "Setup Initial Temporal Entity", + "Delete Temporal Entity" + ], + "teardown": "Delete Temporal Entity", + "initial_condition": "with {\n the SUT containing an initial state\n}", + "test_cases": [ + { + "name": "021_18_01 filter based on attrs only", + "permutation_tp_id": "TP/NGSI-LD/CI/Cons/TE/021_18_01", + "doc": "Check that one can filter attribute instances of a temporal entity based on datasetId.", + "tags": [ + "4_5_5", + "5_7_4", + "since_v1.8.1", + "te-query" + ], + "setup": null, + "teardown": null, + "template": "Filter attribute instances of a temporal entity based on datasetId", + "then": "then {\n the SUT sends a valid Response for the operations:\n Query Temporal Representation Of Entities with Response Status Code set to 200 and\n Query Temporal Representation Of Entities with Response Body containing EntityTemporal element containing attribute instances in the time range specified by the NGSI-LD temporal query:\n * the payload is defined in the file set to 'vehicle-temporal-representation-speed-attribute.json'\n * the id was changed to 'temporal_entity_representation_id=${temporal_entity_id}'\n * response body to be checked set to 'response_body=${response.json()}'\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/temporal/entities'\n method set to 'GET'\n Query Temporal Representation of Entities and\n Query Parameter: attrs set to '${attrsToMatch}' and\n Query Parameter: datasetId set to '${datasetId}' and\n Query Parameter: entity_types set to 'Vehicle' and\n Query Parameter: timerel set to '${timerel}' and\n Query Parameter: timeAt set to '${timeat}' and\n Query Parameter: context set to 'https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/develop/resources/jsonld-contexts/ngsi-ld-test-suite-compound.jsonld' and\n Query Parameter: options set to 'temporalValues'\n}", + "http_verb": "GET", + "endpoint": "temporal/entities" + }, + { + "name": "021_18_02 filter based on datasetId only", + "permutation_tp_id": "TP/NGSI-LD/CI/Cons/TE/021_18_02", + "doc": "Check that one can filter attribute instances of a temporal entity based on datasetId.", + "tags": [ + "4_5_5", + "5_7_4", + "since_v1.8.1", + "te-query" + ], + "setup": null, + "teardown": null, + "template": "Filter attribute instances of a temporal entity based on datasetId", + "then": "then {\n the SUT sends a valid Response for the operations:\n Query Temporal Representation Of Entities with Response Status Code set to 200 and\n Query Temporal Representation Of Entities with Response Body containing EntityTemporal element containing attribute instances in the time range specified by the NGSI-LD temporal query:\n * the payload is defined in the file set to 'vehicle-temporal-representation-common-datasetid.json'\n * the id was changed to 'temporal_entity_representation_id=${temporal_entity_id}'\n * response body to be checked set to 'response_body=${response.json()}'\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/temporal/entities'\n method set to 'GET'\n Query Temporal Representation of Entities and\n Query Parameter: attrs set to '${attrsToMatch}' and\n Query Parameter: datasetId set to '${datasetId}' and\n Query Parameter: entity_types set to 'Vehicle' and\n Query Parameter: timerel set to '${timerel}' and\n Query Parameter: timeAt set to '${timeat}' and\n Query Parameter: context set to 'https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/develop/resources/jsonld-contexts/ngsi-ld-test-suite-compound.jsonld' and\n Query Parameter: options set to 'temporalValues'\n}", + "http_verb": "GET", + "endpoint": "temporal/entities" + }, + { + "name": "021_18_03 filter based on two datasetIds", + "permutation_tp_id": "TP/NGSI-LD/CI/Cons/TE/021_18_03", + "doc": "Check that one can filter attribute instances of a temporal entity based on datasetId.", + "tags": [ + "4_5_5", + "5_7_4", + "since_v1.8.1", + "te-query" + ], + "setup": null, + "teardown": null, + "template": "Filter attribute instances of a temporal entity based on datasetId", + "then": "then {\n the SUT sends a valid Response for the operations:\n Query Temporal Representation Of Entities with Response Status Code set to 200 and\n Query Temporal Representation Of Entities with Response Body containing EntityTemporal element containing attribute instances in the time range specified by the NGSI-LD temporal query:\n * the payload is defined in the file set to 'vehicle-temporal-representation-two-datasetids.json'\n * the id was changed to 'temporal_entity_representation_id=${temporal_entity_id}'\n * response body to be checked set to 'response_body=${response.json()}'\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/temporal/entities'\n method set to 'GET'\n Query Temporal Representation of Entities and\n Query Parameter: attrs set to '${attrsToMatch}' and\n Query Parameter: datasetId set to '${datasetId}' and\n Query Parameter: entity_types set to 'Vehicle' and\n Query Parameter: timerel set to '${timerel}' and\n Query Parameter: timeAt set to '${timeat}' and\n Query Parameter: context set to 'https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/develop/resources/jsonld-contexts/ngsi-ld-test-suite-compound.jsonld' and\n Query Parameter: options set to 'temporalValues'\n}", + "http_verb": "GET", + "endpoint": "temporal/entities" + }, + { + "name": "021_18_04 filter based on default instance", + "permutation_tp_id": "TP/NGSI-LD/CI/Cons/TE/021_18_04", + "doc": "Check that one can filter attribute instances of a temporal entity based on datasetId.", + "tags": [ + "4_5_5", + "5_7_4", + "since_v1.8.1", + "te-query" + ], + "setup": null, + "teardown": null, + "template": "Filter attribute instances of a temporal entity based on datasetId", + "then": "then {\n the SUT sends a valid Response for the operations:\n Query Temporal Representation Of Entities with Response Status Code set to 200 and\n Query Temporal Representation Of Entities with Response Body containing EntityTemporal element containing attribute instances in the time range specified by the NGSI-LD temporal query:\n * the payload is defined in the file set to 'vehicle-temporal-representation-default-instances.json'\n * the id was changed to 'temporal_entity_representation_id=${temporal_entity_id}'\n * response body to be checked set to 'response_body=${response.json()}'\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/temporal/entities'\n method set to 'GET'\n Query Temporal Representation of Entities and\n Query Parameter: attrs set to '${attrsToMatch}' and\n Query Parameter: datasetId set to '${datasetId}' and\n Query Parameter: entity_types set to 'Vehicle' and\n Query Parameter: timerel set to '${timerel}' and\n Query Parameter: timeAt set to '${timeat}' and\n Query Parameter: context set to 'https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/develop/resources/jsonld-contexts/ngsi-ld-test-suite-compound.jsonld' and\n Query Parameter: options set to 'temporalValues'\n}", + "http_verb": "GET", + "endpoint": "temporal/entities" + }, + { + "name": "021_18_05 filter based on attrs and default instance", + "permutation_tp_id": "TP/NGSI-LD/CI/Cons/TE/021_18_05", + "doc": "Check that one can filter attribute instances of a temporal entity based on datasetId.", + "tags": [ + "4_5_5", + "5_7_4", + "since_v1.8.1", + "te-query" + ], + "setup": null, + "teardown": null, + "template": "Filter attribute instances of a temporal entity based on datasetId", + "then": "then {\n the SUT sends a valid Response for the operations:\n Query Temporal Representation Of Entities with Response Status Code set to 200 and\n Query Temporal Representation Of Entities with Response Body containing EntityTemporal element containing attribute instances in the time range specified by the NGSI-LD temporal query:\n * the payload is defined in the file set to 'vehicle-temporal-representation-speed-default-instance.json'\n * the id was changed to 'temporal_entity_representation_id=${temporal_entity_id}'\n * response body to be checked set to 'response_body=${response.json()}'\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/temporal/entities'\n method set to 'GET'\n Query Temporal Representation of Entities and\n Query Parameter: attrs set to '${attrsToMatch}' and\n Query Parameter: datasetId set to '${datasetId}' and\n Query Parameter: entity_types set to 'Vehicle' and\n Query Parameter: timerel set to '${timerel}' and\n Query Parameter: timeAt set to '${timeat}' and\n Query Parameter: context set to 'https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/develop/resources/jsonld-contexts/ngsi-ld-test-suite-compound.jsonld' and\n Query Parameter: options set to 'temporalValues'\n}", + "http_verb": "GET", + "endpoint": "temporal/entities" + }, + { + "name": "021_18_06 filter based on attrs and datasetId", + "permutation_tp_id": "TP/NGSI-LD/CI/Cons/TE/021_18_06", + "doc": "Check that one can filter attribute instances of a temporal entity based on datasetId.", + "tags": [ + "4_5_5", + "5_7_4", + "since_v1.8.1", + "te-query" + ], + "setup": null, + "teardown": null, + "template": "Filter attribute instances of a temporal entity based on datasetId", + "then": "then {\n the SUT sends a valid Response for the operations:\n Query Temporal Representation Of Entities with Response Status Code set to 200 and\n Query Temporal Representation Of Entities with Response Body containing EntityTemporal element containing attribute instances in the time range specified by the NGSI-LD temporal query:\n * the payload is defined in the file set to 'vehicle-temporal-representation-fuellevel-attribute-fuel-datasetid.json'\n * the id was changed to 'temporal_entity_representation_id=${temporal_entity_id}'\n * response body to be checked set to 'response_body=${response.json()}'\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/temporal/entities'\n method set to 'GET'\n Query Temporal Representation of Entities and\n Query Parameter: attrs set to '${attrsToMatch}' and\n Query Parameter: datasetId set to '${datasetId}' and\n Query Parameter: entity_types set to 'Vehicle' and\n Query Parameter: timerel set to '${timerel}' and\n Query Parameter: timeAt set to '${timeat}' and\n Query Parameter: context set to 'https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/develop/resources/jsonld-contexts/ngsi-ld-test-suite-compound.jsonld' and\n Query Parameter: options set to 'temporalValues'\n}", + "http_verb": "GET", + "endpoint": "temporal/entities" + }, + { + "name": "021_18_07 filter based on attrs and datasetId with no match", + "permutation_tp_id": "TP/NGSI-LD/CI/Cons/TE/021_18_07", + "doc": "Check that one can filter attribute instances of a temporal entity based on datasetId.", + "tags": [ + "4_5_5", + "5_7_4", + "since_v1.8.1", + "te-query" + ], + "setup": null, + "teardown": null, + "template": "Filter attribute instances of a temporal entity based on datasetId", + "then": "then {\n the SUT sends a valid Response for the operations:\n Query Temporal Representation Of Entities with Response Status Code set to 200 and\n Query Temporal Representation Of Entities with Response Body containing EntityTemporal element containing attribute instances in the time range specified by the NGSI-LD temporal query:\n * the payload is defined in the file set to 'empty.json'\n * the id was changed to 'temporal_entity_representation_id=${temporal_entity_id}'\n * response body to be checked set to 'response_body=${response.json()}'\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/temporal/entities'\n method set to 'GET'\n Query Temporal Representation of Entities and\n Query Parameter: attrs set to '${attrsToMatch}' and\n Query Parameter: datasetId set to '${datasetId}' and\n Query Parameter: entity_types set to 'Vehicle' and\n Query Parameter: timerel set to '${timerel}' and\n Query Parameter: timeAt set to '${timeat}' and\n Query Parameter: context set to 'https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/develop/resources/jsonld-contexts/ngsi-ld-test-suite-compound.jsonld' and\n Query Parameter: options set to 'temporalValues'\n}", + "http_verb": "GET", + "endpoint": "temporal/entities" + } + ], + "permutations": [ + "then" + ], + "robotpath": "ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities", + "robotfile": "021_18" +} \ No newline at end of file diff --git a/doc/files/ContextInformation/Subscription/028_06.json b/doc/files/ContextInformation/Subscription/028_06.json new file mode 100644 index 000000000..af1184829 --- /dev/null +++ b/doc/files/ContextInformation/Subscription/028_06.json @@ -0,0 +1,40 @@ +{ + "tp_id": "TP/NGSI-LD/CI/SUB/028_06", + "test_objective": "Check that one can create a subscription with a datasetId", + "reference": "ETSI GS CIM 009 V1.8.1 [], clauses 4.5.5, 5.8.1", + "config_id": "", + "parent_release": "v1.8.1", + "clauses": [ + "4.5.5", + "5.8.1" + ], + "pics_selection": "", + "keywords": [ + "Delete Initial Subscription" + ], + "teardown": "Delete Initial Subscription", + "initial_condition": "with {\n the SUT containing an initial state\n}", + "test_cases": [ + { + "name": "028_06 Create a subscription with a datasetId", + "permutation_tp_id": "TP/NGSI-LD/CI/SUB/028_06", + "doc": "Check that one can create a subscription with a datasetId", + "tags": [ + "4_5_5", + "5_8_1", + "since_v1.8.1", + "sub-create" + ], + "setup": null, + "teardown": null, + "template": null, + "then": "then {\n the SUT sends a valid Response for the operations:\n Create Subscription with Response Status Code set to 201 and\n Retrieve Subscription with Check Created Resource Set To and\n Query Parameter: 'ignored_keys' set to '${None}' list of keys\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/subscriptions/'\n method set to 'POST'\n Request Header['Content-Type'] set to 'application/ld+json' and\n payload defined in file: 'subscriptions/subscription-building-with-datasetId.jsonld'\n}", + "http_verb": "POST", + "endpoint": "subscriptions/" + } + ], + "permutations": [], + "robotpath": "ContextInformation/Subscription/CreateSubscription", + "robotfile": "028_06" +} \ No newline at end of file diff --git a/doc/files/ContextInformation/Subscription/046_19.json b/doc/files/ContextInformation/Subscription/046_19.json new file mode 100644 index 000000000..72fb00636 --- /dev/null +++ b/doc/files/ContextInformation/Subscription/046_19.json @@ -0,0 +1,45 @@ +{ + "tp_id": "TP/NGSI-LD/CI/SUB/046_19", + "test_objective": "If a subscription has a datasetId member instances should be filtered based on that datasetId.", + "reference": "ETSI GS CIM 009 V1.8.1 [], clauses 4.5.5, 5.8.6", + "config_id": "", + "parent_release": "v1.8.1", + "clauses": [ + "4.5.5", + "5.8.6" + ], + "pics_selection": "", + "keywords": [ + "Before Test", + "Add Initial Entity", + "Setup Initial Subscription", + "After Test", + "Delete Initial Subscription", + "Delete Initial Entity" + ], + "teardown": "After Test", + "initial_condition": "with {\n the SUT containing an initial state\n}", + "test_cases": [ + { + "name": "046_19 Check that only the attribute instances that match the datasetId member are included in the entity in the notification", + "permutation_tp_id": "TP/NGSI-LD/CI/SUB/046_19", + "doc": "If a subscription has a datasetId member instances should be filtered based on that datasetId.", + "tags": [ + "4_5_5", + "5_8_6", + "since_v1.8.1", + "sub-notification" + ], + "setup": null, + "teardown": null, + "template": null, + "then": "then {\n the SUT sends a valid Response for the operation:\n Notification with Notification containing entity element set to 'entity-with-datasetid-046-19.json'\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/entities/{entityId}/attrs/{attributeId}'\n method set to 'PATCH'\n Update Entity Attributes and\n Query Parameter: id set to '${entity_id}' and\n Query Parameter: fragment_filename set to 'building-name-fragment.jsonld' and\n Query Parameter: content_type set to 'application/ld+json'\n}", + "http_verb": "PATCH", + "endpoint": "entities/{entityId}/attrs/{attributeId}" + } + ], + "permutations": [], + "robotpath": "ContextInformation/Subscription/SubscriptionNotificationBehaviour", + "robotfile": "046_19" +} \ No newline at end of file diff --git a/doc/tests/test_ContextInformation_Consumption.py b/doc/tests/test_ContextInformation_Consumption.py index 6330b8690..01974dc71 100644 --- a/doc/tests/test_ContextInformation_Consumption.py +++ b/doc/tests/test_ContextInformation_Consumption.py @@ -266,6 +266,13 @@ class TestCIConsumptions(TestCase): self.common_function(robot_file=robot_file, expected_value=expected_value, difference_file=difference_file) + def test_019_12(self): + robot_file = f'{self.folder_test_suites}/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_12.robot' + expected_value = f'{self.folder_test_suites}/doc/files/ContextInformation/Consumption/019_12.json' + difference_file = f'{self.folder_test_suites}/doc/results/out_019_12.json' + + self.common_function(robot_file=robot_file, expected_value=expected_value, difference_file=difference_file) + def test_018_01_01(self): robot_file = f'{self.folder_test_suites}/TP/NGSI-LD/ContextInformation/Consumption/Entity/RetrieveEntity/018_01_01.robot' expected_value = f'{self.folder_test_suites}/doc/files/ContextInformation/Consumption/018_01_01.json' @@ -454,6 +461,20 @@ class TestCIConsumptions(TestCase): self.common_function(robot_file=robot_file, expected_value=expected_value, difference_file=difference_file) + def test_021_17(self): + robot_file = f'{self.folder_test_suites}/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_17.robot' + expected_value = f'{self.folder_test_suites}/doc/files/ContextInformation/Consumption/021_17.json' + difference_file = f'{self.folder_test_suites}/doc/results/out_021_17.json' + + self.common_function(robot_file=robot_file, expected_value=expected_value, difference_file=difference_file) + + def test_021_18(self): + robot_file = f'{self.folder_test_suites}/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_18.robot' + expected_value = f'{self.folder_test_suites}/doc/files/ContextInformation/Consumption/021_18.json' + difference_file = f'{self.folder_test_suites}/doc/results/out_021_18.json' + + self.common_function(robot_file=robot_file, expected_value=expected_value, difference_file=difference_file) + def test_020_01(self): robot_file = f'{self.folder_test_suites}/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_01.robot' expected_value = f'{self.folder_test_suites}/doc/files/ContextInformation/Consumption/020_01.json' diff --git a/doc/tests/test_ContextInformation_Subscription.py b/doc/tests/test_ContextInformation_Subscription.py index 4aa1bb201..88e5329d3 100644 --- a/doc/tests/test_ContextInformation_Subscription.py +++ b/doc/tests/test_ContextInformation_Subscription.py @@ -77,6 +77,13 @@ class TestCISubscription(TestCase): self.common_function(robot_file=robot_file, expected_value=expected_value, difference_file=difference_file) + def test_028_06(self): + robot_file = f'{self.folder_test_suites}/TP/NGSI-LD/ContextInformation/Subscription/CreateSubscription/028_06.robot' + expected_value = f'{self.folder_test_suites}/doc/files/ContextInformation/Subscription/028_06.json' + difference_file = f'{self.folder_test_suites}/doc/results/out_028_06.json' + + self.common_function(robot_file=robot_file, expected_value=expected_value, difference_file=difference_file) + def test_032_01(self): robot_file = f'{self.folder_test_suites}/TP/NGSI-LD/ContextInformation/Subscription/DeleteSubscription/032_01.robot' expected_value = f'{self.folder_test_suites}/doc/files/ContextInformation/Subscription/032_01.json' @@ -229,6 +236,13 @@ class TestCISubscription(TestCase): self.common_function(robot_file=robot_file, expected_value=expected_value, difference_file=difference_file) + def test_046_19(self): + robot_file = f'{self.folder_test_suites}/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_19.robot' + expected_value = f'{self.folder_test_suites}/doc/files/ContextInformation/Subscription/046_19.json' + difference_file = f'{self.folder_test_suites}/doc/results/out_046_19.json' + + self.common_function(robot_file=robot_file, expected_value=expected_value, difference_file=difference_file) + def test_046_21_01(self): robot_file = f'{self.folder_test_suites}/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_21_01.robot' expected_value = f'{self.folder_test_suites}/doc/files/ContextInformation/Subscription/046_21_01.json' diff --git a/resources/ApiUtils/ContextInformationConsumption.resource b/resources/ApiUtils/ContextInformationConsumption.resource index c42714eb5..4d4a2e46f 100755 --- a/resources/ApiUtils/ContextInformationConsumption.resource +++ b/resources/ApiUtils/ContextInformationConsumption.resource @@ -43,6 +43,7 @@ Query Entities ... ${count}=${EMPTY} ... ${q}=${EMPTY} ... ${local}=${EMPTY} + ... ${datasetId}=${EMPTY} ${attrs_length}= Get Length ${attrs} ${accept_length}= Get Length ${accept} ${options_length}= Get Length ${options} @@ -87,6 +88,10 @@ Query Entities IF '${count}'!='' Set To Dictionary ${params} count=${count} IF '${q}'!='' Set To Dictionary ${params} q=${q} IF '${local}'!='' Set To Dictionary ${params} local=${local} + IF '${datasetId}'!='' + Set To Dictionary ${params} datasetId=${datasetId} + END + ${response}= GET ... url=${url}/${ENTITIES_ENDPOINT_PATH} ... headers=${headers} diff --git a/resources/ApiUtils/TemporalContextInformationConsumption.resource b/resources/ApiUtils/TemporalContextInformationConsumption.resource index 6075cad5d..dd409028c 100755 --- a/resources/ApiUtils/TemporalContextInformationConsumption.resource +++ b/resources/ApiUtils/TemporalContextInformationConsumption.resource @@ -42,6 +42,7 @@ Query Temporal Representation Of Entities ... ${options}=${EMPTY} ... ${aggrMethods}=${EMPTY} ... ${aggrPeriodDuration}=${EMPTY} + ... ${datasetId}=${EMPTY} ${entity_types_length}= Get Length ${entity_types} ${entity_ids_length}= Get Length ${entity_ids} ${attrs_length}= Get Length ${attrs} @@ -92,6 +93,9 @@ Query Temporal Representation Of Entities IF $aggrPeriodDuration!='' Set To Dictionary ${params} aggrPeriodDuration=${aggrPeriodDuration} END + IF $datasetId!='' + Set To Dictionary ${params} datasetId=${datasetId} + END ${response}= GET ... url=${temporal_api_url}/${TEMPORAL_ENTITIES_ENDPOINT_PATH} -- GitLab From bc8884d0b6be0154606b53c044a2fa7dd4454f36 Mon Sep 17 00:00:00 2001 From: Benoit Orihuela Date: Thu, 30 Oct 2025 17:57:27 +0100 Subject: [PATCH 2/2] fix: consistent declaration of variables --- .../Subscription/CreateSubscription/028_06.robot | 2 +- .../SubscriptionNotificationBehaviour/046_19.robot | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/TP/NGSI-LD/ContextInformation/Subscription/CreateSubscription/028_06.robot b/TP/NGSI-LD/ContextInformation/Subscription/CreateSubscription/028_06.robot index dc03464eb..89ac02cda 100644 --- a/TP/NGSI-LD/ContextInformation/Subscription/CreateSubscription/028_06.robot +++ b/TP/NGSI-LD/ContextInformation/Subscription/CreateSubscription/028_06.robot @@ -9,7 +9,7 @@ Suite Teardown Delete Initial Subscription *** Variables *** -${subscription_payload_file_path}= subscriptions/subscription-building-with-datasetId.jsonld +${subscription_payload_file_path} subscriptions/subscription-building-with-datasetId.jsonld ${subscription_expectation_file_path} subscriptions/expectations/subscription-with-datasetId.jsonld diff --git a/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_19.robot b/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_19.robot index 6e7c258f8..4e2553c6e 100644 --- a/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_19.robot +++ b/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_19.robot @@ -12,11 +12,11 @@ Suite Teardown After Test *** Variables *** -${subscription_payload_file_path}= subscriptions/subscription-building-with-datasetId.jsonld -${entity_building_filepath}= building-multi-instances-attributes.jsonld -${fragment_filename}= building-name-fragment.jsonld -${notification_server_send_url}= http://${notification_server_host}:${notification_server_port}/notify -${entity_expectation_file_path}= entity-with-datasetid-046-19.jsonld +${subscription_payload_file_path} subscriptions/subscription-building-with-datasetId.jsonld +${entity_building_filepath} building-multi-instances-attributes.jsonld +${fragment_filename} building-name-fragment.jsonld +${notification_server_send_url} http://${notification_server_host}:${notification_server_port}/notify +${entity_expectation_file_path} entity-with-datasetid-046-19.jsonld *** Test Cases *** -- GitLab