diff --git a/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/CreateBatchOfEntities/fullSuccess.robot b/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/CreateBatchOfEntities/fullSuccess.robot index 4f678cb525d36ee4ec1e6f58af7c611550407638..56bda491e3115a1c657c7d46eb7a5d1a9837efbb 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/CreateBatchOfEntities/fullSuccess.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/CreateBatchOfEntities/fullSuccess.robot @@ -11,6 +11,7 @@ Library Collections *** Variable *** ${batch_endpoint}= entityOperations/create +${batch_delete_endpoint}= entityOperations/delete ${endpoint}= entities ${building_id_prefix}= urn:ngsi-ld:Building: @@ -31,9 +32,7 @@ Create a batch of minimal entities Check Response Status Code Set To 201 Check Response Body Containing Array Of URIs set to @{expected_entities_ids} - #TODO call Batch Delete Entities - Delete Entity by Id ${first_entity_id} - Delete Entity by Id ${second_entity_id} + Batch Delete Entities @{expected_entities_ids} Create a batch of entities having only simple properties [Documentation] Check that you can create a batch of entities having only simple properties @@ -51,9 +50,7 @@ Create a batch of entities having only simple properties Check Response Status Code Set To 201 Check Response Body Containing Array Of URIs set to @{expected_entities_ids} - #TODO call Batch Delete Entities - Delete Entity by Id ${first_entity_id} - Delete Entity by Id ${second_entity_id} + Batch Delete Entities @{expected_entities_ids} Create a batch of entities having multiple attributes [Documentation] Check that you can create a batch of entities having multiple attributes @@ -71,6 +68,4 @@ Create a batch of entities having multiple attributes Check Response Status Code Set To 201 Check Response Body Containing Array Of URIs set to @{expected_entities_ids} - #TODO call Batch Delete Entities - Delete Entity by Id ${first_entity_id} - Delete Entity by Id ${second_entity_id} + Batch Delete Entities @{expected_entities_ids} diff --git a/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/CreateBatchOfEntities/partialSuccess.robot b/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/CreateBatchOfEntities/partialSuccess.robot index db0fef6471f79a75890873ceee0a3ad3685c8c5f..6440376b5f2371f1640d4d1da9c41463beb58743 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/CreateBatchOfEntities/partialSuccess.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/CreateBatchOfEntities/partialSuccess.robot @@ -13,6 +13,7 @@ Suite Setup Setup Initial Entities *** Variable *** ${batch_endpoint}= entityOperations/create +${batch_delete_endpoint}= entityOperations/delete ${endpoint}= entities ${building_id_prefix}= urn:ngsi-ld:Building: @@ -36,14 +37,11 @@ Create a batch of two valid entities and one invalid entity 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_entity_id} - Delete Entity by Id ${second_entity_id} - Delete Entity by Id ${existing_entity_id} - + @{entities_ids_to_be_deleted}= Create List ${first_entity_id} ${second_entity_id} ${existing_entity_id} + Batch Delete Entities @{entities_ids_to_be_deleted} + *** Keywords *** Setup Initial Entities ${existing_entity_id}= Generate Random Entity Id ${building_id_prefix} Create Entity building-minimal-sample.jsonld ${existing_entity_id} Set Suite Variable ${existing_entity_id} - diff --git a/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/DeleteBatchOfEntities/fullSuccess.robot b/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/DeleteBatchOfEntities/fullSuccess.robot index 3e5883f3264da797adbaf642387e8206ded1377c..09049cb39390f18abcccb39a10d1a93a1e84e848 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/DeleteBatchOfEntities/fullSuccess.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/DeleteBatchOfEntities/fullSuccess.robot @@ -12,7 +12,7 @@ Library Collections Suite Setup Setup Initial Entities *** Variable *** -${batch_endpoint}= entityOperations/delete +${batch_delete_endpoint}= entityOperations/delete ${endpoint}= entities ${building_id_prefix}= urn:ngsi-ld:Building: diff --git a/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/DeleteBatchOfEntities/partialSuccess.robot b/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/DeleteBatchOfEntities/partialSuccess.robot index 5fda7423e4fbcd8037f6357efa0d6afb81a99336..ea7152e91d824341fe3b1d4385a349c9849b67b0 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/DeleteBatchOfEntities/partialSuccess.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/DeleteBatchOfEntities/partialSuccess.robot @@ -12,7 +12,7 @@ Library Collections Suite Setup Setup Initial Entities *** Variable *** -${batch_endpoint}= entityOperations/delete +${batch_delete_endpoint}= entityOperations/delete ${endpoint}= entities ${building_id_prefix}= urn:ngsi-ld:Building: diff --git a/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/UpdateBatchOfEntities/fullSuccess.robot b/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/UpdateBatchOfEntities/fullSuccess.robot index 19254c4c123b54b61d002f0de68c8004c1125783..884252167b7fde3c6499ee7c11011556dc502bbc 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/UpdateBatchOfEntities/fullSuccess.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/UpdateBatchOfEntities/fullSuccess.robot @@ -13,6 +13,7 @@ Suite Setup Setup Initial Entities *** Variable *** ${batch_endpoint}= entityOperations/update +${batch_delete_endpoint}= entityOperations/delete ${endpoint}= entities ${building_id_prefix}= urn:ngsi-ld:Building: @@ -29,9 +30,8 @@ Update a batch of entities 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} + @{entities_ids_to_be_deleted}= Create List ${first_entity_id} ${second_entity_id} + Batch Delete Entities @{entities_ids_to_be_deleted} *** Keywords *** Setup Initial Entities diff --git a/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/UpdateBatchOfEntities/fullSuccessNoOverwriteMode.robot b/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/UpdateBatchOfEntities/fullSuccessNoOverwriteMode.robot index 27d8601d03878b6b5d5463b900d032d55f87c81a..e6c44a316b83d619328a46b24e43d38031b5f2ab 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/UpdateBatchOfEntities/fullSuccessNoOverwriteMode.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/UpdateBatchOfEntities/fullSuccessNoOverwriteMode.robot @@ -13,6 +13,7 @@ Suite Setup Setup Initial Entities *** Variable *** ${batch_endpoint}= entityOperations/update +${batch_delete_endpoint}= entityOperations/delete ${endpoint}= entities ${building_id_prefix}= urn:ngsi-ld:Building: @@ -29,9 +30,8 @@ Update a batch of entities with noOverwrite option 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} + @{entities_ids_to_be_deleted}= Create List ${first_entity_id} ${second_entity_id} + Batch Delete Entities @{entities_ids_to_be_deleted} *** Keywords *** Setup Initial Entities diff --git a/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/UpdateBatchOfEntities/partialSuccess.robot b/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/UpdateBatchOfEntities/partialSuccess.robot index 8e20824b1bd0950ce6bc9831bf8823d2d170075f..79c8a17bc50b2b91b766fdb5bcb2ba795a966df0 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/UpdateBatchOfEntities/partialSuccess.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/UpdateBatchOfEntities/partialSuccess.robot @@ -13,6 +13,7 @@ Suite Setup Setup Initial Entities *** Variable *** ${batch_endpoint}= entityOperations/update +${batch_delete_endpoint}= entityOperations/delete ${endpoint}= entities ${building_id_prefix}= urn:ngsi-ld:Building: @@ -37,9 +38,7 @@ Update a batch of non existing and existing entities 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} + Batch Delete Entities @{expected_successful_entities_ids} *** Keywords *** Setup Initial Entities diff --git a/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/UpsertBatchOfEntities/fullSuccessReplaceMode.robot b/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/UpsertBatchOfEntities/fullSuccessReplaceMode.robot index eee757008da7f3593ed36de87885a73108602472..e33ce6051e9706a80a79391a0dd96d03e4a27e42 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/UpsertBatchOfEntities/fullSuccessReplaceMode.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/UpsertBatchOfEntities/fullSuccessReplaceMode.robot @@ -13,6 +13,7 @@ Suite Setup Setup Initial Entities *** Variable *** ${batch_endpoint}= entityOperations/upsert +${batch_delete_endpoint}= entityOperations/delete ${endpoint}= entities ${building_id_prefix}= urn:ngsi-ld:Building: @@ -33,9 +34,7 @@ Upsert a batch of non existing entities Check Response Status Code Set To 201 Check Response Body Containing Array Of URIs set to @{expected_entities_ids} - #TODO call Batch Delete Entities - Delete Entity by Id ${first_entity_id} - Delete Entity by Id ${second_entity_id} + Batch Delete Entities @{expected_entities_ids} Upsert a batch of non existing and existing entities [Documentation] Check that you can upsert a batch of non existing and existing entities @@ -53,10 +52,8 @@ Upsert a batch of non existing and existing entities Check Response Status Code Set To 201 Check Response Body Containing Array Of URIs set to @{expected_entities_ids} - #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} + @{entities_ids_to_be_deleted}= Create List ${new_entity_id} ${first_existing_entity_id} ${second_existing_entity_id} + Batch Delete Entities @{entities_ids_to_be_deleted} *** Keywords *** Setup Initial Entities diff --git a/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/UpsertBatchOfEntities/fullSuccessReplaceModeAllUpdated.robot b/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/UpsertBatchOfEntities/fullSuccessReplaceModeAllUpdated.robot index a4f14d3d81073cac1613f65542077daa5131cdb1..aa3d57bad0a68e2870a3b6152639258c1d4e896e 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/UpsertBatchOfEntities/fullSuccessReplaceModeAllUpdated.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/UpsertBatchOfEntities/fullSuccessReplaceModeAllUpdated.robot @@ -13,6 +13,7 @@ Suite Setup Setup Initial Entities *** Variable *** ${batch_endpoint}= entityOperations/upsert +${batch_delete_endpoint}= entityOperations/delete ${endpoint}= entities ${building_id_prefix}= urn:ngsi-ld:Building: @@ -29,9 +30,8 @@ Upsert a batch of existing entities Check Response Status Code Set To 204 - #TODO call Batch Delete Entities - Delete Entity by Id ${first_existing_entity_id} - Delete Entity by Id ${second_existing_entity_id} + @{entities_ids_to_be_deleted}= Create List ${first_existing_entity_id} ${second_existing_entity_id} + Batch Delete Entities @{entities_ids_to_be_deleted} *** Keywords *** Setup Initial Entities diff --git a/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/UpsertBatchOfEntities/fullSuccessUpdateMode.robot b/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/UpsertBatchOfEntities/fullSuccessUpdateMode.robot index a6ff832246899d332a11b5e3b69bf1d2345d9d45..12a3b8e58cb84a66eab4b5297486a91de9142fba 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/UpsertBatchOfEntities/fullSuccessUpdateMode.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/UpsertBatchOfEntities/fullSuccessUpdateMode.robot @@ -13,6 +13,7 @@ Suite Setup Setup Initial Entities *** Variable *** ${batch_endpoint}= entityOperations/upsert +${batch_delete_endpoint}= entityOperations/delete ${endpoint}= entities ${building_id_prefix}= urn:ngsi-ld:Building: @@ -32,9 +33,8 @@ Upsert a batch of entities with update option Check Response Status Code Set To 201 Check Response Body Containing Array Of URIs set to @{expected_entities_ids} - #TODO call Batch Delete Entities - Delete Entity by Id ${new_entity_id} - Delete Entity by Id ${existing_entity_id} + @{entities_ids_to_be_deleted}= Create List ${new_entity_id} ${existing_entity_id} + Batch Delete Entities @{entities_ids_to_be_deleted} *** Keywords *** Setup Initial Entities diff --git a/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/UpsertBatchOfEntities/partialSucess.robot b/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/UpsertBatchOfEntities/partialSucess.robot index 73e4d2515ea5505851327cafcef2c42eb5bdcf97..c507e7c88002c9915f644817fc8fb307f8ec721d 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/UpsertBatchOfEntities/partialSucess.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/UpsertBatchOfEntities/partialSucess.robot @@ -11,6 +11,7 @@ Library Collections *** Variable *** ${batch_endpoint}= entityOperations/upsert +${batch_delete_endpoint}= entityOperations/delete ${endpoint}= entities ${building_id_prefix}= urn:ngsi-ld:Building: @@ -37,6 +38,4 @@ Upsert a batch of two valid entities and one invalid entity 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_entity_id} - Delete Entity by Id ${second_entity_id} + Batch Delete Entities @{expected_successful_entities_ids} diff --git a/resources/ApiUtils.resource b/resources/ApiUtils.resource index 8c438520b45aeda42b6b17c4918b1b0344429fd7..3a4d99d1686abb93003eae4c119bcc7eced60778 100644 --- a/resources/ApiUtils.resource +++ b/resources/ApiUtils.resource @@ -74,7 +74,7 @@ Batch Update Entities Batch Delete Entities [Arguments] @{entities_ids_to_be_deleted} &{headers}= Create Dictionary Content-Type=application/ld+json - ${response}= POST ${batch_endpoint} body=@{entities_ids_to_be_deleted} headers=${headers} + ${response}= POST ${batch_delete_endpoint} body=@{entities_ids_to_be_deleted} headers=${headers} Output request Output response Set Test Variable ${response}