Skip to content

Commit

Permalink
use 'get_pdu_controller' to ensure same dut (#11160)
Browse files Browse the repository at this point in the history
  • Loading branch information
wenyiz2021 authored and mssonicbld committed Jan 5, 2024
1 parent 26789ee commit e7e3cb0
Showing 1 changed file with 3 additions and 3 deletions.
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

0 comments on commit e7e3cb0

Please sign in to comment.