Skip to content

Commit

Permalink
Introduce _test_MirrorToVlanAddRemove
Browse files Browse the repository at this point in the history
Signed-off-by: Wenda Ni <wonda.ni@gmail.com>
  • Loading branch information
wendani committed Jul 7, 2021
1 parent 61149a5 commit af5e1e1
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions tests/test_mirror.py
Original file line number Diff line number Diff line change
Expand Up @@ -248,11 +248,7 @@ def remove_fdb(self, vlan, mac):
tbl._del("Vlan" + vlan + ":" + mac)
time.sleep(1)


# Ignore testcase in Debian Jessie
# TODO: Remove this skip if Jessie support is no longer needed
@pytest.mark.skipif(StrictVersion(distro.linux_distribution()[1]) <= StrictVersion('8.9'), reason="Debian 8.9 or before has no support")
def test_MirrorToVlanAddRemove(self, dvs, testlog):
def _test_MirrorToVlanAddRemove(self, dvs, testlog):
"""
This test covers basic mirror session creation and removal operation
with destination port sits in a VLAN
Expand All @@ -263,7 +259,6 @@ def test_MirrorToVlanAddRemove(self, dvs, testlog):
3. Remove FDB; remove neighbor; remove IP; remove VLAN
4. Remove mirror session
"""
self.setup_db(dvs)

session = "TEST_SESSION"
src_ip = "5.5.5.5"
Expand Down Expand Up @@ -366,6 +361,14 @@ def test_MirrorToVlanAddRemove(self, dvs, testlog):
self.remove_mirror_session(session)
self.check_syslog(dvs, marker, "Detached next hop observer for destination IP {}".format(dst_ip), 1)

# Ignore testcase in Debian Jessie
# TODO: Remove this skip if Jessie support is no longer needed
@pytest.mark.skipif(StrictVersion(distro.linux_distribution()[1]) <= StrictVersion('8.9'), reason="Debian 8.9 or before has no support")
def test_MirrorToVlanAddRemove(self, dvs, testlog):
self.setup_db(dvs)

self._test_MirrorToVlanAddRemove(dvs, testlog)

def create_port_channel(self, dvs, channel):
tbl = swsscommon.ProducerStateTable(self.pdb, "LAG_TABLE")
fvs = swsscommon.FieldValuePairs([("admin", "up"), ("mtu", "9100")])
Expand Down

0 comments on commit af5e1e1

Please sign in to comment.