Loading
fix(httpctrl): match stub query parameters after decoding them
Since !311, D017_01_inc stubs a DELETE with a query: DELETE /ngsi-ld/v1/entities?type=Vehicle&id=${entity_id} For requests other than GET, the mock compares the stub with the request path only. This is never true for a stub with a query. Then the mock compares the full URLs as plain text. A broker that sends the id percent-encoded (id=urn%3Angsi-ld%3AVehicle%3A...) never matches, although it is the same query. The suite's own client also sends the encoded form. The mock does not answer, and the test fails. Compare the path and the decoded parameters instead. The order of the parameters no longer matters. A stub without a query works as before.