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 88619b0 commit a4855a7
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/test_port.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,15 @@ 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
11 changes: 11 additions & 0 deletions tests/test_portchannel.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,17 @@ def test_Portchannel_tpid(self, dvs, testlog):
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 a4855a7

Please sign in to comment.