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

Disable BGP when running test_neighbor_mac_noptf #3369

Merged
merged 4 commits into from
May 10, 2021
Merged
Changes from 3 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
9 changes: 6 additions & 3 deletions tests/arp/test_neighbor_mac_noptf.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,13 @@ class TestNeighborMacNoPtf:
TEST_INTF = {
4: {"intfIp": "29.0.0.1/24", "NeighborIp": "29.0.0.2"},
6: {"intfIp": "fe00::1/64", "NeighborIp": "fe00::2"},
}
}


@pytest.fixture(scope="module", autouse=True)
def restoreDutConfig(self, duthosts, enum_rand_one_per_hwsku_frontend_hostname):
def setupDutConfig(self, duthosts, enum_rand_one_per_hwsku_frontend_hostname):
"""
Restores DUT configuration after test completes
Disabled BGP to reduce load on switch and restores DUT configuration after test completes

Args:
duthost (AnsibleHost): Device Under Test (DUT)
Expand All @@ -37,6 +38,8 @@ def restoreDutConfig(self, duthosts, enum_rand_one_per_hwsku_frontend_hostname):
None
"""
duthost = duthosts[enum_rand_one_per_hwsku_frontend_hostname]
duthost.command("sudo config bgp shutdown all")
time.sleep(120)
yield

logger.info("Reload Config DB")
Expand Down