Commit 267b97d0 authored by Benoit Orihuela's avatar Benoit Orihuela
Browse files

Merge branch 'fix/batch-entity-operations-tests' into 'develop'

fix: call Batch Delete Entities in test teardown

See merge request !2
parents 015e1ec2 6740ca10
Loading
Loading
Loading
Loading
+4 −9
Original line number Diff line number Diff line
@@ -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}
+4 −6
Original line number Diff line number Diff line
@@ -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}
+1 −1
Original line number Diff line number Diff line
@@ -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:

+1 −1
Original line number Diff line number Diff line
@@ -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:

+3 −3
Original line number Diff line number Diff line
@@ -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
Loading