Commit 64e354e8 authored by Andrea Il Grande's avatar Andrea Il Grande
Browse files

Renamed 'Context Repository' into 'Context Source' and 'Create...

Renamed 'Context Repository' into 'Context Source' and 'Create ContextSourceRegistration Payload' into 'Prepare Context Source Registration From File'
parent aae6ba79
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
*** Settings ***
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
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 Source

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

@@ -40,7 +40,7 @@ Setup Entity On Remote And Registration

    ${registration_id}=    Generate Random Entity Id    ${registration_id_prefix}
    Set Suite Variable    ${registration_id}
    ${registration_payload}=    Create ContextSourceRegistration Payload   
    ${registration_payload}=    Prepare Context Source Registration From File   
    ...    ${registration_id}
    ...    ${registration_payload_file_path}
    ...    entity_id=${entity_id}
+4 −4
Original line number Diff line number Diff line
*** Settings ***
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
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 Source from the Context Broker but gets an error for 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_02 Create entity already existing locally on a Context Repository
057_01_02 Create entity already existing locally on a Context Source
    [Tags]    dist-ops    e-create    5_6_1
    [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
    [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 Source
    ${response}=    Create Entity    ${entity_payload_filename}    ${entity_id}
    Check Response Status Code    207    ${response.status_code}
    
@@ -41,7 +41,7 @@ Setup Entity On Remote And Registration

    ${registration_id}=    Generate Random Entity Id    ${registration_id_prefix}
    Set Suite Variable    ${registration_id}
    ${registration_payload}=    Create ContextSourceRegistration Payload   
    ${registration_payload}=    Prepare Context Source Registration From File   
    ...    ${registration_id}
    ...    ${registration_payload_file_path}
    ...    entity_id=${entity_id}
+4 −4
Original line number Diff line number Diff line
*** Settings ***
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
Documentation        Verify that, when one has an entity on a Context Broker and on a Context Source and an inclusive registration on the Context Broker, one is not able to create that entity on the Context Source 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 Broker and Context Repository
057_01_03 Create entity already existing on both Context Broker and Context Source
    [Tags]    dist-ops    e-create    5_6_1
    [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
    [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 Source
    ${response}=    Create Entity    ${entity_payload_filename}    ${entity_id}
    Check Response Status Code    207    ${response.status_code}
    
@@ -41,7 +41,7 @@ Setup Entity On Remote And Registration

    ${registration_id}=    Generate Random Entity Id    ${registration_id_prefix}
    Set Suite Variable    ${registration_id}
    ${registration_payload}=    Create ContextSourceRegistration Payload   
    ${registration_payload}=    Prepare Context Source Registration From File   
    ...    ${registration_id}
    ...    ${registration_payload_file_path}
    ...    entity_id=${entity_id}
+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 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
Documentation        Verify that, when one has an entity on a Context Source and an inclusive registration on a Context Broker, one is not able to create that entity on the Context Source 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
@@ -21,7 +21,7 @@ ${registration_payload_file_path} csourceRegistrations/context-source-regi
*** Test Cases ***
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 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
    [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 Source, 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}
    
@@ -41,7 +41,7 @@ Setup Entity On Remote And Registration

    ${registration_id}=    Generate Random Entity Id    ${registration_id_prefix}
    Set Suite Variable    ${registration_id}
    ${registration_payload}=    Create ContextSourceRegistration Payload   
    ${registration_payload}=    Prepare Context Source Registration From File   
    ...    ${registration_id}
    ...    ${registration_payload_file_path}
    ...    entity_id=${entity_id}
+4 −4
Original line number Diff line number Diff line
*** Settings ***
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 
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 Source 

Resource            ${EXECDIR}/resources/ApiUtils/ContextSourceRegistration.resource
Resource            ${EXECDIR}/resources/ApiUtils/ContextSourceDiscovery.resource
@@ -21,9 +21,9 @@ ${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 Broker and Context Repository
057_02_01 Request to create an entity with a malformed id on both Context Broker and Context Source
    [Tags]    dist-ops    e-create    5_6_1
    [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 
    [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 Source 
    ${response}=    Create Entity    ${entity_payload_filename}    ${entity_id}
    Check Response Status Code    400    ${response.status_code}

@@ -39,7 +39,7 @@ ${registration_payload_file_path} csourceRegistrations/context-source-regi
Setup Entity On Remote And Registration
    ${registration_id}=    Generate Random Entity Id    ${registration_id_prefix}
    Set Suite Variable    ${registration_id}
    ${registration_payload}=    Create ContextSourceRegistration Payload   
    ${registration_payload}=    Prepare Context Source Registration From File   
    ...    ${registration_id}
    ...    ${registration_payload_file_path}
    ${response1}=    Create Context Source Registration With Return    ${registration_payload}
Loading