Commit f01fc6e3 authored by Benedetta Arena's avatar Benedetta Arena
Browse files

fix: move tests to correct folder and change names

parent f864b6e5
Loading
Loading
Loading
Loading
+8 −6
Original line number Diff line number Diff line
@@ -21,31 +21,34 @@ ${b2_url}
${b3_url}

*** Test Cases ***
IOP_CNF_01_01 Create Entity In A And Retrieve Entity In All Brokers
    [Documentation]    Check that entities are created in A and B but not in C.
IOP_CNF_01 Create Entity In A And Retrieve Entity In All Brokers
    [Documentation]    Pre-conditions: no user context. No data in any broker.
    ...                Registrations established: inclusive in A to B and exclusive in A to C.
    ...                Post-conditions: no user context. no data in any broker. no registrations in any broker.
    [Tags]    since_v1.6.1    iop    4_3_3    cf_06    additive-inclusive    proxy-exclusive    4_3_6    5_6_1

    #Create OffStreetParking:1 in A and check for a successful response
    ${expected_payload}=    Load Entity    ${entity_payload_filename}    ${entity_id}
    ${response}=    Create Entity    ${entity_payload_filename}    ${entity_id}    broker_url=${b1_url}
    Check Response Status Code    201    ${response.status_code}
    
    #Agent checks, with local=true, that the entity is created in A
    ${response}=    Retrieve Entity    ${entity_id}    local=true    broker_url=${b1_url}
    Check Response Status Code    200    ${response.status_code}
    Should Be Equal    ${response.json()}    ${expected_payload}

    #Agent checks, with local=true, that the entity is created in B and only contains the attributes availableSpotsNumber and totalSpotsNumber
    ${response}=    Retrieve Entity    ${entity_id}    local=true    broker_url=${b2_url}
    Check Response Status Code    200    ${response.status_code}
    Should Contain    ${response.json()}    availableSpotsNumber
    Should Contain    ${response.json()}    totalSpotsNumber
    Should Not Contain    ${response.json()}    location

    #Agent checks, with local=true, that the entity is not created in C
    ${response}=    Retrieve Entity    ${entity_id}    local=true    broker_url=${b3_url}
    Check Response Status Code    404    ${response.status_code}

*** Keywords ***
Setup Initial Context Source Registrations
    [Documentation]    Pre-conditions: no user context. No data in any broker.
    ...                CSR in A to B and in A to C.
    ${entity_id}=    Generate Random Parking Entity Id
    Set Suite Variable    ${entity_id}

@@ -72,7 +75,6 @@ Setup Initial Context Source Registrations
    Check Response Status Code    201    ${response.status_code}

Delete Entities And Delete Registrations
    [Documentation]    Post-conditions: no user context. no data in any broker. no registrations in any broker.
    Delete Context Source Registration    ${registration_id1}    broker_url=${b1_url}
    Delete Context Source Registration    ${registration_id2}    broker_url=${b1_url}
    Delete Entity    ${entity_id}    broker_url=${b1_url}
 No newline at end of file
+1 −1
Original line number Diff line number Diff line
@@ -22,7 +22,7 @@ ${b3_url}
${b4_url}

*** Test Cases ***
IOP_CNF_02_01 Create Entity In A And Retrieve Entity In All Brokers
IOP_CNF_02 Create Entity In A And Retrieve Entity In All Brokers
    [Documentation]    Check that entities are created in the brokers, A and B should contain most entity attributes, C and D should only contain the location attribute.
    [Tags]    since_v1.6.1    iop    4_3_3    cf_06    additive-inclusive    proxy-redirect    4_3_6    5_6_1

+0 −0

File moved.

+0 −0

File moved.

+1 −1
Original line number Diff line number Diff line
@@ -26,7 +26,7 @@ ${b4_url}
${b5_url}

*** Test Cases ***
IOP_CNF_04_01 Create Entity In A And Retrieve Entity In All Brokers
IOP_CNF_04 Create Entity In A And Retrieve Entity In All Brokers
    [Documentation]    Check that entities are created in the A and C brokers. The B, D and E should not contain the entity
    [Tags]    since_v1.6.1    iop    4_3_3    cf_06    additive-inclusive    additive-auxiliary    proxy-exclusive    proxy-redirect    4_3_6    5_6_1

Loading