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

refactory: unify the function for three broker scenario for retrieve

parent ba4a87d0
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -2,6 +2,7 @@
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.

Resource            ${EXECDIR}/resources/IOPUtils/InteroperabilityUtils.resource
Variables           ${EXECDIR}/resources/IOPUtils/IOPRegistry.py

Test Setup          Setup Initial Context Source Registrations
Test Teardown       Delete Entities and Delete Registrations
@@ -40,9 +41,14 @@ Setup Initial Context Source Registrations
    ${entity_id2}=    Generate Random Parking Entity Id
    Set Suite Variable    ${entity_id2}

    Initialize Three Broker IOP Scenario For First Retrieve
    ...    ${entity_id1}
    ${response}=    Create Entity
    ...    ${IOP_REGISTRY_URL}[parking][full_2]
    ...    ${entity_id2}
    ...    broker_url=${broker_B_url}
    Check Response Status Code    201    ${response.status_code}

    Initialize Three Broker IOP Scenario For Retrieve
    ...    ${entity_id1}
    ...    ${entity_id2}
    ...    ${broker_A_url}
    ...    ${broker_B_url}
+1 −1
Original line number Diff line number Diff line
@@ -40,7 +40,7 @@ Setup Initial Context Source Registrations
    ${entity_id}=    Generate Random Parking Entity Id
    Set Suite Variable    ${entity_id}

    Initialize Three Broker IOP Scenario For Second Retrieve
    Initialize Three Broker IOP Scenario For Retrieve
    ...    ${entity_id}
    ...    ${entity_id}
    ...    ${broker_A_url}
+1 −38
Original line number Diff line number Diff line
@@ -76,44 +76,7 @@ Initialize Three Broker IOP Scenario For Query
    ...    ${first_broker_url}
    ...    exclusive

Initialize Three Broker IOP Scenario For First Retrieve
    [Arguments]    ${first_entity_id}
    ...            ${second_entity_id}
    ...            ${third_entity_id}
    ...            ${first_broker_url}
    ...            ${second_broker_url}
    ...            ${third_broker_url}

    ${registration_id1}=    Generate Random CSR Id
    Set Suite Variable    ${registration_id1}
    ${registration_id2}=    Generate Random CSR Id
    Set Suite Variable    ${registration_id2}

    ${response}=    Create Entity
    ...    ${IOP_REGISTRY_URL}[parking][full_2]
    ...    ${second_entity_id}
    ...    broker_url=${second_broker_url}
    Check Response Status Code    201    ${response.status_code}

    ${response}=    Provision Entity And Registration For IOP Test
    ...    ${first_entity_id}
    ...    ${IOP_REGISTRY_URL}[parking][full_1]
    ...    ${registration_id1}
    ...    ${IOP_REGISTRY_URL}[registration][inclusive_2]
    ...    ${second_broker_url}
    ...    ${first_broker_url}
    ...    inclusive

    ${response}=    Provision Entity And Registration For IOP Test
    ...    ${third_entity_id}
    ...    ${IOP_REGISTRY_URL}[parking][full_2]
    ...    ${registration_id2}
    ...    ${IOP_REGISTRY_URL}[registration][exclusive_2]
    ...    ${third_broker_url}
    ...    ${first_broker_url}
    ...    exclusive

Initialize Three Broker IOP Scenario For Second Retrieve
Initialize Three Broker IOP Scenario For Retrieve
    [Arguments]    ${first_entity_id}
    ...            ${second_entity_id}
    ...            ${first_broker_url}