Commit 9d503c54 authored by kzangeli's avatar kzangeli
Browse files

fix(051_02_01): use a URI for the unknown-context delete id

051_02 asserts 404 ResourceNotFound but generated a bare 16-digit numeric id,
which is not a URI. TS 104-175 § 13.5.4 mandates 400 BadRequestData for a
non-URI context id, so a conformant broker returns 400 before the 404 path is
ever reached. Prefix the random id with urn:ngsi-ld:Context: so it is a
valid-but-unknown URI and the intended 404 path is exercised.
parent c196a5dd
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -14,7 +14,8 @@ ${reason_404}= Not Found
    [Documentation]    Check that an error message is obtained in the response when one tries to delete a @context with unknonwn id
    [Tags]    ctx-serve    5_13_5    since_v1.5.1

    ${random_url}=    Generate Random String    16    [NUMBERS]
    ${random_id}=    Generate Random String    16    [NUMBERS]
    ${random_url}=    Set Variable    urn:ngsi-ld:Context:${random_id}
    ${response}=    Delete a @context    ${random_url}

    Check Response Status Code    404    ${response.status_code}