Commit 709f0047 authored by Benedetta Arena's avatar Benedetta Arena
Browse files

Resolve "Add TCs for Delete Entity Attribute in the Distributed Case"

parent a9ba6eac
Loading
Loading
Loading
Loading
+1 −3
Original line number Original line Diff line number Diff line
@@ -17,7 +17,6 @@ ${entity_payload_filename} vehicle-simple-attributes.jsonld
${fragment_filename}                    vehicle-speed-isParked-fragment.json
${fragment_filename}                    vehicle-speed-isParked-fragment.json
${registration_payload_file_path}       csourceRegistrations/context-source-registration-vehicle-speed-with-redirection-ops.jsonld
${registration_payload_file_path}       csourceRegistrations/context-source-registration-vehicle-speed-with-redirection-ops.jsonld



*** Test Cases ***
*** Test Cases ***
D003_01_exc Append Entity Attribute
D003_01_exc Append Entity Attribute
    [Documentation]    Check that an entity attribute is appended and the exclusive registration forwards the request to the Context Source
    [Documentation]    Check that an entity attribute is appended and the exclusive registration forwards the request to the Context Source
@@ -37,7 +36,6 @@ D003_01_exc Append Entity Attribute
    ${body}=    Get From Dictionary    ${response.json()}    speed
    ${body}=    Get From Dictionary    ${response.json()}    speed
    Should Not Contain    ${body}    speed
    Should Not Contain    ${body}    speed



*** Keywords ***
*** Keywords ***
Create Entity And Registration On The Context Broker And Start Context Source Mock Server
Create Entity And Registration On The Context Broker And Start Context Source Mock Server
    ${entity_id}=    Generate Random Vehicle Entity Id
    ${entity_id}=    Generate Random Vehicle Entity Id
+0 −2
Original line number Original line Diff line number Diff line
@@ -19,7 +19,6 @@ ${entity_payload_filename} vehicle-simple-attributes.jsonld
${fragment_filename}                    vehicle-speed-isParked-fragment.json
${fragment_filename}                    vehicle-speed-isParked-fragment.json
${registration_payload_file_path}       csourceRegistrations/context-source-registration-vehicle-redirection-ops.jsonld
${registration_payload_file_path}       csourceRegistrations/context-source-registration-vehicle-redirection-ops.jsonld



*** Test Cases ***
*** Test Cases ***
D003_01_inc Append Entity Attribute
D003_01_inc Append Entity Attribute
    [Documentation]    Check that, given an inclusive registration, appending entity attributes updates the Context Source accordingly.
    [Documentation]    Check that, given an inclusive registration, appending entity attributes updates the Context Source accordingly.
@@ -44,7 +43,6 @@ D003_01_inc Append Entity Attribute
    Should Have Value In Json    ${response.json()}    $.speed
    Should Have Value In Json    ${response.json()}    $.speed
    Should Not Be Equal    ${old_body}    ${new_body}
    Should Not Be Equal    ${old_body}    ${new_body}



*** Keywords ***
*** Keywords ***
Create Entity And Registration On The Context Broker And Start Context Source Mock Server
Create Entity And Registration On The Context Broker And Start Context Source Mock Server
    ${entity_id}=    Generate Random Vehicle Entity Id
    ${entity_id}=    Generate Random Vehicle Entity Id
+2 −5
Original line number Original line Diff line number Diff line
*** Settings ***
*** Settings ***
Documentation       Check that if one request the Context Broker to append an attribute whose id matches two redirect registrations, the update is forwarded and the entity attributes are updated in both Context Sources
Documentation       Check that if one request the Context Broker to append an attribute whose id matches two redirect registrations, the update is forwarded and the entity attributes are updated in both Context Sources

Resource            ${EXECDIR}/resources/ApiUtils/Common.resource
Resource            ${EXECDIR}/resources/ApiUtils/Common.resource
Resource            ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource
Resource            ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource
Resource            ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource
Resource            ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource
@@ -19,7 +18,6 @@ ${entity_payload_filename} vehicle-simple-attributes.jsonld
${fragment_filename}                    vehicle-speed-isParked-fragment.json
${fragment_filename}                    vehicle-speed-isParked-fragment.json
${registration_payload_file_path}       csourceRegistrations/context-source-registration-vehicle-redirection-ops.jsonld
${registration_payload_file_path}       csourceRegistrations/context-source-registration-vehicle-redirection-ops.jsonld



*** Test Cases ***
*** Test Cases ***
D003_01_red Append Entity Attribute
D003_01_red Append Entity Attribute
    [Documentation]    Check that an entity attribute is appended and the redirect registration forwards the request to the Context Sources
    [Documentation]    Check that an entity attribute is appended and the redirect registration forwards the request to the Context Sources
@@ -41,7 +39,6 @@ D003_01_red Append Entity Attribute
    ${response}=    Retrieve Entity by Id    ${entity_id}    context=${ngsild_test_suite_context}    local=true
    ${response}=    Retrieve Entity by Id    ${entity_id}    context=${ngsild_test_suite_context}    local=true
    Check Response Status Code    404    ${response.status_code}
    Check Response Status Code    404    ${response.status_code}



*** Keywords ***
*** Keywords ***
Setup Registration And Start Context Source Mock Server
Setup Registration And Start Context Source Mock Server
    ${entity_id}=    Generate Random Vehicle Entity Id
    ${entity_id}=    Generate Random Vehicle Entity Id
+2 −4
Original line number Original line Diff line number Diff line
@@ -19,7 +19,6 @@ ${entity_payload_filename} vehicle-simple-attributes.jsonld
${fragment_filename}                    vehicle-speed-isParked-fragment.json
${fragment_filename}                    vehicle-speed-isParked-fragment.json
${registration_payload_file_path}       csourceRegistrations/context-source-registration-vehicle-speed-with-redirection-ops.jsonld
${registration_payload_file_path}       csourceRegistrations/context-source-registration-vehicle-speed-with-redirection-ops.jsonld



*** Test Cases ***
*** Test Cases ***
D003_02_exc Append Entity Attribute
D003_02_exc Append Entity Attribute
    [Documentation]    Check that an entity attribute is appended and the exclusive registration forwards the request to the Context Source with the noOverwrite flag
    [Documentation]    Check that an entity attribute is appended and the exclusive registration forwards the request to the Context Source with the noOverwrite flag
@@ -37,7 +36,6 @@ D003_02_exc Append Entity Attribute
    ${stub}=    Get Request Url Params    options
    ${stub}=    Get Request Url Params    options
    Should Contain    ${stub}    noOverwrite
    Should Contain    ${stub}    noOverwrite



*** Keywords ***
*** Keywords ***
Create Entity And Registration On The Context Broker And Start Context Source Mock Server
Create Entity And Registration On The Context Broker And Start Context Source Mock Server
    ${entity_id}=    Generate Random Vehicle Entity Id
    ${entity_id}=    Generate Random Vehicle Entity Id
+0 −3
Original line number Original line Diff line number Diff line
@@ -13,13 +13,11 @@ Resource ${EXECDIR}/resources/MockServerUtils.resource
Test Setup          Create Entity And Registration On The Context Broker And Start Context Source Mock Server
Test Setup          Create Entity And Registration On The Context Broker And Start Context Source Mock Server
Test Teardown       Delete Registration And Stop Context Source Mock Server
Test Teardown       Delete Registration And Stop Context Source Mock Server



*** Variables ***
*** Variables ***
${entity_payload_filename}              vehicle-simple-attributes.jsonld
${entity_payload_filename}              vehicle-simple-attributes.jsonld
${fragment_filename}                    vehicle-speed-isParked-fragment.json
${fragment_filename}                    vehicle-speed-isParked-fragment.json
${registration_payload_file_path}       csourceRegistrations/context-source-registration-vehicle-redirection-ops.jsonld
${registration_payload_file_path}       csourceRegistrations/context-source-registration-vehicle-redirection-ops.jsonld



*** Test Cases ***
*** Test Cases ***
D003_02_inc Append Entity Attribute
D003_02_inc Append Entity Attribute
    [Documentation]    Check that an entity attribute is appended and the inclusive registration forwards the request to the Context Source with the noOverwrite flag
    [Documentation]    Check that an entity attribute is appended and the inclusive registration forwards the request to the Context Source with the noOverwrite flag
@@ -45,7 +43,6 @@ D003_02_inc Append Entity Attribute
    Should Have Value In Json    ${response.json()}    $.speed
    Should Have Value In Json    ${response.json()}    $.speed
    Should Be Equal    ${old_body}    ${new_body}
    Should Be Equal    ${old_body}    ${new_body}



*** Keywords ***
*** Keywords ***
Create Entity And Registration On The Context Broker And Start Context Source Mock Server
Create Entity And Registration On The Context Broker And Start Context Source Mock Server
    ${entity_id}=    Generate Random Vehicle Entity Id
    ${entity_id}=    Generate Random Vehicle Entity Id
Loading