openbmc / openbmc-test-automation

Apache License 2.0
100 stars 92 forks source link

expected return code for redfish.account_service.test_user_account.Verify Error While Deleting Root User ? #2147

Open generatz opened 2 years ago

generatz commented 2 years ago

This test is failing on 3 different platforms: two BMCs from different OEMs and romulus running on qemu. The three are returning a 404 for the redfish DELETE to /redfish/v1/AccountService/Accounts/root but the test is expecting a 403.

Are the implementations correct or is the test correct?

gkeishin commented 2 years ago

@rahulmah can you check on this one

gkeishin commented 2 years ago

or @manashsarma @prkatti1 Have you seen this one in recent testing?

rahulmah commented 2 years ago

@manashsarma : That issue is specific to service login. We should have a separate one for root user to get this one fixed.

@gkeishin : We should be getting response status code like 405 (Method Not Allowed) for this operation. At present we are getting not found error. Let me ask @AshwiniC777 to take care of this.


{
  "error": {
    "@Message.ExtendedInfo": [
      {
        "@odata.type": "#Message.v1_1_1.Message",
        "Message": "The requested resource of type #ManagerAccount.v1_4_0.ManagerAccount named root was not found.",
        "MessageArgs": [
          "#ManagerAccount.v1_4_0.ManagerAccount",
          "root"
        ],
        "MessageId": "Base.1.8.1.ResourceNotFound",
        "MessageSeverity": "Critical",
        "Resolution": "Provide a valid resource identifier and resubmit the request."
      }
    ],
    "code": "Base.1.8.1.ResourceNotFound",
    "message": "The requested resource of type #ManagerAccount.v1_4_0.ManagerAccount named root was not found."
  }```
justin0309 commented 3 months ago

@gkeishin openbmc code base: 2.14.0 auto-test : v4.0-stable The error message is still the same Modify the test based on the latest commit

Removed faillock file check to fix problem https://github.com/openbmc/openbmc-test-automation/commit/638a598989125c8fd96d8599813c5aec8451b85b

image Is there any update? I also have the same error. Is it possible that the response code is wrong?

gkeishin commented 3 months ago

@rahulmah can you check on this and update

justin0309 commented 3 months ago

The judgment of ec.value==5 should be added to this. Although I don’t know what 5 is, this is the result of the test. Another question is that the auto-test hopes to be 403. Should we modify the returned [messages here::insufficientPrivilege(asyncResp->res);](messages::insufficientPrivilege(asyncResp->res);)? https://github.com/openbmc/bmcweb/blob/20fa6a2c6cea77a4b411634dfca67eef6c8f430f/redfish-core/lib/account_service.hpp#L2010

Because currently, return 404 is inconsistent with auto-test. Or does the test case need to be corrected to 405?