Skip to content

Commit

Permalink
Refactor route add
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 f60b974 commit 726e600
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/test_mirror.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,12 +145,12 @@ def test_MirrorAddRemove(self, dvs, testlog):
self.add_neighbor("Ethernet16", nhop_ip, "02:04:06:08:10:12")
assert self.get_mirror_session_state(session)["status"] == "inactive"

# add route to mirror destination via 10.0.0.1
self.add_route(dvs, "2.2.2.2", "10.0.0.1")
# add route to mirror destination via next hop ip
self.add_route(dvs, dst_ip, nhop_ip)
assert self.get_mirror_session_state(session)["status"] == "active"
assert self.get_mirror_session_state(session)["monitor_port"] == "Ethernet16"
assert self.get_mirror_session_state(session)["dst_mac"] == "02:04:06:08:10:12"
assert self.get_mirror_session_state(session)["route_prefix"] == "2.2.2.2/32"
assert self.get_mirror_session_state(session)["route_prefix"] == "{}/{}".format(dst_ip, 32)

# check asic database
tbl = swsscommon.Table(self.adb, "ASIC_STATE:SAI_OBJECT_TYPE_MIRROR_SESSION")
Expand Down

0 comments on commit 726e600

Please sign in to comment.