Commit 8a2d8ace authored by kzangeli's avatar kzangeli
Browse files

fix: D004_01_exc PATCH-attrs fragment carries an id that mismatches the URL

D004_01_exc is a happy-path redirect test — it checks that an exclusive
attribute can be updated via the Context Broker and that the PATCH is
forwarded to the Context Source (asserts 204 + stub hit). It is not an
error-path test.

The fragment it PATCHes,
data/entities/fragmentEntities/vehicle-speed-different-attribute.jsonld,
hardcodes "id": "urn:ngsi-ld:Vehicle:randomUUID". The `Update Entity
Attributes` keyword reads the file verbatim (Get File) and PATCHes it to
.../entities/<generated-id>/attrs/ — it does not substitute the body id
the way `Create Entity` / `Load Entity` do. So the body id never matches
the URL id, and the broker correctly returns 400 BadRequestData
("Entity Id Mismatch"): per TS 104-175 § 5.2.6.4.3 / § 10.2.3 the URL id
is authoritative for a partial-update and an EntityFragment that DOES
supply an id must agree with it.

Drop the stray "id" from the fragment (PATCH-attrs needs none; the "type"
stays — § 10.2.9.4 unions it as a no-op). The fixture is used only by
D004_01_exc, so there is no blast radius. Test now passes.
parent 40e9d27f
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
{
    "id": "urn:ngsi-ld:Vehicle:randomUUID",
    "type": "Vehicle",
    "speed": {
        "type": "Property",