diff --git a/TP/NGSI-LD/DistributedOperations/Provision/Entities/CreateEntity/D001_01_inc.robot b/TP/NGSI-LD/DistributedOperations/Provision/Entities/CreateEntity/D001_01_inc.robot index c12ddea750b2a3f24cd487fb8510ebbc2a260c2d..eb3f344e828c6f7d3092efbaab915a776d14d46e 100644 --- a/TP/NGSI-LD/DistributedOperations/Provision/Entities/CreateEntity/D001_01_inc.robot +++ b/TP/NGSI-LD/DistributedOperations/Provision/Entities/CreateEntity/D001_01_inc.robot @@ -1,5 +1,5 @@ *** Settings *** -Documentation Verify that, when one has an inclusive registration on a Context Broker, one is able to create entities on both Context Broker and Context Source +Documentation Verify that, when one has an inclusive registration on a Context Broker, one is able to create entities on both Context Broker and Context Source Resource ${EXECDIR}/resources/ApiUtils/ContextSourceRegistration.resource Resource ${EXECDIR}/resources/ApiUtils/ContextSourceDiscovery.resource @@ -8,8 +8,8 @@ Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption. Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource -Test Setup Setup Entity Id And Registration -Test Teardown Delete Created Entities And Registration +Test Setup Setup Entity Id And Registration +Test Teardown Delete Created Entities And Registration *** Variables *** @@ -18,10 +18,11 @@ ${entity_payload_filename} vehicle-simple-attributes.jsonld ${registration_id_prefix} urn:ngsi-ld:Registration: ${registration_payload_file_path} csourceRegistrations/context-source-registration-vehicle-redirection-ops.jsonld + *** Test Cases *** D001_01_inc Create Entity On Both Context Broker and Context Source + [Documentation] Check that if one requests the Context Broker to create an entity that matches an inclusive registration, this is created on the Context Source too [Tags] since_v1.6.1 dist-ops 4_3_3 cf_06 additive-inclusive 4_3_6_2 5_6_1 - [Documentation] Check that if one requests the Context Broker to create an entity that matches an inclusive registration, this is created on the Context Source too ${response}= Create Entity ${entity_payload_filename} ${entity_id} Check Response Status Code 201 ${response.status_code} @@ -29,7 +30,10 @@ D001_01_inc Create Entity On Both Context Broker and Context Source ${response_query}= Query Entities entity_types=Vehicle local=true context=${ngsild_test_suite_context} Check Response Status Code 200 ${response_query.status_code} Check Response Body Containing Entities URIS set to ${entities_id} ${response_query.json()} - ${response_query_remote}= Query Entities entity_types=Vehicle base_url=${remote_url} + ${response_query_remote}= Query Entities + ... entity_types=Vehicle + ... base_url=${remote_url} + ... context=${ngsild_test_suite_context} Check Response Body Containing Entities URIS set to ${entities_id} ${response_query_remote.json()} @@ -40,7 +44,7 @@ Setup Entity Id And Registration ${registration_id}= Generate Random Entity Id ${registration_id_prefix} Set Suite Variable ${registration_id} - ${registration_payload}= Prepare Context Source Registration From File + ${registration_payload}= Prepare Context Source Registration From File ... ${registration_id} ... ${registration_payload_file_path} ... entity_id=${entity_id} @@ -51,6 +55,3 @@ Delete Created Entities And Registration Delete Context Source Registration ${registration_id} Delete Entity By Id ${entity_id} Delete Entity By Id ${entity_id} base_url=${remote_url} - - - \ No newline at end of file diff --git a/TP/NGSI-LD/DistributedOperations/Provision/Entities/CreateEntity/D001_03_01_inc.robot b/TP/NGSI-LD/DistributedOperations/Provision/Entities/CreateEntity/D001_03_01_inc.robot index 9f1be517284100f0a81242f63e438bfef1e1a7c0..0bb3e1fbcca7d2d9c866a6fa0873ecbe74c886b1 100644 --- a/TP/NGSI-LD/DistributedOperations/Provision/Entities/CreateEntity/D001_03_01_inc.robot +++ b/TP/NGSI-LD/DistributedOperations/Provision/Entities/CreateEntity/D001_03_01_inc.robot @@ -1,5 +1,5 @@ *** Settings *** -Documentation Verify that, when one has an entity and an inclusive registration on a Context Broker, one is able to create that entity on a Context Source from the Context Broker but gets an error for the Context Broker +Documentation Verify that, when one has an entity and an inclusive registration on a Context Broker, one is able to create that entity on a Context Source from the Context Broker but gets an error for the Context Broker Resource ${EXECDIR}/resources/ApiUtils/ContextSourceRegistration.resource Resource ${EXECDIR}/resources/ApiUtils/ContextSourceDiscovery.resource @@ -8,8 +8,8 @@ Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption. Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource -Test Setup Setup Entity On Local And Registration -Test Teardown Delete Created Entities And Registration +Test Setup Setup Entity On Local And Registration +Test Teardown Delete Created Entities And Registration *** Variables *** @@ -18,17 +18,21 @@ ${entity_payload_filename} vehicle-simple-attributes.jsonld ${registration_id_prefix} urn:ngsi-ld:Registration: ${registration_payload_file_path} csourceRegistrations/context-source-registration-vehicle-redirection-ops.jsonld + *** Test Cases *** D001_03_01_inc Create entity already existing locally on a Context Source - [Tags] since_v1.6.1 dist-ops 4_3_3 cf_06 additive-inclusive 4_3_6_2 5_6_1 6_3_3 [Documentation] Check that if one requests the Context Broker to create an entity that matches an inclusive registration and already exists locally, this raises an error on the Context Broker but is created correctly on the Context Source + [Tags] since_v1.6.1 dist-ops 4_3_3 cf_06 additive-inclusive 4_3_6_2 5_6_1 6_3_3 ${response}= Create Entity ${entity_payload_filename} ${entity_id} Check Response Status Code 207 ${response.status_code} - + Check JSON Value In Response Body ['status'] 409 ${response.json()['errors'][0]['error']} @{entities_id}= Create List ${entity_id} - ${response_query_remote}= Query Entities entity_types=Vehicle base_url=${remote_url} + ${response_query_remote}= Query Entities + ... entity_types=Vehicle + ... base_url=${remote_url} + ... context=${ngsild_test_suite_context} Check Response Body Containing Entities URIS set to ${entities_id} ${response_query_remote.json()} @@ -41,7 +45,7 @@ Setup Entity On Local And Registration ${registration_id}= Generate Random Entity Id ${registration_id_prefix} Set Suite Variable ${registration_id} - ${registration_payload}= Prepare Context Source Registration From File + ${registration_payload}= Prepare Context Source Registration From File ... ${registration_id} ... ${registration_payload_file_path} ... entity_id=${entity_id} @@ -52,6 +56,3 @@ Delete Created Entities And Registration Delete Context Source Registration ${registration_id} Delete Entity By Id ${entity_id} Delete Entity By Id ${entity_id} base_url=${remote_url} - - - \ No newline at end of file diff --git a/data/csourceRegistrations/context-source-registration-vehicle-complete.jsonld b/data/csourceRegistrations/context-source-registration-vehicle-complete.jsonld index 2c2d5b08431ac29817819b247aab10233a6564df..e608440d403895dfb2174a5c069e1553490fd1d2 100644 --- a/data/csourceRegistrations/context-source-registration-vehicle-complete.jsonld +++ b/data/csourceRegistrations/context-source-registration-vehicle-complete.jsonld @@ -7,12 +7,6 @@ { "type": "Vehicle" } - ], - "propertyNames": [ - "brandName" - ], - "relationshipNames": [ - "isParked" ] } ],