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
19 changes: 19 additions & 0 deletions tests/arp/test_unknown_mac.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,25 @@ def wrapper(self, *args):
return wrapper


@pytest.fixture(autouse=True, scope="module")
def dut_disable_arp_update(rand_selected_dut):
"""
Fixture to disable arp update before the test and re-enable it afterwards

Args:
rand_selected_dut(AnsibleHost) : dut instance
"""
duthost = rand_selected_dut
if duthost.shell("docker exec -t swss supervisorctl stop arp_update")['stdout_lines'][0] \
== 'arp_update: ERROR (not running)':
logger.warning("arp_update not running, already disabled")

yield

assert duthost.shell("docker exec -t swss supervisorctl start arp_update")['stdout_lines'][0] \
== 'arp_update: started'


@pytest.fixture(autouse=True, scope="module")
def unknownMacSetup(duthosts, rand_one_dut_hostname, tbinfo):
"""
Expand Down