Commit 52837277 authored by Daniel Kastl's avatar Daniel Kastl Committed by kzangeli
Browse files

fix(036): expect a single entity type as a string

!309 changed the registration expectations to require each entity type as
an array, for example ["Vehicle"]. The tests still create the registration
with a plain "Vehicle", so a broker that returns the type as sent fails.
Clause 5.2.8 allows a single type as a plain string. An array is for
entities with several types.

Change the six entity types in the two expectation files back to strings.
The isParked change from !309 stays. Tests: 036_03_01, 036_04_01,
036_05_01, 036_05_02.
parent 4040f5e3
Loading
Loading
Loading
Loading
+3 −3
Changes for data/csourceRegistrations/expectations/context-source-registration-expanded-format.json: 3 added lines, 3 removed lines.
Original line number Diff line number Diff line
@@ -7,7 +7,7 @@
      "entities": [
        {
          "id": "urn:ngsi-ld:Vehicle:A456",
          "type": ["https://ngsi-ld-test-suite/context#Vehicle"]
          "type": "https://ngsi-ld-test-suite/context#Vehicle"
        }
      ],
      "propertyNames": [
@@ -21,11 +21,11 @@
    {
      "entities": [
        {
          "type": ["https://ngsi-ld-test-suite/context#OffStreetParking"],
          "type": "https://ngsi-ld-test-suite/context#OffStreetParking",
          "idPattern": ".*downtown$"
        },
        {
          "type": ["https://ngsi-ld-test-suite/context#OffStreetParking"],
          "type": "https://ngsi-ld-test-suite/context#OffStreetParking",
          "idPattern": ".*47$"
        }
      ],
+3 −3
Changes for data/csourceRegistrations/expectations/context-source-registration.json: 3 added lines, 3 removed lines.
Original line number Diff line number Diff line
@@ -6,7 +6,7 @@
       "entities": [
           {
           "id": "urn:ngsi-ld:Vehicle:A456",
           "type": ["Vehicle"]
           "type": "Vehicle"
           }
       ],
       "propertyNames": ["brandName","speed"],
@@ -16,11 +16,11 @@
       "entities": [
           {
               "idPattern": ".*downtown$",
               "type": ["OffStreetParking"]
               "type": "OffStreetParking"
           },
           {
               "idPattern": ".*47$",
               "type": ["OffStreetParking"]
               "type": "OffStreetParking"
           }
       ],
       "propertyNames": ["availableSpotNumber","totalSpotNumber"],