Commit 11067c87 authored by Benedetta Arena's avatar Benedetta Arena
Browse files

fix: change files name and path

parent f01fc6e3
Loading
Loading
Loading
Loading
+4 −5
Original line number Diff line number Diff line
*** Settings ***
Documentation       Three brokers are set up A, B and C. A has two registrations, one inclusive for the entities created in B and one exclusive for the entity created in C. 
...                 Check that the entity created in A and B but not in C.
...                 Check that the entity is created in A and B but not in C.

Resource            ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource
Resource            ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource
@@ -21,10 +21,9 @@ ${b2_url}
${b3_url}

*** Test Cases ***
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.
IOP_CNF_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

    #Create OffStreetParking:1 in A and check for a successful response
+8 −5
Original line number Diff line number Diff line
@@ -22,34 +22,38 @@ ${b3_url}
${b4_url}

*** Test Cases ***
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.
IOP_CNF_02 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

    #The agent creates the full entity of OffStreetParking:1 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}
    
    #Agent checks, with local=true, that the entity is created in A and does not contain the location property
    ${response}=    Retrieve Entity    ${entity_id}    local=true    broker_url=${b1_url}
    Check Response Status Code    200    ${response.status_code}
    Should Not Contain    ${response.json()}    location

    #Agent checks, with local=true, that the entity is created in B and does not contain the location and name properties
    ${response}=    Retrieve Entity    ${entity_id}    local=true    broker_url=${b2_url}
    Check Response Status Code    200    ${response.status_code}
    Should Not Contain    ${response.json()}    location
    Should Not Contain    ${response.json()}    name

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

    #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

*** Keywords ***
Setup Initial Context Source Registrations
    [Documentation]    Pre-conditions: no user context. No data in any broker.
    ...                CSR in A to B, in A to C and in A to D.
    ${entity_id}=    Generate Random Parking Entity Id
    Set Suite Variable    ${entity_id}
    
@@ -87,7 +91,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 Context Source Registration    ${registration_id3}    broker_url=${b1_url}
+8 −5
Original line number Diff line number Diff line
@@ -22,20 +22,26 @@ ${b2_url}
${b3_url}
${b4_url}
*** Test Cases ***
IOP_CNF_03_01 Create Entity In A And Retrieve Entity In All Brokers
    [Documentation]    Check that entities are created in A and C. The entity is not present in B and in D there are only some attributes.
IOP_CNF_03_01 Create OffStreetParking:1
    [Documentation]    Pre-conditions: No user context. No data in any broker.
    ...                Registrations established: Auxiliary in A to B. Inclusive in A to C. Inclusive in A to D.
    [Tags]    since_v1.6.1    iop    4_3_3    cf_06    additive-inclusive    additive-auxiliary    4_3_6    5_6_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}

    #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}
    #Agent checks, with local=true, that the entity was not created in B
    ${response}=    Retrieve Entity    ${entity_id}    local=true    broker_url=${b2_url}
    Check Response Status Code    404    ${response.status_code}
    #Agent checks, with local=true, that the entity is created in C
    ${response}=    Retrieve Entity    ${entity_id}    local=true    broker_url=${b3_url}
    Check Response Status Code    200    ${response.status_code}

    #Agent checks, with local=true, that the entity is created in D and only contains the properties availableSpotsNumber and totalSpotsNumber
    ${response}=    Retrieve Entity    ${entity_id}    local=true    broker_url=${b4_url}
    Check Response Status Code    200    ${response.status_code}
    Should Contain    ${response.json()}    availableSpotsNumber
@@ -43,8 +49,6 @@ IOP_CNF_03_01 Create Entity In A And Retrieve Entity In All Brokers

*** Keywords ***
Setup Initial Context Source Registrations
    [Documentation]    Pre-conditions: no user context. No data in any broker.
    ...                CSR in A to B, in A to C and in A to D.
    ${entity_id}=    Generate Random Parking Entity Id
    Set Suite Variable    ${entity_id}
    
@@ -82,7 +86,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 Context Source Registration    ${registration_id3}    broker_url=${b1_url}
+8 −6
Original line number Diff line number Diff line
@@ -23,27 +23,30 @@ ${b3_url}
${b4_url}

*** Test Cases ***
IOP_CNF_03_02 Create Entity In A And Retrieve Entity In All Brokers
    [Documentation]    Check that entities are created in the A and C brokers. B and D should not contain the entity
IOP_CNF_03_02 Create Partial OffStreetParking:1
    [Documentation]    Pre-conditions: No user context. No data in any broker.
    ...                Registrations established: Auxiliary in A to B. Inclusive in A to C. Inclusive in A to D.
    [Tags]    since_v1.6.1    iop    4_3_3    cf_06    additive-inclusive    additive-auxiliary    4_3_6    5_6_1


    #Check that the the entity of OffStreetParking:1 with location and name only 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}

    #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}
    #Agent checks, with local=true, that the entity was not created in B
    ${response}=    Retrieve Entity    ${entity_id}    local=true    broker_url=${b2_url}
    Check Response Status Code    404    ${response.status_code}
    #Agent checks, with local=true, that the entity is created in C
    ${response}=    Retrieve Entity    ${entity_id}    local=true    broker_url=${b3_url}
    Check Response Status Code    200    ${response.status_code}
    #Agent checks, with local=true, that the entity was not created in D
    ${response}=    Retrieve Entity    ${entity_id}    local=true    broker_url=${b4_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, in A to C and in A to D.
    ${entity_id}=    Generate Random Parking Entity Id
    Set Suite Variable    ${entity_id}
    
@@ -81,7 +84,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 Context Source Registration    ${registration_id3}    broker_url=${b1_url}
+9 −7
Original line number Diff line number Diff line
@@ -26,30 +26,33 @@ ${b4_url}
${b5_url}

*** Test Cases ***
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
IOP_CNF_04 Create OffStreetParking:1
    [Documentation]    Pre-conditions: No user context. No data in any broker.
    ...                Registrations established: Auxiliary in A to B. Inclusive in A to C. Redirect in B to D. Redirect in B to E. Exclusive in C to E.
    [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

    #Create the full entity of OffStreetParking:1 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}

    #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}
    #Agent checks, with local=true, that the entity was not created in B
    ${response}=    Retrieve Entity    ${entity_id}    local=true    broker_url=${b2_url}
    Check Response Status Code    404    ${response.status_code}
    #Agent checks, with local=true, that the entity is created in C
    ${response}=    Retrieve Entity    ${entity_id}    local=true    broker_url=${b3_url}
    Check Response Status Code    200    ${response.status_code}
    #Agent checks, with local=true, that the entity was not created in D
    ${response}=    Retrieve Entity    ${entity_id}    local=true    broker_url=${b4_url}
    Check Response Status Code    404    ${response.status_code}
    #Agent checks, with local=true, that the entity was not created in E
    ${response}=    Retrieve Entity    ${entity_id}    local=true    broker_url=${b5_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.
    ...                CSR in B to D and in B to E.
    ...                CSR in C to E.
    ${entity_id}=    Generate Random Parking Entity Id
    Set Suite Variable    ${entity_id}
    
@@ -109,7 +112,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=${b2_url}
    Delete Context Source Registration    ${registration_id3}    broker_url=${b2_url}
Loading