Skip to content

[bug] az iot product test does not validate command responses with Map #486

@rido-min

Description

@rido-min

I'm validating a PnP device using a command with the next response

  "response": {
        "@type": "CommandPayload",
        "name": "diagnosticResults",
        "schema": {
          "@type": "Map",
          "mapKey": {
            "name": "key",
            "schema": "string"
          },
          "mapValue": {
            "name": "val",
            "schema": "string"
          }
        }
      }

The device returns a proper JSON object,

When running the az iot product test I got

              "message": "{\"commandName\":\"getRuntimeStats\",\"expectedSchemaType\":\"Map\",\"actualSchemaType\":\"Unknown\",\"message\":\"Inconsistent value type. Expected type: [String], actual type: [JObject], Error code:1004, Error code:1024\",\"passed\":false,\"time\":\"2022-01-27T19:18:30.5515017+00:00\"}",
              "time": "2022-01-27T19:18:30.5515017+00:00"
            },
            {
              "message": "PnP interface commands validation failed",
              "time": "2022-01-27T19:18:30.5519899+00:00"
            }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions