Unverified Commit 1533364e authored by Benoit Orihuela's avatar Benoit Orihuela
Browse files

fix: small fixes for TCs failing the documentation generation

parent a3945683
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -13,15 +13,15 @@ Test Template Query Entities With Invalid Pick Or Omit Query Params Usage


*** Test Cases ***    PICK    OMIT    ATTRS
018_18_01 RetrieveWithSameEntityMemberInPickAndOmit
019_18_01 RetrieveWithSameEntityMemberInPickAndOmit
    [Documentation]    Check that a BadRequestDataException is returned if an entity member is present in pick and omit
    [Tags]    e-query    5_7_2    4_21    since_v1.8.1
    name    name    ${EMPTY}
018_18_02 RetrieveWithPickAndAttrs
019_18_02 RetrieveWithPickAndAttrs
    [Documentation]    Check that a BadRequestDataException is returned if pick and attrs query params are present
    [Tags]    e-query    5_7_2    4_21    since_v1.8.1
    name    ${EMPTY}    category
018_18_03 RetrieveWithOmitAndAttrs
019_18_03 RetrieveWithOmitAndAttrs
    [Documentation]    Check that a BadRequestDataException is returned if omit and attrs query params are present
    [Tags]    e-query    5_7_2    4_21    since_v1.8.1
    ${EMPTY}    name    category
+3 −3
Original line number Diff line number Diff line
@@ -18,15 +18,15 @@ ${bus_payload_file}= 2020-08-bus-temporal-representation.jsonld


*** Test Cases ***    PICK    OMIT    ATTRS
020_22_01 RetrieveWithSameEntityMemberInPickAndOmit
021_22_01 RetrieveWithSameEntityMemberInPickAndOmit
    [Documentation]    Check that a BadRequestDataException is returned if an entity member is present in pick and omit
    [Tags]    te-query    5_7_4    4_2_1    since_v1.8.1
    speed    speed    ${EMPTY}
020_22_02 RetrieveWithPickAndAttrs
021_22_02 RetrieveWithPickAndAttrs
    [Documentation]    Check that a BadRequestDataException is returned if pick and attrs query params are present
    [Tags]    te-query    5_7_4    4_2_1    since_v1.8.1
    speed    ${EMPTY}    fuelLevel
020_22_03 RetrieveWithOmitAndAttrs
021_22_03 RetrieveWithOmitAndAttrs
    [Documentation]    Check that a BadRequestDataException is returned if omit and attrs query params are present
    [Tags]    te-query    5_7_4    4_2_1    since_v1.8.1
    ${EMPTY}    speed    fuelLevel
+1 −1
Original line number Diff line number Diff line
@@ -42,7 +42,7 @@ D009_01_exc Replace Entity Attribute
    Should Be Equal    ${stub_count}    1

    Set Stub Reply    GET    /broker1/ngsi-ld/v1/entities/${entity_id}    200    ${entity_id}
    ${response}=    Retrieve Entity by Id    ${entity_id}    context=${ngsild_test_suite_context}
    ${response}=    Retrieve Entity    ${entity_id}    context=${ngsild_test_suite_context}
    ${new_attribute}=    Get From Dictionary    ${response.json()}    speed
    Should Be Equal    ${attribute_payload}[speed][value]    ${new_attribute}[value]

+1 −1
Original line number Diff line number Diff line
@@ -39,7 +39,7 @@ D009_01_inc Replace Entity Attribute
    Check Response Status Code    204    ${response.status_code}

    Set Stub Reply    GET    /ngsi-ld/v1/entities/${entity_id}    200    ${entity_id}
    ${response}=    Retrieve Entity by Id    ${entity_id}    context=${ngsild_test_suite_context}
    ${response}=    Retrieve Entity    ${entity_id}    context=${ngsild_test_suite_context}
    ${new_attribute}=    Get From Dictionary    ${response.json()}    speed
    Should Be Equal    ${attribute_payload}[speed][value]    ${new_attribute}[value]

+6 −3
Original line number Diff line number Diff line
@@ -13,6 +13,7 @@ Resource ${EXECDIR}/resources/MockServerUtils.resource
Test Setup          Setup Registration And Start Context Source Mock Server
Test Teardown       Delete Created Entity And Registration And Stop Context Source Mock Server


*** Variables ***
${entity_id_prefix}                     urn:ngsi-ld:Vehicle:
${entity_payload_filename}              vehicle-simple-different-attributes.jsonld
@@ -20,6 +21,7 @@ ${entity_attribute_filename} fragmentEntities/vehicle-speed-two-datas
${registration_id_prefix}               urn:ngsi-ld:Registration:
${registration_payload_file_path}       csourceRegistrations/context-source-registration-vehicle-redirection-ops.jsonld


*** Test Cases ***
D009_01_red Replace Entity Attribute
    [Documentation]    Check that one can replace an existing entity attribute, the changes will be forwarded to the Context Sources thanks to the redirect registrations
@@ -46,15 +48,16 @@ D009_01_red Replace Entity Attribute
    Should Be Equal    ${stub_count}    1

    Set Stub Reply    GET    /broker1/ngsi-ld/v1/entities/${entity_id}    200    ${entity_id}
    ${response}=    Retrieve Entity by Id    ${entity_id}    context=${ngsild_test_suite_context}    
    ${response}=    Retrieve Entity    ${entity_id}    context=${ngsild_test_suite_context}
    ${new_attribute}=    Get From Dictionary    ${response.json()}    speed
    Should Be Equal    ${attribute_payload}[speed][value]    ${new_attribute}[value]

    Set Stub Reply    GET    /broker2/ngsi-ld/v1/entities/${entity_id}    200    ${entity_id}
    ${response}=    Retrieve Entity by Id    ${entity_id}    context=${ngsild_test_suite_context}    
    ${response}=    Retrieve Entity    ${entity_id}    context=${ngsild_test_suite_context}
    ${new_attribute}=    Get From Dictionary    ${response.json()}    speed
    Should Be Equal    ${attribute_payload}[speed][value]    ${new_attribute}[value]


*** Keywords ***
Setup Registration And Start Context Source Mock Server
    ${entity_id}=    Generate Random Vehicle Entity Id