Commit 35554c2b authored by Benedetta Arena's avatar Benedetta Arena
Browse files

fix: improve tests logic

parent 387c2281
Loading
Loading
Loading
Loading
+11 −7
Original line number Diff line number Diff line
*** Settings ***
Documentation       Verify that the broker b2 mirrors the information stored in the b1 broker and broker b3 contains some exclusive data.
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.

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

*** Test Cases ***
IOP_CNF_01_01 Create Entity In B1 And Retrieve Entity In All Brokers
    [Documentation]    Check that entities are created in b1 and b2 but not in b3.
    [Tags]    6_1    I6_1_1_1    inclusive    exclusive    interoperability
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.
    [Tags]    since_v1.6.1    iop    4_3_3    cf_06    additive-inclusive    proxy-exclusive    4_3_6    5_6_1

    ${expected_payload}=    Load Entity    ${entity_payload_filename}    ${entity_id}
    ${response}=    Create Entity    ${entity_payload_filename}    ${entity_id}    broker_url=${b1_url}
@@ -43,6 +44,8 @@ IOP_CNF_01_01 Create Entity In B1 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 and in A to C.
    ${entity_id}=    Generate Random Parking Entity Id
    Set Suite Variable    ${entity_id}

@@ -69,6 +72,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 Entity    ${entity_id}    broker_url=${b1_url}
 No newline at end of file
+13 −7
Original line number Diff line number Diff line
*** Settings ***
Documentation       Verify that the brokers b1 and b2 do not contain an exclusive attributes found in the b3 broker.
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, in A and B, the entity is created containing the location attribute, while in C it is not contained.


Resource            ${EXECDIR}/resources/ApiUtils/Common.resource
Resource            ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource
@@ -22,9 +24,9 @@ ${b2_url}
${b3_url}

*** Test Cases ***
IOP_CNF_01_02 Create Entity In B1 And Retrieve Entity In All Brokers
    [Documentation]    Check that, in b1 and b2, the entity does not contain the attribute location, said attribute will be contained in b3 thanks to an exclusive registration.
    [Tags]    6_1    I6_1_1_2    inclusive    exclusive    interoperability
IOP_CNF_01_02 Create Entity In A And Retrieve Entity In All Brokers
    [Documentation]    Check that, in A and B, the entity does not contain the attribute location, said attribute will be contained in C thanks to an exclusive registration.
    [Tags]    since_v1.6.1    iop    4_3_3    cf_06    additive-inclusive    proxy-exclusive    4_3_6    5_6_1

    ${response}=    Create Entity    ${entity_payload_filename}    ${entity_id}    broker_url=${b1_url}
    Check Response Status Code    201    ${response.status_code}
@@ -43,6 +45,9 @@ IOP_CNF_01_02 Create Entity In B1 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 and in A to C.

    ${entity_id}=    Generate Random Parking Entity Id
    Set Suite Variable    ${entity_id}

@@ -69,6 +74,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 Entity    ${entity_id}    broker_url=${b1_url}
+11 −7
Original line number Diff line number Diff line
*** Settings ***
Documentation       Verify that broker b2 mirrors the information in b1 and the b3 and b4 brokers contain only the location property.
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 entity created in C and one redirect for the entities created in D.
...                 The client creates the entity in A. The entity should not contain the location attribute in A and B. The C and D brokers should only contain the location attribute.

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

*** Test Cases ***
IOP_CNF_02_01 Create Entity In B1 And Retrieve Entity In All Brokers
    [Documentation]    Check that entities are created in the brokers, b1 and b2 should contain most entity attributes, 3b and b4 should only contain the location attribute.
    [Tags]    6_1    I6_1_2_1    inclusive    redirect    interoperability
IOP_CNF_02_01 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

    ${response}=    Create Entity    ${entity_payload_filename}    ${entity_id}    broker_url=${b1_url}
    Check Response Status Code    201    ${response.status_code}
@@ -47,6 +48,8 @@ IOP_CNF_02_01 Create Entity In B1 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}
    
@@ -84,6 +87,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 −7
Original line number Diff line number Diff line
*** Settings ***
Documentation       Verify that broker b2 mirrors the information in b1 and the b3 and b4 brokers contain only the location property.
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 entity created in C and one redirect for the entities created in D.
...                 The client creates the entity in A. The entity should not contain the location attribute in A and B. The C and D brokers should only contain the location attribute.

Resource            ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource
Resource            ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource
@@ -22,9 +23,10 @@ ${b3_url}
${b4_url}

*** Test Cases ***
IOP_CNF_02_02 Create Entity In B1 And Retrieve Entity In All Brokers
    [Documentation]    Check that entities are created in the brokers, b1 and b2 should contain most entity attributes, 3b and b4 should only contain the location attribute.
    [Tags]    6_1    I6_1_2_2    inclusive    redirect    interoperability
IOP_CNF_02_02 Create Entity In A And Retrieve Entity In All Brokers
    [Documentation]    Check that entities are created in the brokers. A and B should not contain the location attribute, 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


    ${response}=    Create Entity    ${entity_payload_filename}    ${entity_id}    broker_url=${b1_url}
    Check Response Status Code    201    ${response.status_code}
@@ -48,6 +50,8 @@ IOP_CNF_02_02 Create Entity In B1 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}

@@ -85,6 +89,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}
+11 −8
Original line number Diff line number Diff line
*** Settings ***
Documentation       Verify that the entity is created in b3 and b4, but it is not created in b2
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 entity created in C and one inclusive for the entities created in D.
...                 The client creates the entity in A. The entity should be present in A and B, should not be present in C and should only contain some attributes in D.

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

*** Test Cases ***
IOP_CNF_03_01 Create Entity In B1 And Retrieve Entity In All Brokers
    [Documentation]    Check that entities are created in b1 and b3. The entity is not present in b2 and in b4 there are only some attributes.
    [Tags]    6_1    I6_1_3_1    auxiliary    inclusive    interoperability
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.
    [Tags]    since_v1.6.1    iop    4_3_3    cf_06    additive-inclusive    additive-auxiliary    4_3_6    5_6_1

    ${response}=    Create Entity    ${entity_payload_filename}    ${entity_id}    broker_url=${b1_url}
    Check Response Status Code    201    ${response.status_code}
@@ -43,6 +43,8 @@ IOP_CNF_03_01 Create Entity In B1 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}
    
@@ -80,6 +82,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