Commit 7b605fc4 authored by Benoit Orihuela's avatar Benoit Orihuela
Browse files

fix(037_05): query on EntityInfo / do not recursively update ids in expectations

parent 2b54511a
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -35,8 +35,8 @@ Query Context Source Registration Matching EntityInfo of RegistrationInfo
    Set Suite Variable    ${context_source_registration_id}
    ${response}=    Query Context Source Registrations
    ...    context=${ngsild_test_suite_context}
    ...    type=Vehicle
    ...    attrs=name
    ...    type=OffStreetParking
    ...    idPattern=.*downtown$
    @{expected_context_source_registration_ids}=    Create List    ${context_source_registration_id}
    Check Response Status Code    200    ${response.status_code}
    Check Response Body Containing List Containing Context Source Registrations elements
+68 −14
Original line number Diff line number Diff line
@@ -6,11 +6,65 @@
      {
        "entities": [
          {
            "id": "urn:ngsi-ld:Vehicle:A456",
            "type": "Vehicle"
          }
        ],
        "propertyNames": [
          "brandName",
          "speed"
        ],
        "relationshipNames": [
          "isParked"
        ]
      },
      {
        "entities": [
          {
            "idPattern": ".*downtown$",
            "type": "OffStreetParking"
          },
          {
            "idPattern": ".*47$",
            "type": "OffStreetParking"
          }
        ],
        "propertyNames": [
          "availableSpotNumber",
          "totalSpotNumber"
        ],
        "relationshipNames": [
          "isNextToBuilding"
        ]
      }
    ],
      "endpoint":"http://my.csource.org:1026"
    "endpoint": "http://my.csource.org:1026",
    "location": {
      "type": "Polygon",
      "coordinates": [
        [
          [
            100.0,
            0.0
          ],
          [
            101.0,
            0.0
          ],
          [
            101.0,
            1.0
          ],
          [
            100.0,
            1.0
          ],
          [
            100.0,
            0.0
          ]
        ]
      ]
    }
  }
]
 No newline at end of file
+4 −0
Original line number Diff line number Diff line
@@ -20,6 +20,7 @@ Query Context Source Registrations
    ...    ${context}=${EMPTY}
    ...    ${id}=${EMPTY}
    ...    ${type}=${EMPTY}
    ...    ${idPattern}=${EMPTY}
    ...    ${attrs}=${EMPTY}
    ...    ${q}=${EMPTY}
    ...    ${csf}=${EMPTY}
@@ -44,6 +45,9 @@ Query Context Source Registrations
    IF    '${accept}'!=''    Set To Dictionary    ${headers}    Accept=${accept}
    IF    '${id}'!=''    Set To Dictionary    ${params}    id=${id}
    IF    '${type}'!=''    Set To Dictionary    ${params}    type=${type}
    IF    '${idPattern}'!=''
        Set To Dictionary    ${params}    idPattern=${idPattern}
    END
    IF    '${attrs}'!=''    Set To Dictionary    ${params}    attrs=${attrs}
    IF    '${q}'!=''    Set To Dictionary    ${params}    q=${q}
    IF    '${csf}'!=''    Set To Dictionary    ${params}    csf=${csf}
+1 −1
Original line number Diff line number Diff line
@@ -303,7 +303,7 @@ Check Response Body Containing List Containing Context Source Registrations elem
    FOR    ${expected_context_source_registration_id}    IN    @{expected_context_source_registrations_ids}
        ${expected_context_source_registrations_payload}=    Update Value To JSON
        ...    ${expected_context_source_registrations_payload}
        ...    $.[${index}]..id
        ...    $.[${index}].id
        ...    ${expected_context_source_registration_id}
        ${index}=    Evaluate    ${index} + 1
    END