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

fix: rearrange tests and improve tests logic

parent fc798bc2
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -21,7 +21,7 @@ ${b2_url}
${b3_url}

*** Test Cases ***
IOP_CNF_01 Create OffStreetParking:1
IOP_CNF_01_01 Create OffStreetParking:1
    [Documentation]    Pre-conditions: No user context. No data in any broker.
    ...                Registrations established: Inclusive in A to B. Exclusive in A to C.
    [Tags]    since_v1.6.1    iop    4_3_3    cf_06    additive-inclusive    proxy-exclusive    4_3_6    5_6_1
@@ -41,6 +41,8 @@ IOP_CNF_01 Create OffStreetParking:1
    Check Response Status Code    200    ${response.status_code}
    Should Contain    ${response.json()}    availableSpotsNumber
    Should Contain    ${response.json()}    totalSpotsNumber
    Should Not Contain    ${response.json()}    name
    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}
+4 −1
Original line number Diff line number Diff line
@@ -24,7 +24,7 @@ ${b2_url}
${b3_url}

*** Test Cases ***
IOP_CNF_01 Create OffStreetParking:2
IOP_CNF_01_02 Create OffStreetParking:2
    [Documentation]    Pre-conditions: No user context. No data in any broker.
    ...                Registrations established: Inclusive in A to B. Exclusive in A to C.
    [Tags]    since_v1.6.1    iop    4_3_3    cf_06    additive-inclusive    proxy-exclusive    4_3_6    5_6_1
@@ -47,6 +47,9 @@ IOP_CNF_01 Create OffStreetParking:2
    ${response}=    Retrieve Entity    ${entity_id}    broker_url=${b3_url}    local=true
    Check Response Status Code    200    ${response.status_code}
    Should Contain    ${response.json()}    location
    Should Not Contain    ${response.json()}    name
    Should Not Contain    ${response.json()}    availableSpotsNumber
    Should Not Contain    ${response.json()}    totalSpotsNumber

*** Keywords ***
Setup Initial Context Source Registrations
+7 −1
Original line number Diff line number Diff line
@@ -22,7 +22,7 @@ ${b3_url}
${b4_url}

*** Test Cases ***
IOP_CNF_02 Create OffStreetParking:1
IOP_CNF_02_01 Create OffStreetParking:1
    [Documentation]    Pre-conditions: No user context. No data in any broker.
    ...                Registrations established: Inclusive in A to B. Redirect in A to C. Redirect in A to D.
    [Tags]    since_v1.6.1    iop    4_3_3    cf_06    additive-inclusive    proxy-redirect    4_3_6    5_6_1
@@ -46,11 +46,17 @@ IOP_CNF_02 Create OffStreetParking:1
    ${response}=    Retrieve Entity    ${entity_id}    local=true    broker_url=${b3_url}
    Check Response Status Code    200    ${response.status_code}
    Should Contain    ${response.json()}    location
    Should Not Contain    ${response.json()}    name
    Should Not Contain    ${response.json()}    availableSpotsNumber
    Should Not Contain    ${response.json()}    totalSpotsNumber

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

*** Keywords ***
Setup Initial Context Source Registrations
+1 −1
Original line number Diff line number Diff line
@@ -23,7 +23,7 @@ ${b3_url}
${b4_url}

*** Test Cases ***
IOP_CNF_02 Create OffStreetParking:2
IOP_CNF_02_02 Create OffStreetParking:2
    [Documentation]    Pre-conditions: No user context. No data in any broker.
    ...                Registrations established: Inclusive in A to B. Redirect in A to C. Redirect in A to D.
    [Tags]    since_v1.6.1    iop    4_3_3    cf_06    additive-inclusive    proxy-redirect    4_3_6    5_6_1
+6 −0
Original line number Diff line number Diff line
@@ -30,6 +30,10 @@ IOP_CNF_03_01 Create OffStreetParking:1
    #Agent checks that the full entity of OffStreetParking:1 is created in A and check for a successful response
    ${response}=    Create Entity    ${entity_payload_filename}    ${entity_id}    broker_url=${b1_url}
    Check Response Status Code    201    ${response.status_code}
    Should Contain    ${response.json()}    name
    Should Contain    ${response.json()}    location
    Should Contain    ${response.json()}    availableSpotsNumber
    Should Contain    ${response.json()}    totalSpotsNumber

    #Agent checks, with local=true, that the entity is created in A
    ${response}=    Retrieve Entity    ${entity_id}    local=true    broker_url=${b1_url}
@@ -46,6 +50,8 @@ IOP_CNF_03_01 Create OffStreetParking:1
    Check Response Status Code    200    ${response.status_code}
    Should Contain    ${response.json()}    availableSpotsNumber
    Should Contain    ${response.json()}    totalSpotsNumber
    Should Not Contain    ${response.json()}    name
    Should Not Contain    ${response.json()}    location

*** Keywords ***
Setup Initial Context Source Registrations
Loading