Loading TP/NGSI-LD/ContextInformation/Provision/BatchEntities/UpdateBatchOfEntities/failure.robot +33 Changes for TP/NGSI-LD/ContextInformation/Provision/BatchEntities/UpdateBatchOfEntities/failure.robot: 33 added lines, 0 removed lines. Original line number Diff line number Diff line *** Settings *** Documentation Check that you cannot update a batch of entities with an invalid request Variables ../../../../../../resources/variables.py Resource ../../../../../../resources/ApiUtils.resource Resource ../../../../../../resources/AssertionUtils.resource Resource ../../../../../../resources/JsonUtils.resource Library RequestsLibrary Library JSONLibrary Library OperatingSystem *** Variable *** ${batch_endpoint}= entityOperations/update ${endpoint}= entities *** Test Case *** With invalid json document [Documentation] Check that you cannot update a batch of entities with an invalid json document [Tags] critical Batch Request Entities From File batch/invalid-json-sample.jsonld Check Response Status Code Set To 400 Check Response Body Containing Problem Details Element Containing Detail Element ${response} With json-ld document not syntactically correct according to the @context [Documentation] Check that you cannot update a batch of entities with a json-ld document not syntactically correct according to the @context [Tags] critical #TODO: Use a json-ld document not syntactically correct according to the @context Batch Request Entities From File batch/invalid-json-ld-sample.jsonld Check Response Status Code Set To 400 Check Response Body Containing Problem Details Element Containing Detail Element ${response} TP/NGSI-LD/ContextInformation/Provision/BatchEntities/UpdateBatchOfEntities/fullSuccess.robot +9 −12 Changes for TP/NGSI-LD/ContextInformation/Provision/BatchEntities/UpdateBatchOfEntities/fullSuccess.robot: 9 added lines, 12 removed lines. Original line number Diff line number Diff line Loading @@ -21,27 +21,24 @@ Update a batch of entities [Documentation] Check that you can update a batch of entities [Tags] critical ${first_entity}= Load Entity building-minimal-sample.jsonld ${first_entity_id} ${second_entity}= Load Entity building-minimal-sample.jsonld ${second_entity_id} @{entities_to_be_upserted}= Create List ${first_entity} ${second_entity} ${first_entity}= Load Entity building-relationship-of-property-sample.jsonld ${first_entity_id} ${second_entity}= Load Entity building-relationship-of-property-sample.jsonld ${second_entity_id} @{entities_to_be_updated}= Create List ${first_entity} ${second_entity} Batch Upsert Entities @{entities_to_be_upserted} Batch Update Entities @{entities_to_be_updated} @{expected_entities_ids}= Create List ${new_entity_id} Check Response Status Code Set To 201 Check Response Body Containing Array Of URIs set to @{expected_entities_ids} Check Response Status Code Set To 204 #TODO call Batch Delete Entities Delete Entity by Id ${new_entity_id} Delete Entity by Id ${first_existing_entity_id} Delete Entity by Id ${second_existing_entity_id} Delete Entity by Id ${first_entity_id} Delete Entity by Id ${second_entity_id} *** Keywords *** Setup Initial Entities ${first_entity_id}= Generate Random Entity Id ${building_id_prefix} ${second_entity_id}= Generate Random Entity Id ${building_id_prefix} Create Entity building-minimal-sample.jsonld ${first_entity_id} Create Entity building-minimal-sample.jsonld ${second_entity_id} Create Entity building-simple-attributes-sample.jsonld ${first_entity_id} Create Entity building-simple-attributes-sample.jsonld ${second_entity_id} Set Suite Variable ${first_entity_id} Set Suite Variable ${second_entity_id} TP/NGSI-LD/ContextInformation/Provision/BatchEntities/UpdateBatchOfEntities/fullSuccessNoOverwriteMode.robot +44 Changes for TP/NGSI-LD/ContextInformation/Provision/BatchEntities/UpdateBatchOfEntities/fullSuccessNoOverwriteMode.robot: 44 added lines, 0 removed lines. Original line number Diff line number Diff line *** Settings *** Documentation Check that you can update a batch of entities with noOverwrite option Variables ../../../../../../resources/variables.py Resource ../../../../../../resources/ApiUtils.resource Resource ../../../../../../resources/AssertionUtils.resource Resource ../../../../../../resources/JsonUtils.resource Library REST ${url} Library JSONLibrary Library String Library Collections Suite Setup Setup Initial Entities *** Variable *** ${batch_endpoint}= entityOperations/update ${endpoint}= entities ${building_id_prefix}= urn:ngsi-ld:Building: *** Test Case *** Update a batch of entities with noOverwrite option [Documentation] Check that you can update a batch of entities with noOverwrite option [Tags] critical ${first_entity}= Load Entity building-relationship-of-property-sample.jsonld ${first_entity_id} ${second_entity}= Load Entity building-relationship-of-property-sample.jsonld ${second_entity_id} @{entities_to_be_updated}= Create List ${first_entity} ${second_entity} Batch Update Entities @{entities_to_be_updated} overwrite_option=noOverwrite Check Response Status Code Set To 204 #TODO call Batch Delete Entities Delete Entity by Id ${first_entity_id} Delete Entity by Id ${second_entity_id} *** Keywords *** Setup Initial Entities ${first_entity_id}= Generate Random Entity Id ${building_id_prefix} ${second_entity_id}= Generate Random Entity Id ${building_id_prefix} Create Entity building-simple-attributes-sample.jsonld ${first_entity_id} Create Entity building-simple-attributes-sample.jsonld ${second_entity_id} Set Suite Variable ${first_entity_id} Set Suite Variable ${second_entity_id} TP/NGSI-LD/ContextInformation/Provision/BatchEntities/UpdateBatchOfEntities/partialSuccess.robot +52 Changes for TP/NGSI-LD/ContextInformation/Provision/BatchEntities/UpdateBatchOfEntities/partialSuccess.robot: 52 added lines, 0 removed lines. Original line number Diff line number Diff line *** Settings *** Documentation Check that you can update a batch of entities where some will succeed and others will fail Variables ../../../../../../resources/variables.py Resource ../../../../../../resources/ApiUtils.resource Resource ../../../../../../resources/AssertionUtils.resource Resource ../../../../../../resources/JsonUtils.resource Library REST ${url} Library JSONLibrary Library String Library Collections Suite Setup Setup Initial Entities *** Variable *** ${batch_endpoint}= entityOperations/update ${endpoint}= entities ${building_id_prefix}= urn:ngsi-ld:Building: *** Test Case *** Update a batch of non existing and existing entities [Documentation] Check that you can update a batch of non existing and existing entities [Tags] critical ${first_existing_entity}= Load Entity building-relationship-of-property-sample.jsonld ${first_existing_entity_id} ${second_existing_entity}= Load Entity building-relationship-of-property-sample.jsonld ${second_existing_entity_id} ${new_entity_id}= Generate Random Entity Id ${building_id_prefix} ${new_entity}= Load Entity building-relationship-of-property-sample.jsonld ${new_entity_id} @{entities_to_be_updated}= Create List ${first_existing_entity} ${second_existing_entity} ${new_entity} Batch Update Entities @{entities_to_be_updated} @{expected_successful_entities_ids}= Create List ${first_existing_entity_id} ${second_existing_entity_id} @{expected_failed_entities_ids}= Create List ${new_entity_id} &{expected_batch_operation_result}= Create Batch Operation Result ${expected_successful_entities_ids} ${expected_failed_entities_ids} Check Response Status Code Set To 207 Check Response Body Containing Batch Operation Result ${expected_batch_operation_result} #TODO call Batch Delete Entities Delete Entity by Id ${first_existing_entity_id} Delete Entity by Id ${second_existing_entity_id} *** Keywords *** Setup Initial Entities ${first_existing_entity_id}= Generate Random Entity Id ${building_id_prefix} ${second_existing_entity_id}= Generate Random Entity Id ${building_id_prefix} Create Entity building-simple-attributes-sample.jsonld ${first_existing_entity_id} Create Entity building-simple-attributes-sample.jsonld ${second_existing_entity_id} Set Suite Variable ${first_existing_entity_id} Set Suite Variable ${second_existing_entity_id} data/entities/building-relationship-sample.jsonld +12 Changes for data/entities/building-relationship-sample.jsonld: 12 added lines, 0 removed lines. Original line number Diff line number Diff line { "id": "urn:ngsi-ld:Building:randomUUID", "type": "Building", "locatedAt": { "type": "Relationship", "object": "urn:ngsi-ld:City:Paris" }, "@context": [ "https://fiware.github.io/data-models/context.jsonld", "https://uri.etsi.org/ngsi-ld/v1/ngsi-ld-core-context.jsonld" ] } No newline at end of file Loading
TP/NGSI-LD/ContextInformation/Provision/BatchEntities/UpdateBatchOfEntities/failure.robot +33 Changes for TP/NGSI-LD/ContextInformation/Provision/BatchEntities/UpdateBatchOfEntities/failure.robot: 33 added lines, 0 removed lines. Original line number Diff line number Diff line *** Settings *** Documentation Check that you cannot update a batch of entities with an invalid request Variables ../../../../../../resources/variables.py Resource ../../../../../../resources/ApiUtils.resource Resource ../../../../../../resources/AssertionUtils.resource Resource ../../../../../../resources/JsonUtils.resource Library RequestsLibrary Library JSONLibrary Library OperatingSystem *** Variable *** ${batch_endpoint}= entityOperations/update ${endpoint}= entities *** Test Case *** With invalid json document [Documentation] Check that you cannot update a batch of entities with an invalid json document [Tags] critical Batch Request Entities From File batch/invalid-json-sample.jsonld Check Response Status Code Set To 400 Check Response Body Containing Problem Details Element Containing Detail Element ${response} With json-ld document not syntactically correct according to the @context [Documentation] Check that you cannot update a batch of entities with a json-ld document not syntactically correct according to the @context [Tags] critical #TODO: Use a json-ld document not syntactically correct according to the @context Batch Request Entities From File batch/invalid-json-ld-sample.jsonld Check Response Status Code Set To 400 Check Response Body Containing Problem Details Element Containing Detail Element ${response}
TP/NGSI-LD/ContextInformation/Provision/BatchEntities/UpdateBatchOfEntities/fullSuccess.robot +9 −12 Changes for TP/NGSI-LD/ContextInformation/Provision/BatchEntities/UpdateBatchOfEntities/fullSuccess.robot: 9 added lines, 12 removed lines. Original line number Diff line number Diff line Loading @@ -21,27 +21,24 @@ Update a batch of entities [Documentation] Check that you can update a batch of entities [Tags] critical ${first_entity}= Load Entity building-minimal-sample.jsonld ${first_entity_id} ${second_entity}= Load Entity building-minimal-sample.jsonld ${second_entity_id} @{entities_to_be_upserted}= Create List ${first_entity} ${second_entity} ${first_entity}= Load Entity building-relationship-of-property-sample.jsonld ${first_entity_id} ${second_entity}= Load Entity building-relationship-of-property-sample.jsonld ${second_entity_id} @{entities_to_be_updated}= Create List ${first_entity} ${second_entity} Batch Upsert Entities @{entities_to_be_upserted} Batch Update Entities @{entities_to_be_updated} @{expected_entities_ids}= Create List ${new_entity_id} Check Response Status Code Set To 201 Check Response Body Containing Array Of URIs set to @{expected_entities_ids} Check Response Status Code Set To 204 #TODO call Batch Delete Entities Delete Entity by Id ${new_entity_id} Delete Entity by Id ${first_existing_entity_id} Delete Entity by Id ${second_existing_entity_id} Delete Entity by Id ${first_entity_id} Delete Entity by Id ${second_entity_id} *** Keywords *** Setup Initial Entities ${first_entity_id}= Generate Random Entity Id ${building_id_prefix} ${second_entity_id}= Generate Random Entity Id ${building_id_prefix} Create Entity building-minimal-sample.jsonld ${first_entity_id} Create Entity building-minimal-sample.jsonld ${second_entity_id} Create Entity building-simple-attributes-sample.jsonld ${first_entity_id} Create Entity building-simple-attributes-sample.jsonld ${second_entity_id} Set Suite Variable ${first_entity_id} Set Suite Variable ${second_entity_id}
TP/NGSI-LD/ContextInformation/Provision/BatchEntities/UpdateBatchOfEntities/fullSuccessNoOverwriteMode.robot +44 Changes for TP/NGSI-LD/ContextInformation/Provision/BatchEntities/UpdateBatchOfEntities/fullSuccessNoOverwriteMode.robot: 44 added lines, 0 removed lines. Original line number Diff line number Diff line *** Settings *** Documentation Check that you can update a batch of entities with noOverwrite option Variables ../../../../../../resources/variables.py Resource ../../../../../../resources/ApiUtils.resource Resource ../../../../../../resources/AssertionUtils.resource Resource ../../../../../../resources/JsonUtils.resource Library REST ${url} Library JSONLibrary Library String Library Collections Suite Setup Setup Initial Entities *** Variable *** ${batch_endpoint}= entityOperations/update ${endpoint}= entities ${building_id_prefix}= urn:ngsi-ld:Building: *** Test Case *** Update a batch of entities with noOverwrite option [Documentation] Check that you can update a batch of entities with noOverwrite option [Tags] critical ${first_entity}= Load Entity building-relationship-of-property-sample.jsonld ${first_entity_id} ${second_entity}= Load Entity building-relationship-of-property-sample.jsonld ${second_entity_id} @{entities_to_be_updated}= Create List ${first_entity} ${second_entity} Batch Update Entities @{entities_to_be_updated} overwrite_option=noOverwrite Check Response Status Code Set To 204 #TODO call Batch Delete Entities Delete Entity by Id ${first_entity_id} Delete Entity by Id ${second_entity_id} *** Keywords *** Setup Initial Entities ${first_entity_id}= Generate Random Entity Id ${building_id_prefix} ${second_entity_id}= Generate Random Entity Id ${building_id_prefix} Create Entity building-simple-attributes-sample.jsonld ${first_entity_id} Create Entity building-simple-attributes-sample.jsonld ${second_entity_id} Set Suite Variable ${first_entity_id} Set Suite Variable ${second_entity_id}
TP/NGSI-LD/ContextInformation/Provision/BatchEntities/UpdateBatchOfEntities/partialSuccess.robot +52 Changes for TP/NGSI-LD/ContextInformation/Provision/BatchEntities/UpdateBatchOfEntities/partialSuccess.robot: 52 added lines, 0 removed lines. Original line number Diff line number Diff line *** Settings *** Documentation Check that you can update a batch of entities where some will succeed and others will fail Variables ../../../../../../resources/variables.py Resource ../../../../../../resources/ApiUtils.resource Resource ../../../../../../resources/AssertionUtils.resource Resource ../../../../../../resources/JsonUtils.resource Library REST ${url} Library JSONLibrary Library String Library Collections Suite Setup Setup Initial Entities *** Variable *** ${batch_endpoint}= entityOperations/update ${endpoint}= entities ${building_id_prefix}= urn:ngsi-ld:Building: *** Test Case *** Update a batch of non existing and existing entities [Documentation] Check that you can update a batch of non existing and existing entities [Tags] critical ${first_existing_entity}= Load Entity building-relationship-of-property-sample.jsonld ${first_existing_entity_id} ${second_existing_entity}= Load Entity building-relationship-of-property-sample.jsonld ${second_existing_entity_id} ${new_entity_id}= Generate Random Entity Id ${building_id_prefix} ${new_entity}= Load Entity building-relationship-of-property-sample.jsonld ${new_entity_id} @{entities_to_be_updated}= Create List ${first_existing_entity} ${second_existing_entity} ${new_entity} Batch Update Entities @{entities_to_be_updated} @{expected_successful_entities_ids}= Create List ${first_existing_entity_id} ${second_existing_entity_id} @{expected_failed_entities_ids}= Create List ${new_entity_id} &{expected_batch_operation_result}= Create Batch Operation Result ${expected_successful_entities_ids} ${expected_failed_entities_ids} Check Response Status Code Set To 207 Check Response Body Containing Batch Operation Result ${expected_batch_operation_result} #TODO call Batch Delete Entities Delete Entity by Id ${first_existing_entity_id} Delete Entity by Id ${second_existing_entity_id} *** Keywords *** Setup Initial Entities ${first_existing_entity_id}= Generate Random Entity Id ${building_id_prefix} ${second_existing_entity_id}= Generate Random Entity Id ${building_id_prefix} Create Entity building-simple-attributes-sample.jsonld ${first_existing_entity_id} Create Entity building-simple-attributes-sample.jsonld ${second_existing_entity_id} Set Suite Variable ${first_existing_entity_id} Set Suite Variable ${second_existing_entity_id}
data/entities/building-relationship-sample.jsonld +12 Changes for data/entities/building-relationship-sample.jsonld: 12 added lines, 0 removed lines. Original line number Diff line number Diff line { "id": "urn:ngsi-ld:Building:randomUUID", "type": "Building", "locatedAt": { "type": "Relationship", "object": "urn:ngsi-ld:City:Paris" }, "@context": [ "https://fiware.github.io/data-models/context.jsonld", "https://uri.etsi.org/ngsi-ld/v1/ngsi-ld-core-context.jsonld" ] } No newline at end of file