Skip to content

Commit

Permalink
Introduce _test_MirrorDestMoveVlan
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 12d4267 commit fbed725
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions tests/test_mirror.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,6 @@ def _test_MirrorAddRemove(self, dvs, testlog, v6_encap=False):
The session becomes inactive again till the end
4. Remove miror session
"""

session = "TEST_SESSION"
src_ip = "1.1.1.1" if v6_encap == False else "fc00::1:1:1:1"
dst_ip = "2.2.2.2" if v6_encap == False else "fc00::2:2:2:2"
Expand Down Expand Up @@ -259,7 +258,6 @@ def _test_MirrorToVlanAddRemove(self, dvs, testlog, v6_encap=False):
3. Remove FDB; remove neighbor; remove IP; remove VLAN
4. Remove mirror session
"""

session = "TEST_SESSION"
src_ip = "5.5.5.5" if v6_encap == False else "fc00::5:5:5:5"
# dst ip in directly connected vlan subnet
Expand Down Expand Up @@ -411,7 +409,6 @@ def _test_MirrorToLagAddRemove(self, dvs, testlog, v6_encap=False):
4. Remove mirror session
"""

session = "TEST_SESSION"
src_ip = "10.10.10.10" if v6_encap == False else "fc00::10:10:10:10"
dst_ip = "11.11.11.11" if v6_encap == False else "fc00::11:11:11:11"
Expand Down Expand Up @@ -481,10 +478,7 @@ def test_MirrorToLagAddRemove(self, dvs, testlog):
self._test_MirrorToLagAddRemove(dvs, testlog)
self._test_MirrorToLagAddRemove(dvs, testlog, v6_encap=True)

# 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_MirrorDestMoveVlan(self, dvs, testlog):
def _test_MirrorDestMoveVlan(self, dvs, testlog):
"""
This test tests mirror session destination move from non-VLAN to VLAN
and back to non-VLAN port
Expand All @@ -497,8 +491,6 @@ def test_MirrorDestMoveVlan(self, dvs, testlog):
7. Disable non-VLAN monitor port
8. Remove mirror session
"""
self.setup_db(dvs)

session = "TEST_SESSION"
src_ip = "7.7.7.7"
dst_ip = "8.8.8.8"
Expand Down Expand Up @@ -608,6 +600,13 @@ def test_MirrorDestMoveVlan(self, dvs, testlog):
# remove mirror session
self.remove_mirror_session(session)

# 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_MirrorDestMoveVlan(self, dvs, testlog):
self.setup_db(dvs)

self._test_MirrorDestMoveVlan(dvs, testlog)

def test_MirrorDestMoveLag(self, dvs, testlog):
"""
Expand Down

0 comments on commit fbed725

Please sign in to comment.