Commit aae6ba79 authored by Andrea Il Grande's avatar Andrea Il Grande
Browse files

Renamed 'Context Consumer' and 'Context Producer' into 'Context Broker'

parent 22c07028
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
*** Settings ***
Documentation        Verify that, when one has an inclusive registration on a Context Producer, one is able to create entities on both Context Producer and Context Repository
Documentation        Verify that, when one has an inclusive registration on a Context Broker, one is able to create entities on both Context Broker and Context Repository

Resource            ${EXECDIR}/resources/ApiUtils/ContextSourceRegistration.resource
Resource            ${EXECDIR}/resources/ApiUtils/ContextSourceDiscovery.resource
@@ -19,9 +19,9 @@ ${registration_id_prefix} urn:ngsi-ld:Registration:
${registration_payload_file_path}       csourceRegistrations/context-source-registration-vehicle-redirection-ops.jsonld

*** Test Cases ***
057_01_01 Create Entity On Both Context Producer and Context Repository
057_01_01 Create Entity On Both Context Broker and Context Repository
    [Tags]    dist-ops    e-create    5_6_1
    [Documentation]    Check that if one requests the Context Producer to create an entity that matches an inclusive registration, this is created on the Context Repository too 
    [Documentation]    Check that if one requests the Context Broker to create an entity that matches an inclusive registration, this is created on the Context Repository too 
    ${response}=    Create Entity    ${entity_payload_filename}    ${entity_id}
    Check Response Status Code    201    ${response.status_code}

+2 −2
Original line number Diff line number Diff line
*** Settings ***
Documentation        Verify that, when one has an entity and an inclusive registration on a Context Producer, one is able to create that entity on a Context Repository from the Context Producer but gets an error for the Context Producer
Documentation        Verify that, when one has an entity and an inclusive registration on a Context Broker, one is able to create that entity on a Context Repository from the Context Broker but gets an error for the Context Broker

Resource            ${EXECDIR}/resources/ApiUtils/ContextSourceRegistration.resource
Resource            ${EXECDIR}/resources/ApiUtils/ContextSourceDiscovery.resource
@@ -21,7 +21,7 @@ ${registration_payload_file_path} csourceRegistrations/context-source-regi
*** Test Cases ***
057_01_02 Create entity already existing locally on a Context Repository
    [Tags]    dist-ops    e-create    5_6_1
    [Documentation]    Check that if one requests the Context Producer to create an entity that matches an inclusive registration and already exists locally, this raises an error on the Context Producer but is created correctly on the Context Repository
    [Documentation]    Check that if one requests the Context Broker to create an entity that matches an inclusive registration and already exists locally, this raises an error on the Context Broker but is created correctly on the Context Repository
    ${response}=    Create Entity    ${entity_payload_filename}    ${entity_id}
    Check Response Status Code    207    ${response.status_code}
    
+3 −3
Original line number Diff line number Diff line
*** Settings ***
Documentation        Verify that, when one has an entity on a Context Consumer and on a Context Repository and an inclusive registration on the Context Consumer, one is not able to create that entity on the Context Repository from the Context Consumer
Documentation        Verify that, when one has an entity on a Context Broker and on a Context Repository and an inclusive registration on the Context Broker, one is not able to create that entity on the Context Repository from the Context Broker

Resource            ${EXECDIR}/resources/ApiUtils/ContextSourceRegistration.resource
Resource            ${EXECDIR}/resources/ApiUtils/ContextSourceDiscovery.resource
@@ -19,9 +19,9 @@ ${registration_id_prefix} urn:ngsi-ld:Registration:
${registration_payload_file_path}       csourceRegistrations/context-source-registration-vehicle-redirection-ops.jsonld

*** Test Cases ***
057_01_03 Create entity already existing on both Context Producer and Context Repository
057_01_03 Create entity already existing on both Context Broker and Context Repository
    [Tags]    dist-ops    e-create    5_6_1
    [Documentation]    Check that if one requests the Context Consumer to create an entity that matches an inclusive registration and already exists both locally and remotely, this raises an error on both Context Producer and Context Repository
    [Documentation]    Check that if one requests the Context Broker to create an entity that matches an inclusive registration and already exists both locally and remotely, this raises an error on both Context Broker and Context Repository
    ${response}=    Create Entity    ${entity_payload_filename}    ${entity_id}
    Check Response Status Code    207    ${response.status_code}
    
+3 −3
Original line number Diff line number Diff line
*** Settings ***
Documentation        Verify that, when one has an entity on a Context Repository and an inclusive registration on a Context Producer, one is not able to create that entity on the Context Repository from the Context Producer but one is able to create it on the Context Producer
Documentation        Verify that, when one has an entity on a Context Repository and an inclusive registration on a Context Broker, one is not able to create that entity on the Context Repository from the Context Broker but one is able to create it on the Context Broker

Resource            ${EXECDIR}/resources/ApiUtils/ContextSourceRegistration.resource
Resource            ${EXECDIR}/resources/ApiUtils/ContextSourceDiscovery.resource
@@ -19,9 +19,9 @@ ${registration_id_prefix} urn:ngsi-ld:Registration:
${registration_payload_file_path}       csourceRegistrations/context-source-registration-vehicle-redirection-ops.jsonld

*** Test Cases ***
057_01_04 Create entity already existing remotely on the Context Producer 
057_01_04 Create entity already existing remotely on the Context Broker 
    [Tags]    dist-ops    e-create    5_6_1
    [Documentation]    Check that if one requests the Context Producer to create an entity that matches an inclusive registration and already exists remotely, this raises an error on the Context Repository, but it works just fine on the Context Producer
    [Documentation]    Check that if one requests the Context Broker to create an entity that matches an inclusive registration and already exists remotely, this raises an error on the Context Repository, but it works just fine on the Context Broker
    ${response}=    Create Entity    ${entity_payload_filename}    ${entity_id}
    Check Response Status Code    207    ${response.status_code}
    
+4 −5
Original line number Diff line number Diff line
*** Settings ***
Documentation        Check that if one requests the Context Producer to create an entity that matches an inclusive registration but is malformed, this is created neither on the Context Producer nor on the Context Repository 
Documentation        Check that if one requests the Context Broker to create an entity that matches an inclusive registration but is malformed, this is created neither on the Context Broker nor on the Context Repository 

Resource            ${EXECDIR}/resources/ApiUtils/ContextSourceRegistration.resource
Resource            ${EXECDIR}/resources/ApiUtils/ContextSourceDiscovery.resource
@@ -14,15 +14,16 @@ Suite Teardown Delete Created Registration


*** Variables ***
${entity_id}                            InvalidUriExample
${entity_id_prefix}                     urn:ngsi-ld:Vehicle:
${entity_payload_filename}              vehicle-simple-attributes.jsonld
${registration_id_prefix}               urn:ngsi-ld:Registration:
${registration_payload_file_path}       csourceRegistrations/context-source-registration-vehicle-redirection-ops.jsonld

*** Test Cases ***
057_02_01 Request to create an entity with a malformed id on both Context Producer and Context Repository
057_02_01 Request to create an entity with a malformed id on both Context Broker and Context Repository
    [Tags]    dist-ops    e-create    5_6_1
    [Documentation]    Check that if one requests the Context Producer to create an entity that matches an inclusive registration but is malformed, this is created neither on the Context Producer nor on the Context Repository 
    [Documentation]    Check that if one requests the Context Broker to create an entity that matches an inclusive registration but is malformed, this is created neither on the Context Broker nor on the Context Repository 
    ${response}=    Create Entity    ${entity_payload_filename}    ${entity_id}
    Check Response Status Code    400    ${response.status_code}

@@ -36,8 +37,6 @@ ${registration_payload_file_path} csourceRegistrations/context-source-regi

*** Keywords ***
Setup Entity On Remote And Registration
    Set Suite Variable    ${entity_id}    InvalidUriExample

    ${registration_id}=    Generate Random Entity Id    ${registration_id_prefix}
    Set Suite Variable    ${registration_id}
    ${registration_payload}=    Create ContextSourceRegistration Payload   
Loading