feat(head): add the Request With HEAD keyword and TCs for HEAD success and errors (061_01, 061_02)

New Test Cases for HEAD (TS 104-176 clause 5): on a resource that has GET and HEAD, a HEAD request is answered as the GET would be, without the body, and with 204 No Content on success. Until now the suite did not test HEAD at all.

  • 061_01: 204, without Content-Length, on 16 resources: /entities/, /entities/{entityId}, /subscriptions/, /subscriptions/{subscriptionId}, /types/, /types/{type}, /attributes/, /attributes/{attrId}, /temporal/entities/, /temporal/entities/{entityId}, /csourceRegistrations/, /csourceRegistrations/{registrationId}, /csourceSubscriptions/, /csourceSubscriptions/{subscriptionId}, /jsonldContexts/, /jsonldContexts/{contextId}

  • 061_02: the same 400 or 404 as the GET (was !338 (merged), merged into this branch)

32 Test Cases in TP/NGSI-LD/CommonBehaviours/CommonResponses/VerifyHEAD/. HEAD is new in TS 104 (GS CIM 009 has none), so every TC is tagged since_ts104_v1.1.1.

Also in the MR:

  • the keyword Request With HEAD (resources/ApiUtils/Common.resource): the path after ${NGSI_LD_API_PATH}/, an optional @context for the Link header, every other named argument a URL parameter
  • Check Response Headers Not Containing Content-Length (resources/AssertionUtils.resource): a 204 carries no Content-Length (IETF RFC 9110 clause 8.6)
  • HEAD in the documentation generator: the verb in doc/analysis/parseapiutilsfile.py, the keyword in requests.py, the directory in generaterobotdata.py

HEAD on the Attribute, the Attribute value and /info/sourceIdentity comes in a later MR, after the TCs of their GET.

What is verified on success is the 204 and the missing Content-Length. The HTTP client does not read a body after a HEAD response, so Check Response Body Is Empty cannot fail on a HEAD; it stays as the statement of the requirement.

Doc unit tests 13/13, statisticsDocumentationData.py 0 of 589 failed, robocop format --check clean, no new unused test data. Against coraine: 32/32.

MRs 2 and 3 of the plan: https://famzang.com/ttf/ngsi-ld-suite-plan.html

Edited by Ken Zangelin

Merge request reports

Loading
+272 −0
Changes for TP/NGSI-LD/CommonBehaviours/CommonResponses/VerifyHEAD/061_01.robot: 272 added lines, 0 removed lines.
Original line number Diff line number Diff line
*** Settings ***
Documentation       Verify that a HEAD request on a resource that has GET/HEAD functions in the same manner as a GET request, omits the body in the response and that the response code 204 No Content is used on success

Resource            ${EXECDIR}/resources/ApiUtils/Common.resource
Resource            ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource
Resource            ${EXECDIR}/resources/ApiUtils/ContextInformationSubscription.resource
Resource            ${EXECDIR}/resources/ApiUtils/ContextSourceRegistration.resource
Resource            ${EXECDIR}/resources/ApiUtils/ContextSourceRegistrationSubscription.resource
Resource            ${EXECDIR}/resources/ApiUtils/TemporalContextInformationProvision.resource
Resource            ${EXECDIR}/resources/ApiUtils/jsonldContext.resource
Resource            ${EXECDIR}/resources/AssertionUtils.resource
Resource            ${EXECDIR}/resources/HttpUtils.resource
Resource            ${EXECDIR}/resources/JsonUtils.resource


*** Variables ***
${building_filename}=               building-simple-attributes.jsonld
${subscription_filename}=           subscriptions/subscription.jsonld
${registration_filename}=           csourceRegistrations/context-source-registration-with-expiration.jsonld
${csr_subscription_filename}=       csourceSubscriptions/subscription.jsonld
${tea_filename}=                    vehicle-temporal-representation.jsonld
${context_filename}=                @context-minimal-valid.json


*** Test Cases ***
061_01_01 Endpoint /entities/
    [Documentation]    Verify that a HEAD request on /entities/ is answered with 204 No Content, without Content-Length
    [Tags]    since_ts104_v1.1.1    e-query    cb-head    http_5    http_7_2_3_1
    [Setup]    Create The Resource Under Test    entity
    ${response}=    Request With HEAD
    ...    path=entities/
    ...    type=Building
    ...    context=${ngsild_test_suite_context}
    Check Response Status Code    204    ${response.status_code}
    Check Response Body Is Empty    ${response}
    Check Response Headers Not Containing Content-Length    ${response.headers}
    [Teardown]    Delete The Resource Under Test

061_01_02 Endpoint /entities/{entityId}
    [Documentation]    Verify that a HEAD request on /entities/{entityId} is answered with 204 No Content, without Content-Length
    [Tags]    since_ts104_v1.1.1    e-retrieve    cb-head    http_5    http_7_3_3_1
    [Setup]    Create The Resource Under Test    entity
    ${response}=    Request With HEAD
    ...    path=entities/${id}
    Check Response Status Code    204    ${response.status_code}
    Check Response Body Is Empty    ${response}
    Check Response Headers Not Containing Content-Length    ${response.headers}
    [Teardown]    Delete The Resource Under Test

061_01_03 Endpoint /subscriptions/
    [Documentation]    Verify that a HEAD request on /subscriptions/ is answered with 204 No Content, without Content-Length
    [Tags]    since_ts104_v1.1.1    sub-query    cb-head    http_5    http_7_13_3_1
    [Setup]    Create The Resource Under Test    subscription
    ${response}=    Request With HEAD
    ...    path=subscriptions/
    Check Response Status Code    204    ${response.status_code}
    Check Response Body Is Empty    ${response}
    Check Response Headers Not Containing Content-Length    ${response.headers}
    [Teardown]    Delete The Resource Under Test

061_01_04 Endpoint /subscriptions/{subscriptionId}
    [Documentation]    Verify that a HEAD request on /subscriptions/{subscriptionId} is answered with 204 No Content, without Content-Length
    [Tags]    since_ts104_v1.1.1    sub-retrieve    cb-head    http_5    http_7_14_3_1
    [Setup]    Create The Resource Under Test    subscription
    ${response}=    Request With HEAD
    ...    path=subscriptions/${id}
    Check Response Status Code    204    ${response.status_code}
    Check Response Body Is Empty    ${response}
    Check Response Headers Not Containing Content-Length    ${response.headers}
    [Teardown]    Delete The Resource Under Test

061_01_05 Endpoint /types/
    [Documentation]    Verify that a HEAD request on /types/ is answered with 204 No Content, without Content-Length
    [Tags]    since_ts104_v1.1.1    ed-types    cb-head    http_5    http_7_15_3_1
    [Setup]    Create The Resource Under Test    entity
    ${response}=    Request With HEAD
    ...    path=types/
    Check Response Status Code    204    ${response.status_code}
    Check Response Body Is Empty    ${response}
    Check Response Headers Not Containing Content-Length    ${response.headers}
    [Teardown]    Delete The Resource Under Test

061_01_06 Endpoint /types/{type}
    [Documentation]    Verify that a HEAD request on /types/{type} is answered with 204 No Content, without Content-Length
    [Tags]    since_ts104_v1.1.1    ed-type    cb-head    http_5    http_7_16_3_1
    [Setup]    Create The Resource Under Test    entity
    ${response}=    Request With HEAD
    ...    path=types/Building
    ...    context=${ngsild_test_suite_context}
    Check Response Status Code    204    ${response.status_code}
    Check Response Body Is Empty    ${response}
    Check Response Headers Not Containing Content-Length    ${response.headers}
    [Teardown]    Delete The Resource Under Test

061_01_07 Endpoint /attributes/
    [Documentation]    Verify that a HEAD request on /attributes/ is answered with 204 No Content, without Content-Length
    [Tags]    since_ts104_v1.1.1    ed-attrs    cb-head    http_5    http_7_17_3_1
    [Setup]    Create The Resource Under Test    entity
    ${response}=    Request With HEAD
    ...    path=attributes/
    Check Response Status Code    204    ${response.status_code}
    Check Response Body Is Empty    ${response}
    Check Response Headers Not Containing Content-Length    ${response.headers}
    [Teardown]    Delete The Resource Under Test

061_01_08 Endpoint /attributes/{attrId}
    [Documentation]    Verify that a HEAD request on /attributes/{attrId} is answered with 204 No Content, without Content-Length
    [Tags]    since_ts104_v1.1.1    ed-attr    cb-head    http_5    http_7_18_3_1
    [Setup]    Create The Resource Under Test    entity
    ${response}=    Request With HEAD
    ...    path=attributes/name
    ...    context=${ngsild_test_suite_context}
    Check Response Status Code    204    ${response.status_code}
    Check Response Body Is Empty    ${response}
    Check Response Headers Not Containing Content-Length    ${response.headers}
    [Teardown]    Delete The Resource Under Test

061_01_09 Endpoint /temporal/entities/
    [Documentation]    Verify that a HEAD request on /temporal/entities/ is answered with 204 No Content, without Content-Length
    [Tags]    since_ts104_v1.1.1    te-query    cb-head    http_5    http_8_2_3_1
    [Setup]    Create The Resource Under Test    temporal
    ${response}=    Request With HEAD
    ...    path=temporal/entities/
    ...    type=Vehicle
    ...    timerel=after
    ...    timeAt=2020-08-01T12:05:00Z
    ...    context=${ngsild_test_suite_context}
    Check Response Status Code    204    ${response.status_code}
    Check Response Body Is Empty    ${response}
    Check Response Headers Not Containing Content-Length    ${response.headers}
    [Teardown]    Delete The Resource Under Test

061_01_10 Endpoint /temporal/entities/{entityId}
    [Documentation]    Verify that a HEAD request on /temporal/entities/{entityId} is answered with 204 No Content, without Content-Length
    [Tags]    since_ts104_v1.1.1    te-retrieve    cb-head    http_5    http_8_3_3_1
    [Setup]    Create The Resource Under Test    temporal
    ${response}=    Request With HEAD
    ...    path=temporal/entities/${id}
    Check Response Status Code    204    ${response.status_code}
    Check Response Body Is Empty    ${response}
    Check Response Headers Not Containing Content-Length    ${response.headers}
    [Teardown]    Delete The Resource Under Test

061_01_11 Endpoint /csourceRegistrations/
    [Documentation]    Verify that a HEAD request on /csourceRegistrations/ is answered with 204 No Content, without Content-Length
    [Tags]    since_ts104_v1.1.1    csr-query    cb-head    http_5    http_9_2_3_1
    [Setup]    Create The Resource Under Test    registration
    ${response}=    Request With HEAD
    ...    path=csourceRegistrations/
    ...    type=Vehicle
    ...    context=${ngsild_test_suite_context}
    Check Response Status Code    204    ${response.status_code}
    Check Response Body Is Empty    ${response}
    Check Response Headers Not Containing Content-Length    ${response.headers}
    [Teardown]    Delete The Resource Under Test

061_01_12 Endpoint /csourceRegistrations/{registrationId}
    [Documentation]    Verify that a HEAD request on /csourceRegistrations/{registrationId} is answered with 204 No Content, without Content-Length
    [Tags]    since_ts104_v1.1.1    csr-retrieve    cb-head    http_5    http_9_3_3_1
    [Setup]    Create The Resource Under Test    registration
    ${response}=    Request With HEAD
    ...    path=csourceRegistrations/${id}
    Check Response Status Code    204    ${response.status_code}
    Check Response Body Is Empty    ${response}
    Check Response Headers Not Containing Content-Length    ${response.headers}
    [Teardown]    Delete The Resource Under Test

061_01_13 Endpoint /csourceSubscriptions/
    [Documentation]    Verify that a HEAD request on /csourceSubscriptions/ is answered with 204 No Content, without Content-Length
    [Tags]    since_ts104_v1.1.1    csrsub-query    cb-head    http_5    http_9_4_3_1
    [Setup]    Create The Resource Under Test    registration subscription
    ${response}=    Request With HEAD
    ...    path=csourceSubscriptions/
    Check Response Status Code    204    ${response.status_code}
    Check Response Body Is Empty    ${response}
    Check Response Headers Not Containing Content-Length    ${response.headers}
    [Teardown]    Delete The Resource Under Test

061_01_14 Endpoint /csourceSubscriptions/{subscriptionId}
    [Documentation]    Verify that a HEAD request on /csourceSubscriptions/{subscriptionId} is answered with 204 No Content, without Content-Length
    [Tags]    since_ts104_v1.1.1    csrsub-retrieve    cb-head    http_5    http_9_5_3_1
    [Setup]    Create The Resource Under Test    registration subscription
    ${response}=    Request With HEAD
    ...    path=csourceSubscriptions/${id}
    Check Response Status Code    204    ${response.status_code}
    Check Response Body Is Empty    ${response}
    Check Response Headers Not Containing Content-Length    ${response.headers}
    [Teardown]    Delete The Resource Under Test

061_01_15 Endpoint /jsonldContexts/
    [Documentation]    Verify that a HEAD request on /jsonldContexts/ is answered with 204 No Content, without Content-Length
    [Tags]    since_ts104_v1.1.1    ctx-list    cb-head    http_5    http_10_2_3_1
    [Setup]    Create The Resource Under Test    context
    ${response}=    Request With HEAD
    ...    path=jsonldContexts/
    Check Response Status Code    204    ${response.status_code}
    Check Response Body Is Empty    ${response}
    Check Response Headers Not Containing Content-Length    ${response.headers}
    [Teardown]    Delete The Resource Under Test

061_01_16 Endpoint /jsonldContexts/{contextId}
    [Documentation]    Verify that a HEAD request on /jsonldContexts/{contextId} is answered with 204 No Content, without Content-Length
    [Tags]    since_ts104_v1.1.1    ctx-serve    cb-head    http_5    http_10_3_3_1
    [Setup]    Create The Resource Under Test    context
    ${context_id}=    Replace String    ${id}    ${NGSI_LD_API_PATH}/${JSONLDCONTEXTS_ENDPOINT_PATH}/    ${EMPTY}
    ${context_id}=    Evaluate    urllib.parse.quote($context_id, safe='')    modules=urllib
    ${response}=    Request With HEAD
    ...    path=jsonldContexts/${context_id}
    Check Response Status Code    204    ${response.status_code}
    Check Response Body Is Empty    ${response}
    Check Response Headers Not Containing Content-Length    ${response.headers}
    [Teardown]    Delete The Resource Under Test


*** Keywords ***
Create The Resource Under Test
    [Documentation]    Create the resource the HEAD request is made on. ${id} is set only once the creation is
    ...    answered with 201, so that the teardown deletes only what was created
    [Arguments]    ${kind}
    VAR    ${id}=    ${EMPTY}    scope=TEST
    VAR    ${resource_kind}=    ${kind}    scope=TEST
    IF    $kind == 'entity'
        ${new_id}=    Generate Random Building Entity Id
        ${response}=    Create Entity Selecting Content Type
        ...    ${building_filename}
        ...    ${new_id}
        ...    ${CONTENT_TYPE_LD_JSON}
    ELSE IF    $kind == 'subscription'
        ${new_id}=    Generate Random Subscription Id
        ${response}=    Create Subscription    ${new_id}    ${subscription_filename}    ${CONTENT_TYPE_LD_JSON}
    ELSE IF    $kind == 'temporal'
        ${new_id}=    Generate Random Vehicle Entity Id
        ${response}=    Create Or Update Temporal Representation Of Entity Selecting Content Type
        ...    temporal_entity_representation_id=${new_id}
        ...    filename=${tea_filename}
        ...    content_type=${CONTENT_TYPE_LD_JSON}
    ELSE IF    $kind == 'registration'
        ${new_id}=    Generate Random CSR Id
        ${payload}=    Load JSON From File    ${EXECDIR}/data/${registration_filename}
        ${payload}=    Update Value To JSON    ${payload}    $..id    ${new_id}
        ${response}=    Create Context Source Registration With Return    ${payload}
    ELSE IF    $kind == 'registration subscription'
        ${new_id}=    Generate Random Subscription Id
        ${payload}=    Load Test Sample    ${csr_subscription_filename}    ${new_id}
        ${response}=    Create Context Source Registration Subscription    ${payload}
    ELSE IF    $kind == 'context'
        ${response}=    Add a new @context    ${context_filename}
    ELSE
        Fail    Unknown kind of resource: ${kind}
    END
    Check Response Status Code    201    ${response.status_code}
    IF    $kind == 'context'
        ${new_id}=    Fetch Id From Response Location Header    ${response.headers}
    END
    VAR    ${id}=    ${new_id}    scope=TEST

Delete The Resource Under Test
    [Documentation]    Delete the resource created by Create The Resource Under Test, if it was created
    IF    $id == ''    RETURN
    IF    $resource_kind == 'entity'
        Delete Entity    ${id}
    ELSE IF    $resource_kind == 'subscription'
        Delete Subscription    ${id}
    ELSE IF    $resource_kind == 'temporal'
        Delete Temporal Representation Of Entity    ${id}
    ELSE IF    $resource_kind == 'registration'
        Delete Context Source Registration    ${id}
    ELSE IF    $resource_kind == 'registration subscription'
        Delete Context Source Registration Subscription    ${id}
    ELSE IF    $resource_kind == 'context'
        Delete a @context    ${id}
    END
+70 −0
Changes for TP/NGSI-LD/CommonBehaviours/CommonResponses/VerifyHEAD/061_02.robot: 70 added lines, 0 removed lines.
Original line number Diff line number Diff line
*** Settings ***
Documentation       Verify that a HEAD request that the corresponding GET request would answer with an error is answered with the same error status code and no body

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

Test Template       Request With HEAD Answered With An Error


*** Test Cases ***    PATH    CONTEXT    EXPECTED_STATUS_CODE
061_02_01 Endpoint /entities/ Without Any Query Parameter
    [Tags]    since_ts104_v1.1.1    e-query    cb-head    http_5    http_7_2_3_1
    entities/    ${EMPTY}    400
061_02_02 Endpoint /entities/{entityId} If The Entity Id Is Not A Valid URI
    [Tags]    since_ts104_v1.1.1    e-retrieve    cb-head    http_5    http_7_3_3_1
    entities/thisisaninvaliduri    ${EMPTY}    400
061_02_03 Endpoint /entities/{entityId} If The Entity Is Not Known
    [Tags]    since_ts104_v1.1.1    e-retrieve    cb-head    http_5    http_7_3_3_1
    entities/urn:ngsi-ld:Building:unknown061    ${EMPTY}    404
061_02_04 Endpoint /subscriptions/{subscriptionId} If The Subscription Id Is Not A Valid URI
    [Tags]    since_ts104_v1.1.1    sub-retrieve    cb-head    http_5    http_7_14_3_1
    subscriptions/thisisaninvaliduri    ${EMPTY}    400
061_02_05 Endpoint /subscriptions/{subscriptionId} If The Subscription Is Not Known
    [Tags]    since_ts104_v1.1.1    sub-retrieve    cb-head    http_5    http_7_14_3_1
    subscriptions/urn:ngsi-ld:Subscription:unknown061    ${EMPTY}    404
061_02_06 Endpoint /types/{type} If The Type Is Not Known
    [Tags]    since_ts104_v1.1.1    ed-type    cb-head    http_5    http_7_16_3_1
    types/UnknownType061    ${ngsild_test_suite_context}    404
061_02_07 Endpoint /attributes/{attrId} If The Attribute Is Not Known
    [Tags]    since_ts104_v1.1.1    ed-attr    cb-head    http_5    http_7_18_3_1
    attributes/unknownAttribute061    ${ngsild_test_suite_context}    404
061_02_08 Endpoint /temporal/entities/ Without Any Query Parameter
    [Tags]    since_ts104_v1.1.1    te-query    cb-head    http_5    http_8_2_3_1
    temporal/entities/    ${EMPTY}    400
061_02_09 Endpoint /temporal/entities/{entityId} If The Entity Id Is Not A Valid URI
    [Tags]    since_ts104_v1.1.1    te-retrieve    cb-head    http_5    http_8_3_3_1
    temporal/entities/thisisaninvaliduri    ${EMPTY}    400
061_02_10 Endpoint /temporal/entities/{entityId} If The Entity Is Not Known
    [Tags]    since_ts104_v1.1.1    te-retrieve    cb-head    http_5    http_8_3_3_1
    temporal/entities/urn:ngsi-ld:Vehicle:unknown061    ${EMPTY}    404
061_02_11 Endpoint /csourceRegistrations/ Without Entity Types And Attribute Names
    [Tags]    since_ts104_v1.1.1    csr-query    cb-head    http_5    http_9_2_3_1
    csourceRegistrations/    ${ngsild_test_suite_context}    400
061_02_12 Endpoint /csourceRegistrations/{registrationId} If The Registration Id Is Not A Valid URI
    [Tags]    since_ts104_v1.1.1    csr-retrieve    cb-head    http_5    http_9_3_3_1
    csourceRegistrations/thisisaninvaliduri    ${EMPTY}    400
061_02_13 Endpoint /csourceRegistrations/{registrationId} If The Registration Is Not Known
    [Tags]    since_ts104_v1.1.1    csr-retrieve    cb-head    http_5    http_9_3_3_1
    csourceRegistrations/urn:ngsi-ld:ContextSourceRegistration:unknown061    ${EMPTY}    404
061_02_14 Endpoint /csourceSubscriptions/{subscriptionId} If The Subscription Id Is Not A Valid URI
    [Tags]    since_ts104_v1.1.1    csrsub-retrieve    cb-head    http_5    http_9_5_3_1
    csourceSubscriptions/thisisaninvaliduri    ${EMPTY}    400
061_02_15 Endpoint /csourceSubscriptions/{subscriptionId} If The Subscription Is Not Known
    [Tags]    since_ts104_v1.1.1    csrsub-retrieve    cb-head    http_5    http_9_5_3_1
    csourceSubscriptions/urn:ngsi-ld:Subscription:unknown061    ${EMPTY}    404
061_02_16 Endpoint /jsonldContexts/{contextId} If The @context Is Not Known
    [Tags]    since_ts104_v1.1.1    ctx-serve    cb-head    http_5    http_10_3_3_1
    jsonldContexts/unknownContext061    ${EMPTY}    404


*** Keywords ***
Request With HEAD Answered With An Error
    [Documentation]    Verify that a HEAD request that the GET request would answer with an error gets the same status code and no body
    [Arguments]    ${path}    ${context}    ${expected_status_code}

    ${response}=    Request With HEAD
    ...    path=${path}
    ...    context=${context}
    Check Response Status Code    ${expected_status_code}    ${response.status_code}
    Check Response Body Is Empty    ${response}
+10 −0
Changes for doc/analysis/checks.py: 10 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -8,6 +8,8 @@ class Checks:
                Checks.check_response_status_code,
            'Check Response Body Is Empty':
                Checks.check_response_body_is_empty,
            'Check Response Headers Not Containing Content-Length':
                Checks.check_response_headers_not_containing_content_length,
            'Check Response Body Containing Array Of URIs set to':
                Checks.check_response_body_containing_array_of_uris_set_to,
            'Check Response Body Containing Entities URIS set to' :
@@ -165,6 +167,10 @@ class Checks:
                'params': ['response_body'],
                'position': [0]
            },
            'Check Response Headers Not Containing Content-Length': {
                'params': ['response_headers'],
                'position': [0]
            },
            'Check Response Body Containing Array Of URIs set to': {
                'params': ['expected_entities_ids', 'response_body'],
                'position': [0, 1]
@@ -543,6 +549,10 @@ class Checks:
    def check_response_body_is_empty(kwargs: list) -> str:
        return 'Response Body is empty'

    @staticmethod
    def check_response_headers_not_containing_content_length(kwargs: list) -> str:
        return 'Response Header: no Content-Length'

    @staticmethod
    def check_response_body_containing_array_of_uris_set_to(kwargs: list) -> str:
        return 'Response Body set to an array of created entities ids'
+1 −0
Changes for doc/analysis/generaterobotdata.py: 1 added line, 0 removed lines.
Original line number Diff line number Diff line
@@ -99,6 +99,7 @@ class GenerateRobotData:
            'CommonResponses/VerifyLdContextNotAvailable': 'HTTP',
            'CommonResponses/VerifyMergePatchJson': 'HTTP',
            'CommonResponses/VerifyGETWithoutAccept': 'HTTP',
            'CommonResponses/VerifyHEAD': 'HTTP',
            'CommonResponses/VerifyUnsupportedMediaType': 'HTTP',
            'CommonResponses/VerifyNotAcceptableMediaType': 'HTTP',
            'CommonResponses/VerifyInvalidParameters': 'HTTP'
+12 −0
Changes for doc/analysis/initial_setup.py: 12 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -50,6 +50,7 @@ class InitialSetup:
            'Create Entity And Registration On The Context Broker And Start Context Source Mock Server': InitialSetup.init_local_entity_and_csr_and_ms(),
            'Create Initial Cached @context from entity': InitialSetup.init_cached_context(),
            'Create Entities And Registration And Start Context Source Mock Server': InitialSetup.init_entities_and_csr_and_ms(),
            'Create The Resource Under Test': InitialSetup.init_resource_under_test(),
        }

        self.folder_test_suites = dirname(dirname(dirname(__file__)))
@@ -371,6 +372,17 @@ class InitialSetup:
}'''
        return data

    @staticmethod
    def init_resource_under_test() -> str:
        data = '''with {
    the SUT being in the "initial state" and
    the SUT containing the resource the request is made on
        (an Entity, a Subscription, a temporal Entity, a Context Source Registration,
        a Context Source Registration Subscription or a @context)
        with an id set to ${id}
}'''
        return data

    def get_property_values(self, root_folder: str, property_name: str) -> [str, str]:
        robot_files_without_setup = list()
        robot_files_with_setup = list()
Loading
Loading