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:11160] [dualtor] use 'get_pdu_controller' to ensure same dut in test_power_off_reboot #11201

Merged
merged 1 commit into from
Jan 5, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions tests/platform_tests/test_power_off_reboot.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,22 +61,22 @@ def _power_off_reboot_helper(kwargs):


def test_power_off_reboot(duthosts, localhost, enum_supervisor_dut_hostname, conn_graph_facts,
xcvr_skip_list, pdu_controller, power_off_delay):
xcvr_skip_list, get_pdu_controller, power_off_delay):
"""
@summary: This test case is to perform reboot via powercycle and check platform status
@param duthost: Fixture for DUT AnsibleHost object
@param localhost: Fixture for interacting with localhost through ansible
@param conn_graph_facts: Fixture parse and return lab connection graph
@param xcvr_skip_list: list of DUT's interfaces for which transeiver checks are skipped
@param pdu_controller: The python object of psu controller
@param get_pdu_controller: The python object of psu controller
@param power_off_delay: Pytest parameter. The delay between turning off and on the PSU
"""
duthost = duthosts[enum_supervisor_dut_hostname]
UNSUPPORTED_ASIC_TYPE = ["cisco-8000"]
if duthost.facts["asic_type"] in UNSUPPORTED_ASIC_TYPE:
pytest.skip("Skipping test_power_off_reboot. Test unsupported on {} platform"
.format(duthost.facts["asic_type"]))
pdu_ctrl = pdu_controller
pdu_ctrl = get_pdu_controller(duthost)
if pdu_ctrl is None:
pytest.skip("No PSU controller for %s, skip rest of the testing in this case" % duthost.hostname)
is_chassis = duthost.get_facts().get("modular_chassis")
Expand Down