Skip to content

Commit 8a3eea9

Browse files
wenyiz2021AharonMalkin
authored andcommitted
[plt_reboot_dict] auto use fixture set_max_for_interfaces in reboot tests (sonic-net#8938)
1 parent 32f92ca commit 8a3eea9

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
@@ -32,7 +32,7 @@
3232
MAX_WAIT_TIME_FOR_REBOOT_CAUSE = 120
3333

3434

35-
@pytest.fixture
35+
@pytest.fixture(scope="module", autouse=True)
3636
def set_max_time_for_interfaces(duthost):
3737
"""
3838
For chassis testbeds, we need to specify plt_reboot_ctrl in inventory file,
@@ -147,7 +147,7 @@ def check_interfaces_and_services(dut, interfaces, xcvr_skip_list,
147147
return
148148

149149

150-
def test_cold_reboot(duthosts, enum_rand_one_per_hwsku_hostname, set_max_time_for_interfaces,
150+
def test_cold_reboot(duthosts, enum_rand_one_per_hwsku_hostname,
151151
localhost, conn_graph_facts, xcvr_skip_list): # noqa F811
152152
"""
153153
@summary: This test case is to perform cold reboot and check platform status
@@ -217,7 +217,7 @@ def test_warm_reboot(duthosts, enum_rand_one_per_hwsku_hostname,
217217

218218

219219
def test_watchdog_reboot(duthosts, enum_rand_one_per_hwsku_hostname,
220-
localhost, conn_graph_facts, set_max_time_for_interfaces, xcvr_skip_list): # noqa F811
220+
localhost, conn_graph_facts, xcvr_skip_list): # noqa F811
221221
"""
222222
@summary: This test case is to perform reboot via watchdog and check platform status
223223
"""
@@ -234,7 +234,7 @@ def test_watchdog_reboot(duthosts, enum_rand_one_per_hwsku_hostname,
234234

235235

236236
def test_continuous_reboot(duthosts, enum_rand_one_per_hwsku_hostname,
237-
localhost, conn_graph_facts, set_max_time_for_interfaces, xcvr_skip_list): # noqa F811
237+
localhost, conn_graph_facts, xcvr_skip_list): # noqa F811
238238
"""
239239
@summary: This test case is to perform 3 cold reboot in a row
240240
"""

0 commit comments

Comments
 (0)