Commit 6f4ae3f0 authored by Benoit Orihuela's avatar Benoit Orihuela
Browse files

chore: apply robocop format on all Test Cases

parent 409a4220
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -14,10 +14,10 @@ ${unavailable_jsonldContext_subscription_file_path}= subscriptions/subscripti




*** Test Cases ***    FILE_NAME    EXPECTED_ERROR_TYPE    EXPECTED_STATUS_CODE
*** Test Cases ***    FILE_NAME    EXPECTED_ERROR_TYPE    EXPECTED_STATUS_CODE
028_07_01 Subscription with invalid jsonldContext
028_07_01 Subscription With Invalid jsonldContext
    [Tags]    sub-create    5_8_1    since_v1.7.1
    [Tags]    sub-create    5_8_1    since_v1.7.1
    ${invalid_jsonldContext_subscription_file_path}    ${ERROR_TYPE_BAD_REQUEST_DATA}    400
    ${invalid_jsonldContext_subscription_file_path}    ${ERROR_TYPE_BAD_REQUEST_DATA}    400
028_07_02 Subscription with unavailable jsonldContext
028_07_02 Subscription With Unavailable jsonldContext
    [Tags]    sub-create    5_8_1    since_v1.7.1
    [Tags]    sub-create    5_8_1    since_v1.7.1
    ${unavailable_jsonldContext_subscription_file_path}    ${ERROR_TYPE_LD_CONTEXT_NOT_AVAILABLE}    503
    ${unavailable_jsonldContext_subscription_file_path}    ${ERROR_TYPE_LD_CONTEXT_NOT_AVAILABLE}    503


+1 −1
Original line number Original line Diff line number Diff line
@@ -20,7 +20,7 @@ ${entity_expectation_file_path}= compacted-entity-with-jsonldContext-046-




*** Test Cases ***
*** Test Cases ***
046_20 Check that jsonldContext member in subscription is used when sending notifcations
046_20 Check That jsonldContext Member In Subscription Is Used When Sending Notifcations
    [Documentation]    If a subscription has a jsonldContext member then it should be used when sending notifications
    [Documentation]    If a subscription has a jsonldContext member then it should be used when sending notifications
    [Tags]    sub-notification    5_8_6    since_v1.7.1
    [Tags]    sub-notification    5_8_6    since_v1.7.1


+3 −1
Original line number Original line Diff line number Diff line
@@ -21,6 +21,7 @@ ${entity_speed_filename} vehicle-speed-attribute.json
${registration_id_prefix}               urn:ngsi-ld:Registration:
${registration_id_prefix}               urn:ngsi-ld:Registration:
${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 ***
D011_01_exc Query The Context Broker With Type
D011_01_exc Query The Context Broker With Type
    [Documentation]    Check that if one queries the Context Broker for type, entity with matching type on a Context Source gets merged correctly
    [Documentation]    Check that if one queries the Context Broker for type, entity with matching type on a Context Source gets merged correctly
@@ -37,6 +38,7 @@ D011_01_exc Query The Context Broker With Type
    ${body}=    Get From Dictionary    ${response.json()}    speed
    ${body}=    Get From Dictionary    ${response.json()}    speed
    Should Contain    ${body}    speed
    Should 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
+12 −11
Original line number Original line Diff line number Diff line
*** Settings ***
*** Settings ***
Documentation       Verify that an entity can be retrieved by Id with a queryEntity and a queryBatch while using an exclusive registration.
Documentation       Verify that an entity can be retrieved by Id with a queryEntity and a queryBatch while using an exclusive registration.

Resource            ${EXECDIR}/resources/ApiUtils/ContextSourceRegistration.resource
Resource            ${EXECDIR}/resources/ApiUtils/ContextSourceRegistration.resource
Resource            ${EXECDIR}/resources/ApiUtils/ContextSourceDiscovery.resource
Resource            ${EXECDIR}/resources/ApiUtils/ContextSourceDiscovery.resource
Resource            ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource
Resource            ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource
@@ -8,8 +9,8 @@ Resource ${EXECDIR}/resources/AssertionUtils.resource
Resource            ${EXECDIR}/resources/JsonUtils.resource
Resource            ${EXECDIR}/resources/JsonUtils.resource
Resource            ${EXECDIR}/resources/MockServerUtils.resource
Resource            ${EXECDIR}/resources/MockServerUtils.resource


Test Template      Setup Registration, Context Source Mock Server And Query The Context Broker With Type
Test Teardown       Delete Registration And Stop Context Source Mock Server
Test Teardown       Delete Registration And Stop Context Source Mock Server
Test Template       Setup Registration, Context Source Mock Server And Query The Context Broker With Type




*** Variables ***
*** Variables ***
@@ -19,19 +20,20 @@ ${entity_speed_filename} vehicle-speed-attribute.json
${registration_id_prefix}               urn:ngsi-ld:Registration:
${registration_id_prefix}               urn:ngsi-ld:Registration:
${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 ***
D011_02_01_exc Query The Context Broker With Type With queryEntity
D011_02_01_exc Query The Context Broker With Type With queryEntity
    [Documentation]    Check that if one queries the Context Broker for type, and the registration only allows the queryEntity operation, the request is forwarded as expected
    [Documentation]    Check that if one queries the Context Broker for type, and the registration only allows the queryEntity operation, the request is forwarded as expected
    [Tags]    since_v1.6.1    dist-ops    4_3_3    cf_06    proxy-exclusive    4_3_6_3    5_7_2
    [Tags]    since_v1.6.1    dist-ops    4_3_3    cf_06    proxy-exclusive    4_3_6_3    5_7_2
    [Template]    Setup Registration, Context Source Mock Server And Query The Context Broker With Type
    [Template]    Setup Registration, Context Source Mock Server And Query The Context Broker With Type
    GET    /broker1/ngsi-ld/v1/entities?type=Vehicle
    GET    /broker1/ngsi-ld/v1/entities?type=Vehicle

D011_02_02_exc Query The Context Broker With Type With queryBatch
D011_02_02_exc Query The Context Broker With Type With queryBatch
    [Documentation]    Check that if one queries the Context Broker for type, and the registration only allows the queryBatch operation, the request is forwarded as expected
    [Documentation]    Check that if one queries the Context Broker for type, and the registration only allows the queryBatch operation, the request is forwarded as expected
    [Tags]    since_v1.6.1    dist-ops    4_3_3    cf_06    proxy-exclusive    4_3_6_3    5_7_2
    [Tags]    since_v1.6.1    dist-ops    4_3_3    cf_06    proxy-exclusive    4_3_6_3    5_7_2
    [Template]    Setup Registration, Context Source Mock Server And Query The Context Broker With Type
    [Template]    Setup Registration, Context Source Mock Server And Query The Context Broker With Type
    POST    /broker1/ngsi-ld/v1/entityOperations/query
    POST    /broker1/ngsi-ld/v1/entityOperations/query



*** Keywords ***
*** Keywords ***
Setup Registration, Context Source Mock Server And Query The Context Broker With Type
Setup Registration, Context Source Mock Server And Query The Context Broker With Type
    [Arguments]    ${method}    ${url}
    [Arguments]    ${method}    ${url}
@@ -67,7 +69,6 @@ Setup Registration, Context Source Mock Server And Query The Context Broker With
    Check Response Status Code    200    ${response.status_code}
    Check Response Status Code    200    ${response.status_code}
    Check Response Body Containing Entities URIS set to    ${entities_id}    ${response.json()}
    Check Response Body Containing Entities URIS set to    ${entities_id}    ${response.json()}



Delete Registration And Stop Context Source Mock Server
Delete Registration And Stop Context Source Mock Server
    Delete Context Source Registration    ${registration_id}
    Delete Context Source Registration    ${registration_id}
    Stop Context Source Mock Server
    Stop Context Source Mock Server
+14 −13
Original line number Original line Diff line number Diff line
@@ -9,8 +9,8 @@ Resource ${EXECDIR}/resources/AssertionUtils.resource
Resource            ${EXECDIR}/resources/JsonUtils.resource
Resource            ${EXECDIR}/resources/JsonUtils.resource
Resource            ${EXECDIR}/resources/MockServerUtils.resource
Resource            ${EXECDIR}/resources/MockServerUtils.resource


Test Template      Setup Registration, Context Source Mock Server And Query The Context Broker With Type
Test Teardown       Delete Registration And Stop Context Source Mock Server
Test Teardown       Delete Registration And Stop Context Source Mock Server
Test Template       Setup Registration, Context Source Mock Server And Query The Context Broker With Type




*** Variables ***
*** Variables ***
@@ -19,19 +19,20 @@ ${entity_payload_filename} vehicle-simple-attributes.json
${registration_id_prefix}               urn:ngsi-ld:Registration:
${registration_id_prefix}               urn:ngsi-ld:Registration:
${registration_payload_file_path}       csourceRegistrations/context-source-registration-vehicle-complete.jsonld
${registration_payload_file_path}       csourceRegistrations/context-source-registration-vehicle-complete.jsonld



*** Test Cases ***
*** Test Cases ***
D011_02_01_red Query The Context Broker With Type with queryEntity
D011_02_01_red Query The Context Broker With Type With queryEntity
    [Documentation]    Verify that when querying by entity type with a redirect registration that supports queryEntity, the request is forwarded to the Context Source and entities are retrieved correctly
    [Documentation]    Verify that when querying by entity type with a redirect registration that supports queryEntity, the request is forwarded to the Context Source and entities are retrieved correctly
    [Tags]    since_v1.6.1    dist-ops    4_3_3    cf_06    proxy-redirect    4_3_6_3    5_7_2
    [Tags]    since_v1.6.1    dist-ops    4_3_3    cf_06    proxy-redirect    4_3_6_3    5_7_2
    [Template]    Setup Registration, Context Source Mock Server And Query The Context Broker With Type
    [Template]    Setup Registration, Context Source Mock Server And Query The Context Broker With Type
    GET    /broker1/ngsi-ld/v1/entities?type=Vehicle
    GET    /broker1/ngsi-ld/v1/entities?type=Vehicle

D011_02_02_red Query The Context Broker With Type With queryBatch
D011_02_02_red Query The Context Broker With Type with queryBatch
    [Documentation]    Verify that when querying by entity type with a redirect registration that supports queryBatch, the request is forwarded to the Context Source and entities are retrieved correctly
    [Documentation]    Verify that when querying by entity type with a redirect registration that supports queryBatch, the request is forwarded to the Context Source and entities are retrieved correctly
    [Tags]    since_v1.6.1    dist-ops    4_3_3    cf_06    proxy-redirect    4_3_6_3    5_7_2
    [Tags]    since_v1.6.1    dist-ops    4_3_3    cf_06    proxy-redirect    4_3_6_3    5_7_2
    [Template]    Setup Registration, Context Source Mock Server And Query The Context Broker With Type
    [Template]    Setup Registration, Context Source Mock Server And Query The Context Broker With Type
    POST    /broker1/ngsi-ld/v1/entityOperations/query
    POST    /broker1/ngsi-ld/v1/entityOperations/query



*** Keywords ***
*** Keywords ***
Setup Registration, Context Source Mock Server And Query The Context Broker With Type
Setup Registration, Context Source Mock Server And Query The Context Broker With Type
    [Arguments]    ${method}    ${url}
    [Arguments]    ${method}    ${url}
Loading