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
13 changes: 12 additions & 1 deletion tests/vxlan/test_vxlan_ecmp.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@

from tests.common.helpers.assertions import pytest_assert
from tests.common.fixtures.ptfhost_utils import copy_ptftests_directory # noqa F401
from tests.common.fixtures.duthost_utils import backup_and_restore_config_db_on_duts # noqa F401
from tests.common.config_reload import config_reload
from tests.common.utilities import wait_until
from tests.ptf_runner import ptf_runner
from tests.common.vxlan_ecmp_utils import Ecmp_Utils
Expand Down Expand Up @@ -140,7 +142,8 @@ def fixture_setUp(duthosts,
rand_one_dut_hostname,
minigraph_facts,
tbinfo,
encap_type):
encap_type,
backup_and_restore_config_db_on_duts): # noqa F811
'''
Setup for the entire script.
The basic steps in VxLAN configs are:
Expand Down Expand Up @@ -339,6 +342,14 @@ def fixture_setUp(duthosts,
setup_crm_interval(data['duthost'], int(data['original_crm_interval']))


@pytest.fixture(scope="module", autouse=True)
def restore_config_by_config_reload(duthosts, rand_one_dut_hostname, localhost):
yield
duthost = duthosts[rand_one_dut_hostname]

config_reload(duthost, safe_reload=True)


@pytest.fixture(scope="module")
def default_routes(setUp, encap_type):
vnet = list(setUp[encap_type]['vnet_vni_map'].keys())[0]
Expand Down
Loading