Commit 91b6ce89 authored by Benedetta Arena's avatar Benedetta Arena
Browse files

fix: clear test logic

parent 0eb7ae7f
Loading
Loading
Loading
Loading
+17 −12
Original line number Diff line number Diff line
*** Settings ***
Documentation       Verify that the entities found in b2 and b3 can be queried from b1 via HTTP GET.
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. 
...                 The client sends a HTTP GET request to check that quering the offparking type returns the entities in B and C.
Resource            ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource
Resource            ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource
Resource            ${EXECDIR}/resources/ApiUtils/ContextSourceDiscovery.resource
@@ -22,8 +23,8 @@ ${b3_url}

*** Test Cases ***
IOP_CNF_01_01 Create Entity In B1 And Query Entity In All Brokers
    [Documentation]    Check that entities can be queried from all brokers.
    [Tags]    6_3    I6_3_1_1    inclusive    exclusive    interoperability
    [Documentation]    Check that quering the offparking type returns the entities in B and C and said entities have the same attributes as the ones queried from A.
    [Tags]    since_v1.6.1    iop    4_3_3    cf_06    additive-inclusive    proxy-exclusive    4_3_6    5_7_2
    
    ${response}=    Query Entities    entity_types=OffstreetParking    broker_url=${b1_url}
    Check Response Status Code    200    ${response.status_code}
@@ -48,7 +49,10 @@ IOP_CNF_01_01 Create Entity In B1 And Query Entity In All Brokers

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

    [Documentation]    Pre-conditions: no user context. Data only on leaves. 
    ...                Broker B contains OffStreetParking1 and OffStreetParking2 without location and totalSpotsNumber. 
    ...                Broker C contains OffStreetParking2.
    ...                CSR in A to B and in A to C.
    ${entity_id}=    Generate Random Parking Entity Id
    Set Suite Variable    ${entity_id}
    ${second_entity_id}=    Generate Random Parking Entity Id
@@ -94,6 +98,7 @@ 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}
+17 −12
Original line number Diff line number Diff line
*** Settings ***
Documentation       Verify that the entities found in b2 and b3 can be queried from b1 via HTTP POST.
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. 
...                 The client sends and HTTP POST request to check that the entities can be queried from all brokers.

Resource            ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource
Resource            ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource
@@ -23,8 +24,8 @@ ${b3_url}

*** Test Cases ***
IOP_CNF_01_01 Create Entity In B1 And Query Entity In All Brokers
    [Documentation]    Check that entities can be queried from all brokers.
    [Tags]    6_3    I6_3_1_2    inclusive    exclusive    interoperability
    [Documentation]    Check that quering the offparking type returns the entities in B and C and said entities have the same attributes as the ones queried from A.
    [Tags]    since_v1.6.1    iop    4_3_3    cf_06    additive-inclusive    proxy-exclusive    4_3_6    5_7_2
    
    @{entities}=    Create List    ${entity_id}    ${second_entity_id}
    ${response}=    Query Entities Via POST   entities=${entities}    broker_url=${b1_url}
@@ -49,7 +50,10 @@ IOP_CNF_01_01 Create Entity In B1 And Query Entity In All Brokers

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

    [Documentation]    Pre-conditions: no user context. Data only on leaves. 
    ...                Broker B contains OffStreetParking1 and OffStreetParking2 without location and totalSpotsNumber. 
    ...                Broker C contains OffStreetParking2.
    ...                CSR in A to B and in A to C.
    ${entity_id}=    Generate Random Parking Entity Id
    Set Suite Variable    ${entity_id}
    ${second_entity_id}=    Generate Random Parking Entity Id
@@ -95,6 +99,7 @@ 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}
+12 −6
Original line number Diff line number Diff line
*** Settings ***
Documentation       Verify that the entities found in b2, b3 and b4 can be queried from b1 via Query.
Documentation       Four brokers are set up A, B, C and D. A has three registrations, one inclusive for the entities created in B, one redirect for the entities created in C and D and one redirect for the entity created in D.
...                 The client sends a HTTP GET request to check that quering the offparking type returns the entities in B, C and D and said entities have the same attributes as the ones queried from A.
Resource            ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource
Resource            ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource
Resource            ${EXECDIR}/resources/ApiUtils/ContextSourceDiscovery.resource
@@ -26,7 +27,7 @@ ${b4_url}

*** Test Cases ***
IOP_CNF_02_01 Create Entity In B1 And Query Entity In All Brokers
    [Documentation]    Check that entities can be queried from all brokers.
    [Documentation]    Check that quering the offparking type returns the entities in B, C and D and said entities have the same attributes as the ones queried from A.
    [Tags]    6_3    I6_3_2_1    inclusive    redirect    interoperability
    
    ${response}=    Query Entities    entity_types=OffstreetParking    broker_url=${b1_url}
@@ -60,7 +61,11 @@ IOP_CNF_02_01 Create Entity In B1 And Query Entity In All Brokers

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

    [Documentation]    Pre-conditions: no user context. Data on every broker. 
    ...                Broker B contains OffStreetParking1 without location and OffStreetParking2 without location.
    ...                Broker C contains OffStreetParking1 and OffStreetParking2.
    ...                Broker D contains OffStreetParking2 with location and name only.
    ...                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}
    ${second_entity_id}=    Generate Random Parking Entity Id
@@ -132,6 +137,7 @@ 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}
+14 −7
Original line number Diff line number Diff line
*** Settings ***
Documentation       Verify that the entities found in b2, b3 and b4 can be queried from b1 via Query.
Documentation       Four brokers are set up A, B, C and D. A has five registrations, two inclusive for the entities created in B, one redirect for the entities created in C and two redirect for the entity created in D.
...                 Check that the entities in B, C and D and said entities have the same attributes as the ones queried from A.
Resource            ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource
Resource            ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource
Resource            ${EXECDIR}/resources/ApiUtils/ContextSourceDiscovery.resource
@@ -29,8 +30,8 @@ ${b4_url}

*** Test Cases ***
IOP_CNF_02_02 Create Entity In B1 And Query Entity In All Brokers
    [Documentation]    Check that entities can be queried from all brokers.
    [Tags]    6_3    I6_3_2_2    inclusive    redirect    interoperability
    [Documentation]    Verify that the entities found in B, C and D can be queried via HTTP GET and said entities have the same attributes as the ones queried from A.
    [Tags]    since_v1.6.1    iop    4_3_3    cf_06    additive-inclusive    proxy-redirect    4_3_6    5_7_2

    ${response}=    Query Entities    entity_types=OffstreetParking,Vehicle    attrs=location    broker_url=${b1_url}
    Check Response Status Code    200    ${response.status_code}
@@ -62,6 +63,11 @@ IOP_CNF_02_02 Create Entity In B1 And Query Entity In All Brokers

*** Keywords ***
Setup Initial Context Source Registrations    
    [Documentation]    Pre-conditions: no user context. Data only on leaves. 
    ...                Broker B contains OffStreetParking1 and Vehicle1.
    ...                Broker C contains OffStreetParking1 with location and name only and OffStreetParking2
    ...                Broker D contains OffStreetParking2 with location and name only and Vehicle2.
    ...                CSR in A to B, in A to C and in A to D.
    ${first_parking_entity_id}=    Generate Random Parking Entity Id
    Set Suite Variable    ${first_parking_entity_id}
    ${second_parking_entity_id}=    Generate Random Parking Entity Id
@@ -137,6 +143,7 @@ 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}
+12 −5
Original line number Diff line number Diff line
*** Settings ***
Documentation       Verify that the entities found in b2, b3 and b4 can be queried from b1 via Query.
Documentation       Four brokers are set up A, B, C and D. A has three registrations, one auxiliary for the entities created in B, one inclusive for the entities created in C and one inclusive for the entity created in D.
...                 Check that the entity returned from A match the attributes from the entity in B, C and D.
Resource            ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource
Resource            ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource
Resource            ${EXECDIR}/resources/ApiUtils/ContextSourceDiscovery.resource
@@ -24,8 +25,8 @@ ${b4_url}

*** Test Cases ***
IOP_CNF_03_01 Create Entity In B1 And Query Entity In All Brokers
    [Documentation]    Check that entities can be queried from all brokers.
    [Tags]    6_3    I6_3_3_1    inclusive    auxiliary    interoperability
    [Documentation]    Verify that the entity found in B, C and D can be queried via HTTP GET and said entities have the same attributes as the ones queried from A.
    [Tags]    since_v1.6.1    iop    4_3_3    cf_06    additive-inclusive    additive-auxiliary    4_3_6    5_7_2

    ${response}=    Query Entities    entity_types=OffstreetParking    broker_url=${b1_url}
    Check Response Status Code    200    ${response.status_code}
@@ -54,6 +55,11 @@ IOP_CNF_03_01 Create Entity In B1 And Query Entity In All Brokers

*** Keywords ***
Setup Initial Context Source Registrations
    [Documentation]    Pre-conditions: no user context. Data only on leaves. 
    ...                Broker B contains OffStreetParking2 without location. 
    ...                Broker C contains OffStreetParking1.
    ...                Broker D contains OffStreetParking1 without location.
    ...                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}

@@ -97,6 +103,7 @@ 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}
Loading