Skip to content

Commit c90e39f

Browse files
wenyiz2021mssonicbld
authored andcommitted
[plt_reboot_dict] auto use fixture set_max_for_interfaces in reboot tests (#8938)
1 parent 78d6dd9 commit c90e39f

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

tests/platform_tests/test_power_off_reboot.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
INTERFACE_WAIT_TIME = 300
1818

1919

20-
@pytest.fixture
20+
@pytest.fixture(scope="module", autouse=True)
2121
def set_max_time_for_interfaces(duthost):
2222
"""
2323
For chassis testbeds, we need to specify plt_reboot_ctrl in inventory file,
@@ -61,7 +61,7 @@ def _power_off_reboot_helper(kwargs):
6161

6262

6363
def test_power_off_reboot(duthosts, localhost, enum_supervisor_dut_hostname, conn_graph_facts,
64-
set_max_time_for_interfaces, xcvr_skip_list, pdu_controller, power_off_delay):
64+
xcvr_skip_list, pdu_controller, power_off_delay):
6565
"""
6666
@summary: This test case is to perform reboot via powercycle and check platform status
6767
@param duthost: Fixture for DUT AnsibleHost object

tests/platform_tests/test_reboot.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
MAX_WAIT_TIME_FOR_REBOOT_CAUSE = 120
3737

3838

39-
@pytest.fixture
39+
@pytest.fixture(scope="module", autouse=True)
4040
def set_max_time_for_interfaces(duthost):
4141
"""
4242
For chassis testbeds, we need to specify plt_reboot_ctrl in inventory file,
@@ -142,7 +142,7 @@ def check_interfaces_and_services(dut, interfaces, xcvr_skip_list,
142142
return
143143

144144

145-
def test_cold_reboot(duthosts, enum_rand_one_per_hwsku_hostname, set_max_time_for_interfaces,
145+
def test_cold_reboot(duthosts, enum_rand_one_per_hwsku_hostname,
146146
localhost, conn_graph_facts, xcvr_skip_list): # noqa F811
147147
"""
148148
@summary: This test case is to perform cold reboot and check platform status
@@ -202,7 +202,7 @@ def test_warm_reboot(duthosts, enum_rand_one_per_hwsku_hostname, localhost, conn
202202

203203

204204
def test_watchdog_reboot(duthosts, enum_rand_one_per_hwsku_hostname,
205-
localhost, conn_graph_facts, set_max_time_for_interfaces, xcvr_skip_list): # noqa F811
205+
localhost, conn_graph_facts, xcvr_skip_list): # noqa F811
206206
"""
207207
@summary: This test case is to perform reboot via watchdog and check platform status
208208
"""
@@ -216,7 +216,7 @@ def test_watchdog_reboot(duthosts, enum_rand_one_per_hwsku_hostname,
216216

217217

218218
def test_continuous_reboot(duthosts, enum_rand_one_per_hwsku_hostname,
219-
localhost, conn_graph_facts, set_max_time_for_interfaces, xcvr_skip_list): # noqa F811
219+
localhost, conn_graph_facts, xcvr_skip_list): # noqa F811
220220
"""
221221
@summary: This test case is to perform 3 cold reboot in a row
222222
"""

0 commit comments

Comments
 (0)