Commit 3b6753cc authored by lopesg's avatar lopesg
Browse files

Merge branch 'develop' into feature/implement-missing-validations

parents a5e2d001 1f9fa4a4
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -21,7 +21,7 @@ ${attribute_subcategory}= https://ngsi-ld-test-suite/context#subCategory
    Check Response Status Code  201    ${response['status']}

    ${attributes_to_be_retrieved}=  Catenate    SEPARATOR=,     ${attribute_airqualitylevel}    ${attribute_subcategory}
    ${response}=    Query Entity    ${entity_id}    ${CONTENT_TYPE_LD_JSON}    attrs=${attributes_to_be_retrieved}
    ${request}    ${response}=    Query Entity    ${entity_id}    ${CONTENT_TYPE_LD_JSON}    attrs=${attributes_to_be_retrieved}
    Check Response Status Code  200    ${response['status']}
    Check Response Body Containing Entity element    ${expectation_filename}    ${entity_id}    ${response['body']}

+1 −1
Original line number Diff line number Diff line
@@ -19,7 +19,7 @@ Get an entity if an attribute is not known to the system
    Check Response Status Code  201    ${response['status']}

    ${attributes_to_be_retrieved}=  Catenate    SEPARATOR=,     ${attribute_not_known}
    ${response}=    Query Entity    ${entity_id}    ${CONTENT_TYPE_LD_JSON}    attrs=${attributes_to_be_retrieved}
    ${request}    ${response}=    Query Entity    ${entity_id}    ${CONTENT_TYPE_LD_JSON}    attrs=${attributes_to_be_retrieved}
    Check Response Status Code  404    ${response['status']}
    Check Response Body Containing ProblemDetails Element Containing Type Element set to      ${response}     ${ERROR_TYPE_RESOURCE_NOT_FOUND}
    Check Response Body Containing ProblemDetails Element Containing Title Element    ${response}
+2 −2
Original line number Diff line number Diff line
@@ -15,7 +15,7 @@ ${attribute_id}= speed

*** Test Cases ***                                                                   ENTITY_ID                      FRAGMENT_FILENAME      
012_03_01_Partial update when the Entity Id is not known to the system               ${not_found_entity_id}         vehicle-attribute-to-add-fragment.jsonld
012_03_02_Partial update when no default instance and no datasetId specified         ${valid_entity_id}             vehicle-speed-invalid-datasetid-fragment.jsonld.jsonld
012_03_02_Partial update when no default instance and no datasetId specified         ${valid_entity_id}             vehicle-speed-invalid-datasetid-fragment.jsonld
012_03_03_Partial update when no instance with the datasetId specified               ${valid_entity_id}             vehicle-isparked-fragment.jsonld
012_03_04_Partial update when no instance with the attrId specified                  ${valid_entity_id}             vehicle-speed-wrong-name-fragment.jsonld

+22 −0
Original line number Diff line number Diff line
*** Settings ***
Documentation   Check that you cannot delete a subscription: If the subscription Id is not present or it is not a valid URI, then an error of type BadRequestData shall be raised
Resource    ${EXECDIR}/resources/ApiUtils.resource
Resource    ${EXECDIR}/resources/AssertionUtils.resource

Test Template  Delete Subscription With Non present Or Invalid Id

*** Test Cases ***          id
NotPresentId                ${EMPTY}
InvalidId                   InvalidUri

*** Keywords ***
Delete Subscription With Non present Or Invalid Id
    [Arguments]  ${id}
    [Documentation]  Check that you cannot delete a subscription: If the subscription Id is not present or it is not a valid URI, then an error of type BadRequestData shall be raised
    [Tags]  mandatory

    Delete Subscription   ${id}

    Check Response Status Code Set To  400
    Check Response Body Containing ProblemDetails Element Containing Type Element set to      ${response}     ${ERROR_TYPE_BAD_REQUEST_DATA}
    Check Response Body Containing ProblemDetails Element Containing Title Element    ${response}
+15 −0
Original line number Diff line number Diff line
*** Settings ***
Documentation   Check that you cannot delete a subscription: If the subscription id provided does not correspond to any existing subscription in the system then an error of type ResourceNotFound shall be raised
Resource    ${EXECDIR}/resources/ApiUtils.resource
Resource    ${EXECDIR}/resources/AssertionUtils.resource

*** Test Case ***
Delete Unknown Subscription
    [Documentation]  Check that you cannot delete a subscription: If the subscription id provided does not correspond to any existing subscription in the system then an error of type ResourceNotFound shall be raised
    [Tags]  mandatory

    Delete Subscription   unknownSubscription

    Check Response Status Code Set To  404
    Check Response Body Containing ProblemDetails Element Containing Type Element set to      ${response}     ${ERROR_TYPE_RESOURCE_NOT_FOUND}
    Check Response Body Containing ProblemDetails Element Containing Title Element    ${response}
Loading