openbmc / openbmc-test-automation

Apache License 2.0
100 stars 92 forks source link

Test Certificate #2245

Open justin0309 opened 2 months ago

justin0309 commented 2 months ago

@gkeishin image image

curl -k -X PATCH -H "Content-Type: application/json" -H "X-Auth-Token: $token" -d '{"DateTime": "2024-06-05 14:07:08.695"}' https://xxx.xxx.xxx.xxx/redfish/v1/Managers/bmc

  "DateTime@Message.ExtendedInfo": [
    {
      "@odata.type": "#Message.v1_1_1.Message",
      "Message": "The value '\"2024-06-05 14:07:08.695\"' for the property DateTime is of a different format than the property can accept.",
      "MessageArgs": [
        "\"2024-06-05 14:07:08.695\"",
        "DateTime"
      ],
      "MessageId": "Base.1.16.0.PropertyValueFormatError",
      "MessageSeverity": "Warning",
      "Resolution": "Correct the value for the property in the request body and resubmit the request if the operation failed."
    }
  ]

Should it be modified to curl -k -X PATCH -H "Content-Type: application/json" -H "X-Auth-Token: $token" -d '{"DateTime": "2024-06-05T14:01:59.809Z"}' https://xxx.xxx.xxx.xxx/redfish/v1/Managers/bmc

  "DateTime": "2024-06-05T14:01:59.809Z"
justin0309 commented 2 months ago

It seems that this command can be successfully tested manually, but auto-test still returns 400 curl -k -X PATCH -H "Content-Type: application/json" -H "X-Auth-Token: $token" -d '{"DateTime": "2024-06-05 14:07:08.695"}' https://xxx.xxx.xxx.xxx/redfish/v1/Managers/bmc

But it seems to comply with the ISO 8601 format string image