Skip to content

Commit

Permalink
[test]: test pvid of vlan member port (sonic-net#410)
Browse files Browse the repository at this point in the history
  • Loading branch information
lguohan authored Dec 7, 2017
1 parent d923f71 commit b10be94
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion tests/test_vlan.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,14 @@ def test_VlanMemberCreation(dvs):
elif fv[0] == "SAI_VLAN_MEMBER_ATTR_BRIDGE_PORT_ID":
assert dvs.asicdb.portoidmap[bridge_port_map[fv[1]]] == "Ethernet0"
else:
assert False
assert False

# check pvid of the port
atbl = swsscommon.Table(adb, "ASIC_STATE:SAI_OBJECT_TYPE_PORT")
(status, fvs) = atbl.get(dvs.asicdb.portnamemap["Ethernet0"])
assert status == True

assert "SAI_PORT_ATTR_PORT_VLAN_ID" in [fv[0] for fv in fvs]
for fv in fvs:
if fv[0] == "SAI_PORT_ATTR_PORT_VLAN_ID":
assert fv[1] == "2"

0 comments on commit b10be94

Please sign in to comment.