-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
First time config push for AN and FEC #1
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,29 @@ | |
|
||
|
||
class TestPortAutoNeg(object): | ||
def test_PortAutoNegForce(self, dvs, testlog): | ||
|
||
db = swsscommon.DBConnector(0, dvs.redis_sock, 0) | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. should you prepare the adb now as you did on the prev test for fec? any reason here or there it is not the same flow? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It is initialized in the flow lines below. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I know There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Got you. Will move the initialization to one place. |
||
tbl = swsscommon.ProducerStateTable(db, "PORT_TABLE") | ||
|
||
fvs = swsscommon.FieldValuePairs([("autoneg","0"), ("speed", "1000")]) | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. remove extra line |
||
tbl.set("Ethernet0", fvs) | ||
|
||
time.sleep(1) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same comment as above: wait instead of sleep |
||
|
||
adb = swsscommon.DBConnector(1, dvs.redis_sock, 0) | ||
|
||
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_AUTO_NEG_MODE" in [fv[0] for fv in fvs] | ||
for fv in fvs: | ||
if fv[0] == "SAI_PORT_ATTR_AUTO_NEG_MODE": | ||
assert fv[1] == "false" | ||
|
||
def test_PortAutoNegCold(self, dvs, testlog): | ||
|
||
db = swsscommon.DBConnector(0, dvs.redis_sock, 0) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think on another PR stepan mentioned that tests moved to wait instead of sleep. can you please check?
should we test it on different type of ports? breakout port and non breakout port?
should you test different fec options? only only none?
how this test cover the new push flow?