Commit 6475ccb9 authored by kzangeli's avatar kzangeli
Browse files

Merge remote-tracking branch 'origin/fix/scopeq-conformance' into integration/all-fixes

parents 0fdf46eb 6565521f
Loading
Loading
Loading
Loading
+13 −7
Changes for TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_01_06.robot: 13 added lines, 7 removed lines.
Original line number Diff line number Diff line
@@ -19,24 +19,30 @@ ${entity_type}= https://ngsi-ld-test-suite/context#Building


*** Test Cases ***    SCOPEQ    EXPECTED_COUNT
019_01_06 QueryWithFullScope
019_01_06_01 QueryWithFullScope
    [Tags]    e-query    4_19    since_v1.5.1
    /Madrid/Gardens/ParqueNorte    ${2}
019_01_06 QueryWithPlusMatching
019_01_06_02 QueryWithPlusMatching
    [Tags]    e-query    4_19    since_v1.5.1
    /Madrid/+/ParqueNorte    ${2}
019_01_06 QueryWithHashMatching
019_01_06_03 QueryWithHashMatching
    [Tags]    e-query    4_19    since_v1.5.1
    /CompanyA/#    ${1}
019_01_06 QueryNonEmptyScope
019_01_06_04 QueryNonEmptyScope
    [Tags]    e-query    4_19    since_v1.5.1
    /#    ${2}
019_01_06 QueryWithAndScope
019_01_06_05 QueryWithAndScope
    [Tags]    e-query    4_19    since_v1.5.1
    /Madrid/Gardens/ParqueNorte;/CompanyA/OrganizationB/UnitC    ${1}
019_01_06 QueryWithOrScope
    (/Madrid/Gardens/ParqueNorte;/CompanyA/OrganizationB/UnitC)    ${1}
019_01_06_06 QueryWithOrScope
    [Tags]    e-query    4_19    since_v1.5.1
    /Madrid/Gardens/ParqueNorte,/CompanyA/OrganizationB/UnitC    ${2}
019_01_06_07 QueryWithHashMatchingIncludingScope
    [Tags]    e-query    4_19    since_v1.5.1
    /Madrid/Gardens/ParqueNorte/#    ${2}
019_01_06_08 QueryWithPlusAndHashMatching
    [Tags]    e-query    4_19    since_v1.5.1
    /Madrid/+/#    ${2}


*** Keywords ***
+43 −0
Changes for TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_03_07.robot: 43 added lines, 0 removed lines.
Original line number Diff line number Diff line
*** Settings ***
Documentation       Check that one cannot query entities if the scopeQ parameter is syntactically invalid

Resource            ${EXECDIR}/resources/ApiUtils/Common.resource
Resource            ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource
Resource            ${EXECDIR}/resources/AssertionUtils.resource

Test Template       Query entities with invalid scopeQ


*** Variables ***
${entity_type}=     https://ngsi-ld-test-suite/context#Building


*** Test Cases ***    SCOPEQ
019_03_07_01 QueryWithUnclosedParenthesis
    [Tags]    e-query    4_19    5_7_2
    (/Madrid
019_03_07_02 QueryEndingWithLogicalOperator
    [Tags]    e-query    4_19    5_7_2
    /Madrid;
019_03_07_03 QueryWithConsecutiveLogicalOperators
    [Tags]    e-query    4_19    5_7_2
    /Madrid,,/CompanyA
019_03_07_04 QueryWithHashNotAtTheEnd
    [Tags]    e-query    4_19    5_7_2
    /Madrid/#/Gardens


*** Keywords ***
Query entities with invalid scopeQ
    [Documentation]    Check that a BadRequestData error is returned when scopeQ is syntactically invalid
    [Arguments]    ${scopeq}

    ${response}=    Query Entities
    ...    scopeq=${scopeq}
    ...    entity_types=${entity_type}

    Check Response Status Code    400    ${response.status_code}
    Check Response Body Containing ProblemDetails Element Containing Type Element set to
    ...    ${response.json()}
    ...    ${ERROR_TYPE_BAD_REQUEST_DATA}
    Check Response Body Containing ProblemDetails Element Containing Title Element    ${response.json()}