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

[Vrf] Disable swss warm_boot flag after test_vrf_swss_warm_reboot #4636

Merged
merged 1 commit into from
Nov 17, 2021
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