Converted port_toggle test and continuous_link_flap test to pytest#2389
Converted port_toggle test and continuous_link_flap test to pytest#2389yxieca merged 15 commits intosonic-net:masterfrom
Conversation
b0f8f43 to
560331d
Compare
|
can you provide command line how to run this test? |
Sure. Added to Approach block. |
daall
left a comment
There was a problem hiding this comment.
The overall approach looks OK to me, but I would recommend going through and using wait_until from common/utilities in places where waiting is necessary (I think I pointed out most of them). It might also be worth considering using this in some places where there is a static 30-60s wait time to improve test stability.
|
@OleksandrKozodoi I am refactoring test_link_flap to let it test parameterized individual ports: #2411. My change will cause some merge conflict with your change. I think we can still share the code between 2 tests as you intended though. |
There was a problem hiding this comment.
A topo marker must be assigned, or the case will be skipped.
There was a problem hiding this comment.
Done. Thanks
There was a problem hiding this comment.
"dut port {} didn't go down as expected"
The error msg should be "dut port {} didn't go up as expected"
There was a problem hiding this comment.
I suggest combining pytest_assert with wait_until like
pytest_assert(wait_until(30, 1, __check_if_status, dut, dut_port, 'up'), "dut port {} didn't go down as expected".format(dut_port))
There was a problem hiding this comment.
Done. Thanks
|
@yxieca I've added your changes #2411 to my PR, but I don't have write access for resolving conflicts. Could you please review my changes and resolve conflicts. Thanks. @OleksandrKozodoi Sorry I cannot solve the merge conflict either, it appears that the conflict is too complicated to be solved by web tool. It might be quicker if you create another change and force push to your fork? Sorry for the inconvenience. @yxieca I've resolved conflicts. Could you please review my changes? Thanks. |
Signed-off-by: Oleksandr Kozodoi <oleksandrx.kozodoi@intel.com>
Signed-off-by: Oleksandr Kozodoi <oleksandrx.kozodoi@intel.com>
Signed-off-by: Oleksandr Kozodoi <oleksandrx.kozodoi@intel.com>
Signed-off-by: Oleksandr Kozodoi <oleksandrx.kozodoi@intel.com>
Signed-off-by: Oleksandr Kozodoi <oleksandrx.kozodoi@intel.com>
Co-authored-by: Danny Allen <daall@microsoft.com>
Signed-off-by: Oleksandr Kozodoi <oleksandrx.kozodoi@intel.com>
Signed-off-by: Oleksandr Kozodoi <oleksandrx.kozodoi@intel.com>
Signed-off-by: Oleksandr Kozodoi <oleksandrx.kozodoi@intel.com>
Signed-off-by: Oleksandr Kozodoi <oleksandrx.kozodoi@intel.com>
Signed-off-by: Oleksandr Kozodoi <oleksandrx.kozodoi@intel.com>
ef32da2 to
cfd0655
Compare
|
This pull request introduces 3 alerts when merging cfd0655 into 1306417 - view on LGTM.com new alerts:
|
|
@yxieca @wangxin @daall @bingwang-ms Please review |
|
retest vsimage please |
daall
left a comment
There was a problem hiding this comment.
LGTM, though I think Ying's feedback would be good to incorporate
Signed-off-by: Oleksandr Kozodoi <oleksandrx.kozodoi@intel.com>
Description of PR
Summary:
port_toggle.pymodule based on port_toggle testNote:
A few methods of link_flap.py module are useful for cont_link_flap test, so I've changed the structure of the link flap test
Type of change
Approach
What is the motivation for this PR?
Migrating tests from ansible to pytest framework
How did you do it?
Converted port_toggle and continuous_link_flap ansible tests to pytest.
Old versions of ansible tests:
port_toggle
continuous_link_flap
How did you verify/test it?
Run tests. Test passed.
link_flap test:
py.test platform_tests/link_flap/test_link_flap.py -rAport_toggle:
py.test platform_tests/link_flap/test_port_toggle.py -rAcont_link_flap:
py.test platform_tests/link_flap/test_cont_link_flap.py --orch_cpu_threshold=10 -rA--orch_cpu_threshold is optional
Any platform specific information?
Supported testbed topology if it's a new test case?
Documentation