Skip to content
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
10 changes: 10 additions & 0 deletions tests/vrf/test_vrf.py
Original file line number Diff line number Diff line change
Expand Up @@ -519,6 +519,15 @@ def ptf_test_port_map(tbinfo, duthosts, mg_facts, ptfhost, rand_one_dut_hostname
}
ptfhost.copy(content=json.dumps(ptf_test_port_map), dest=PTF_TEST_PORT_MAP)

@pytest.fixture()
def disable_swss_warm_boot_flag(duthosts, rand_one_dut_hostname):
yield

duthost = duthosts[rand_one_dut_hostname]
swss_flag = duthost.shell("sonic-db-cli STATE_DB HGET 'WARM_RESTART_ENABLE_TABLE|swss' 'enable'")['stdout']
if swss_flag == 'true':
duthost.shell("config warm_restart disable swss")

# tests
class TestVrfCreateAndBind():
def test_vrf_in_kernel(self, duthosts, rand_one_dut_hostname, cfg_facts):
Expand Down Expand Up @@ -1007,6 +1016,7 @@ def setup_vrf_warm_reboot(self, ptfhost, tbinfo):
#FIXME Might need cold reboot if test failed?
pass

@pytest.mark.usefixtures('disable_swss_warm_boot_flag')
def test_vrf_swss_warm_reboot(self, duthosts, rand_one_dut_hostname, cfg_facts, partial_ptf_runner):
duthost = duthosts[rand_one_dut_hostname]
# enable swss warm-reboot
Expand Down