Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Verify User Account Unlock:404 Error When Deleting Redfish Account in Teardown Due to SSH Connections Not Closed #2248

Open
fangkaiyu2023 opened this issue Sep 4, 2024 · 2 comments

Comments

@fangkaiyu2023
Copy link

fangkaiyu2023 commented Sep 4, 2024

Description: I'm encountering a 404 error when attempting to execute the Redfish.Delete request in the teardown phase of my test case.

URL: https://github.com/openbmc/openbmc-test-automation/blob/v4.0-stable/redfish/account_service/test_user_account.robot

Steps to Reproduce: Run the test case with the following teardown sequence:
[Teardown] Run Keywords Redfish.Logout AND Redfish.Login AND Redfish.Delete /redfish/v1/AccountService/Accounts/test_user AND SSHLibrary.Close All Connections

The Redfish.Delete request results in a 404 error during the teardown phase.

Issue Analysis:

Manual deletion and tests using Postman work as expected without errors.
It seems that the issue arises because the SSH connection was still active and had not been closed by SSHLibrary.Close All Connections before attempting to delete the user. As the last line of the test case involves logging in with SSHLibrary.Login test_user TestPwd123, the account is still in use, which prevents its deletion.
Proposed Solution: Reorder the teardown steps to ensure all SSH connections are closed before attempting to delete the account. The revised order should be:
[Teardown] Run Keywords Redfish.Logout AND Redfish.Login AND Redfish.Delete /redfish/v1/AccountService/Accounts/test_user AND SSHLibrary.Close All Connections
Additional Information: Robot Framework 6.0.2 (Python 3.10.12 on Linux)

@fangkaiyu2023
Copy link
Author

fangkaiyu2023 commented Sep 4, 2024

Attached are the logs for the failed tests and the logs for successful tests after applying the suggested solutionstest_logs.zip @williamspatrick @paulfertser @ofaurax @amboar @

@fangkaiyu2023 fangkaiyu2023 changed the title [BUG] Verify User Account Unlock:404 Error When Deleting Redfish Account in Teardown Due to SSH Connections Not Closed Verify User Account Unlock:404 Error When Deleting Redfish Account in Teardown Due to SSH Connections Not Closed Sep 4, 2024
@fangkaiyu2023
Copy link
Author

In the Verify SSH Login Access With Admin User test case, just like in Verify User Account Unlock, it's essential to terminate the SSH connection before attempting to delete the account.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant