Skip to content

Commit

Permalink
Fixed test failure.
Browse files Browse the repository at this point in the history
Signed-off-by: Mahdi Ramezani <mramezani@microsoft.com>
  • Loading branch information
mramezani95 committed Nov 16, 2024
1 parent 9f22222 commit f955a78
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/test_mirror.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,12 +112,13 @@ def check_syslog(self, dvs, marker, log, expected_cnt):
(ec, out) = dvs.runcmd(['sh', '-c', "awk \'/%s/,ENDFILE {print;}\' /var/log/syslog | grep \'%s\' | wc -l" % (marker, log)])
assert out.strip() == str(expected_cnt)

def test_MirrorInvalidEntry(self):
def test_MirrorInvalidEntry(self, dvs):
"""
This test ensures that an invalid mirror session entry is not created.
Here, "invalid" means an entry in which src IP is IPv4 while dst IP is IPv6
(or vice versa).
"""
self.setup_db(dvs)
session = "TEST_SESSION"
self.create_mirror_session(session, "1.1.1.1", "fc00::2:2:2:2", "0x6558", "8", "100", "0")
assert self.mirror_session_entry_exists(session) == False
Expand Down

0 comments on commit f955a78

Please sign in to comment.