Commit 145d5528 authored by Benoit Orihuela's avatar Benoit Orihuela Committed by lopezaguilar
Browse files

fix: ensure tags are set on Test Cases and not on Keywords #27

parent 19a14aae
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -47,7 +47,7 @@ ${subscription_filename}= csourceSubscriptions/subscription-sample.jsonld


044_04_04_endpoint get /csourceSubscriptions/
044_04_04_endpoint get /csourceSubscriptions/
    [Documentation]    Verify throwing 406 HTTP status code (Not Acceptable Media Type) if the "Accept" header does not imply "application/json" nor "application/ld+json" (get /csourceSubscriptions/)
    [Documentation]    Verify throwing 406 HTTP status code (Not Acceptable Media Type) if the "Accept" header does not imply "application/json" nor "application/ld+json" (get /csourceSubscriptions/)
    [Tags]    csrsub-query
    [Tags]    csrsub-query    6_3_4
    Query Context Source Registration Subscriptions    accept=${accept}
    Query Context Source Registration Subscriptions    accept=${accept}
    Check Response Status Code    ${status_code}    ${response.status_code}
    Check Response Status Code    ${status_code}    ${response.status_code}


+2 −1
Original line number Original line Diff line number Diff line
@@ -14,7 +14,8 @@ ${building_id_prefix}= urn:ngsi-ld:Building:




*** Test Cases ***    FILENAME
*** Test Cases ***    FILENAME
MinimalEntity    [Tags]    be-create    5_6_7
MinimalEntity
    [Tags]    be-create    5_6_7
    building-minimal-sample.jsonld
    building-minimal-sample.jsonld
EntityWithSimpleProperties
EntityWithSimpleProperties
    [Tags]    be-create    5_6_7
    [Tags]    be-create    5_6_7
+4 −1
Original line number Original line Diff line number Diff line
@@ -15,19 +15,22 @@ ${building_id_prefix}= urn:ngsi-ld:Building:


*** Test Cases ***    FILENAME    CONTENT_TYPE
*** Test Cases ***    FILENAME    CONTENT_TYPE
001_01_01_MinimalEntity
001_01_01_MinimalEntity
    [Tags]    e-create    5_6_1
    building-minimal-without-context-sample.jsonld    application/json
    building-minimal-without-context-sample.jsonld    application/json
001_01_02_EntityWithSimpleProperties
001_01_02_EntityWithSimpleProperties
    [Tags]    e-create    5_6_1
    building-simple-attributes-sample.jsonld    application/ld+json
    building-simple-attributes-sample.jsonld    application/ld+json
001_01_03_EntityWithRelationshipsProperties
001_01_03_EntityWithRelationshipsProperties
    [Tags]    e-create    5_6_1
    building-relationship-of-property-sample.jsonld    application/ld+json
    building-relationship-of-property-sample.jsonld    application/ld+json
001_01_04_EntityWithLocationAttribute
001_01_04_EntityWithLocationAttribute
    [Tags]    e-create    5_6_1
    building-location-attribute-sample.jsonld    application/ld+json
    building-location-attribute-sample.jsonld    application/ld+json




*** Keywords ***
*** Keywords ***
Create Entity Scenarios
Create Entity Scenarios
    [Documentation]    Check that you can create an entity
    [Documentation]    Check that you can create an entity
    [Tags]    e-create    5_6_1
    [Arguments]    ${filename}    ${content_type}
    [Arguments]    ${filename}    ${content_type}
    ${entity_id}=    Generate Random Entity Id    ${building_id_prefix}
    ${entity_id}=    Generate Random Entity Id    ${building_id_prefix}
    Set Test Variable    ${entity_id}
    Set Test Variable    ${entity_id}
+3 −1
Original line number Original line Diff line number Diff line
@@ -9,17 +9,19 @@ Test Template Create Entity With Invalid Request Scenarios


*** Test Cases ***    FILENAME    ERROR_TYPE
*** Test Cases ***    FILENAME    ERROR_TYPE
001_02_01_InvalidJson
001_02_01_InvalidJson
    [Tags]    e-create    5_6_1
    invalid-json-sample.jsonld    ${ERROR_TYPE_INVALID_REQUEST}
    invalid-json-sample.jsonld    ${ERROR_TYPE_INVALID_REQUEST}
001_02_02_EmptyJson
001_02_02_EmptyJson
    [Tags]    e-create    5_6_1
    empty-sample.jsonld    ${ERROR_TYPE_INVALID_REQUEST}
    empty-sample.jsonld    ${ERROR_TYPE_INVALID_REQUEST}
001_02_03_EntityWithNoContext
001_02_03_EntityWithNoContext
    [Tags]    e-create    5_6_1
    building-minimal-without-context-sample.jsonld    ${ERROR_TYPE_BAD_REQUEST_DATA}
    building-minimal-without-context-sample.jsonld    ${ERROR_TYPE_BAD_REQUEST_DATA}




*** Keywords ***
*** Keywords ***
Create Entity With Invalid Request Scenarios
Create Entity With Invalid Request Scenarios
    [Documentation]    Check that you cannot create an entity with an invalid request
    [Documentation]    Check that you cannot create an entity with an invalid request
    [Tags]    e-create    5_6_1
    [Arguments]    ${filename}    ${error_type}
    [Arguments]    ${filename}    ${error_type}
    ${response}=    Request Entity From File    ${filename}
    ${response}=    Request Entity From File    ${filename}
    Check Response Status Code    400    ${response.status_code}
    Check Response Status Code    400    ${response.status_code}
+2 −1
Original line number Original line Diff line number Diff line
@@ -10,15 +10,16 @@ Test Template Delete Entity Scenarios


*** Test Cases ***    ENTITY_ID    EXPECTED_STATUS_CODE    PROBLEM_TYPE
*** Test Cases ***    ENTITY_ID    EXPECTED_STATUS_CODE    PROBLEM_TYPE
002_02_01_Delete an entity if the Entity Id is not present
002_02_01_Delete an entity if the Entity Id is not present
    [Tags]    e-delete    5_6_6
    ${EMPTY}    400    ${ERROR_TYPE_BAD_REQUEST_DATA}
    ${EMPTY}    400    ${ERROR_TYPE_BAD_REQUEST_DATA}
002_02_02_Delete an entity if the Entity Id is not a valid URI
002_02_02_Delete an entity if the Entity Id is not a valid URI
    [Tags]    e-delete    5_6_6
    thisisaninvaliduri    400    ${ERROR_TYPE_BAD_REQUEST_DATA}
    thisisaninvaliduri    400    ${ERROR_TYPE_BAD_REQUEST_DATA}




*** Keywords ***
*** Keywords ***
Delete Entity Scenarios
Delete Entity Scenarios
    [Documentation]    Check that you cannot delete an entity with invalid/missing id
    [Documentation]    Check that you cannot delete an entity with invalid/missing id
    [Tags]    e-delete    5_6_6
    [Arguments]    ${entity_id}    ${expected_status_code}    ${problem_type}
    [Arguments]    ${entity_id}    ${expected_status_code}    ${problem_type}
    ${response}=    Delete Entity by Id Returning Response    ${entity_id}
    ${response}=    Delete Entity by Id Returning Response    ${entity_id}
    Check Response Status Code    ${expected_status_code}    ${response.status_code}
    Check Response Status Code    ${expected_status_code}    ${response.status_code}
Loading