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, withoutContent-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 noContent-Length(IETF RFC 9110 clause 8.6)- HEAD in the documentation generator: the verb in
doc/analysis/parseapiutilsfile.py, the keyword inrequests.py, the directory ingeneraterobotdata.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