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

[action] [PR:15972] Update tests to handle PSUs with multiple PDUs #16319

Merged
merged 1 commit into from
Jan 3, 2025

Conversation

mssonicbld
Copy link
Collaborator

Description of PR

Summary:
Update test_turn_off_psu_and_check_psu_info to ensure that it handles PSUs with multilpe PDUs correctly
Update test_turn_on_off_psu_and_check_psustatus to handle PSUs with multiple PDUs correctly

Type of change

  • Bug fix
  • Testbed and Framework(new/improvement)
  • Test case(new/improvement)

Back port request

  • 202012
  • 202205
  • 202305
  • 202311
  • 202405

Approach

  • Instead of toggling one outlet/PDU, toggle a full set of PDUs connected to one PSU
  • Move common PSU helpers function to new psu_helpers.py in tests/common/helpers folder
  • Add try / catch block to ensure all PSUs are turned back on after the test

What is the motivation for this PR?

Prevent test from failing when toggling a PDU connected to a PSU that will stay on due to other redundant PDUs that were not toggled.

How did you do it?

Break PDUs into sets based on PSU, make sure to toggle whole sets at once.

How did you verify/test it?

https://elastictest.org/scheduler/testplan/675919214fa1c38a7e20b96c <- T0/T1 regression test
Tested on T2 testbed as well (bar known issues with certain testbed types)

Any platform specific information?

N/A

Supported testbed topology if it's a new test case?

N/A

Documentation

N/A

…ple PDUs (sonic-net#15972)

Description of PR
Summary:
Update test_turn_off_psu_and_check_psu_info to ensure that it handles PSUs with multilpe PDUs correctly
Update test_turn_on_off_psu_and_check_psustatus to handle PSUs with multiple PDUs correctly

Approach
Instead of toggling one outlet/PDU, toggle a full set of PDUs connected to one PSU
Move common PSU helpers function to new psu_helpers.py in tests/common/helpers folder
Add try / catch block to ensure all PSUs are turned back on after the test
What is the motivation for this PR?
Prevent test from failing when toggling a PDU connected to a PSU that will stay on due to other redundant PDUs that were not toggled.

How did you do it?
Break PDUs into sets based on PSU, make sure to toggle whole sets at once.

How did you verify/test it?
https://elastictest.org/scheduler/testplan/675919214fa1c38a7e20b96c <- T0/T1 regression test
Tested on T2 testbed as well (bar known issues with certain testbed types)

Signed-off-by: Javier Tan javiertan@microsoft.com
@mssonicbld mssonicbld requested a review from prgeor as a code owner January 3, 2025 02:02
@mssonicbld
Copy link
Collaborator Author

/azp run

@mssonicbld
Copy link
Collaborator Author

Original PR: #15972

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld mssonicbld merged commit 1d35f6b into sonic-net:202411 Jan 3, 2025
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants