fix(csub): the Delete keyword returns the expected 4xx; 041_03 asks for application/ld+json

Two small fixes in the context source registration subscription tests.

Change:

  • Delete Context Source Registration Subscription takes expected_status=any and returns the response, as Delete Subscription does. 042_02 (an invalid id, 400) and 042_03 (an unknown id, 404) can then check the 4xx they expect, instead of failing inside the keyword.
  • 041_03: the pagination check compares the whole Link header, so the @context goes in the body (application/ld+json) rather than as a second Link value - as in its siblings 031_02 and 037_11.

Effect (against coraine): 041_03_01, 041_03_02, 042_02_01, 042_03_01 fail on develop and pass with this MR. None breaks.

Checks run: robocop format --check (0 files), scripts/find_unused_test_data.py (nothing new), statisticsDocumentationData.py (0 of 625 failed), doc unit tests OK.

Fix MR 17 of the plan: https://famzang.com/ttf/ngsi-ld-suite-plan.html

Edited by Ken Zangelin

Merge request reports

Loading
+1 −0
Changes for TP/NGSI-LD/ContextSource/RegistrationSubscription/QueryContextSourceRegistrationSubscriptions/041_03.robot: 1 added line, 0 removed lines.
Original line number Diff line number Diff line
@@ -37,6 +37,7 @@ Query Context Source Registration Subscriptions With Limit And Offset Parameters
    ...    context=${ngsild_test_suite_context}
    ...    limit=${limit}
    ...    offset=${offset}
    ...    accept=${CONTENT_TYPE_LD_JSON}
    Check Response Status Code    200    ${response.status_code}
    Check Response Body Containing Number Of Entities
    ...    Subscription
+1 −0
Changes for resources/ApiUtils/ContextSourceRegistrationSubscription.resource: 1 added line, 0 removed lines.
Original line number Diff line number Diff line
@@ -44,6 +44,7 @@ Delete Context Source Registration Subscription

    ${response}=    DELETE
    ...    url=${url}${NGSI_LD_API_PATH}/${CONTEXT_SOURCE_REGISTRATION_SUBSCRIPTION_ENDPOINT_PATH}/${subscription_id}
    ...    expected_status=any
    Output    ${response}    Delete Context Source Registration Subscription
    RETURN    ${response}

Loading