Skip to content

Commit

Permalink
Fix LAG member test case (sonic-net#1304)
Browse files Browse the repository at this point in the history
Co-authored-by: Vasant Patil <vapatil@linkedin.com>
  • Loading branch information
vasant17 and Vasant Patil authored Jun 2, 2020
1 parent 3f42eb7 commit 14075ae
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions tests/test_vlan.py
Original file line number Diff line number Diff line change
Expand Up @@ -447,13 +447,10 @@ def test_AddPortChannelToVlan(self, dvs, testlog):
assert len(lag_member_entries) == 1

(status, fvs) = tbl.get(lag_member_entries[0])
for fv in fvs:
if fv[0] == "SAI_LAG_MEMBER_ATTR_LAG_ID":
assert fv[1] == lag_entries[0]
elif fv[0] == "SAI_LAG_MEMBER_ATTR_PORT_ID":
assert dvs.asicdb.portoidmap[fv[1]] == "Ethernet0"
else:
assert False
fvs = dict(fvs)
assert len(fvs) == 4
assert fvs.get("SAI_LAG_MEMBER_ATTR_LAG_ID") == lag_entries[0]
assert dvs.asicdb.portoidmap[fvs.get("SAI_LAG_MEMBER_ATTR_PORT_ID")] == "Ethernet0"

# create vlan
self.create_vlan(vlan)
Expand Down Expand Up @@ -812,4 +809,4 @@ def test_VlanMemberDbData(self, dvs, testlog, test_input, expected):
self.remove_vlan_member(vlan, interface)

# remove vlan
self.remove_vlan(vlan)
self.remove_vlan(vlan)

0 comments on commit 14075ae

Please sign in to comment.