Skip to content

Commit

Permalink
Fix test case issue
Browse files Browse the repository at this point in the history
  • Loading branch information
gechiang committed May 29, 2021
1 parent 9bc5391 commit 88619b0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 27 deletions.
9 changes: 0 additions & 9 deletions tests/test_port.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,6 @@ def test_PortTpid(self, dvs, testlog):
cdb_port_tbl.set("Ethernet8", fvs)
time.sleep(1)

# check application database
pdb_port_tbl = swsscommon.Table(pdb, "PORT_TABLE")
(status, fvs) = pdb_port_tbl.get("Ethernet8")
assert status == True
for fv in fvs:
if fv[0] == "tpid":
tpid = fv[1]
assert tpid == "0x9200"

# Check ASIC DB
atbl = swsscommon.Table(adb, "ASIC_STATE:SAI_OBJECT_TYPE_PORT")
# get TPID and validate it to be 0x9200 (37376)
Expand Down
20 changes: 2 additions & 18 deletions tests/test_portchannel.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,28 +156,12 @@ def test_Portchannel_tpid(self, dvs, testlog):
cdb = swsscommon.DBConnector(4, dvs.redis_sock, 0)
pdb = swsscommon.DBConnector(0, dvs.redis_sock, 0)

# create port channel
# create port channel with tpid 0x9200
tbl = swsscommon.Table(cdb, "PORTCHANNEL")
fvs = swsscommon.FieldValuePairs([("admin_status", "up"),
("mtu", "9100")])
tbl.set("PortChannel0002", fvs)
time.sleep(1)

fvs = swsscommon.FieldValuePairs([("tpid", "0x9200")])
fvs = swsscommon.FieldValuePairs([("admin_status", "up"), ("mtu", "9100"), ("tpid", "0x9200"), ("oper_status", "up")])
tbl.set("PortChannel0002", fvs)
time.sleep(1)

# check application database for the correct TPID
pdb_port_tbl = swsscommon.Table(pdb, "LAG_TABLE")
(status, fvs) = pdb_port_tbl.get("PortChannel0002")
assert status == True
tpid = "0"
for fv in fvs:
if fv[0] == "tpid":
tpid = fv[1]

assert tpid == "0x9200"

# Check ASIC DB
# get TPID and validate it to be 0x9200 (37376)
atbl = swsscommon.Table(adb, "ASIC_STATE:SAI_OBJECT_TYPE_LAG")
Expand Down

0 comments on commit 88619b0

Please sign in to comment.