Convert 'read_mac' ansible test to pytest#2322
Convert 'read_mac' ansible test to pytest#2322wangxin merged 3 commits intosonic-net:masterfrom ayurkiv-nvda:master_read_mac
Conversation
wangxin
left a comment
There was a problem hiding this comment.
This test checked router MAC address in config_db after image upgrade and minigraph loading. Would it be easier to add a router MAC check in the upgrading tests than creating a new test?
This test was written to verify some specific flow. There was a bug, when sometimes after sonic upgrade there wasn't MAC address on interfaces. Firstly was developed YML script to reproduce this issue (cyclic upgrade), then this script was modified and commited to sonic-mgmt repository. And now I manage to rewrite this test to pytest |
|
@ayurkiv-nvda You made a point of |
|
@wangxin I fixed all your comments. Can you please approve and merge if there are no more remarks? |
|
retest vsimage please |
|
retest this please |
swss: * a3bfd96 2022-06-18 | Enhance mock test for dynamic buffer manager for port removing and qos reload flows (sonic-net#2262) (HEAD -> 202205, github/202205) [Stephen Sun] * b17d6c0 2022-05-28 | Support mock_test infra for dynamic buffer manager and fix issues found during mock test (sonic-net#2234) [Stephen Sun] * 3fb23a1 2022-06-16 | [aclorch] Fix and simplify DTel watchlist tables and entries (sonic-net#2155) [Mickey Spiegel] * 9ace643 2022-06-16 | [intfmgr]: Set proxy_arp kernel param (sonic-net#2334) [Lawrence Lee] * 013609a 2022-06-14 | [crmorch] Prevent exceededLogCounter from resetting when low and high values are equal (sonic-net#2327) [Alexander Allen] * 83a1306 2022-06-13 | Fix key generation in removeDecapTunnel (sonic-net#2322) [Myron Sosyak] * 3d018ad 2022-06-15 | Apply `DSCP_TO_TC_MAP` from `PORT_QOS_MAP|global` to switch level (sonic-net#2314) [bingwang-ms] Signed-off-by: Ying Xie <[email protected]>
Signed-off-by: Andriy Yurkiv [email protected]
Description of PR
Summary:
Fixes # (issue)
Type of change
Approach
What is the motivation for this PR?
Migrating tests from ansible to pytest framework
How did you do it?
Converted read_mac ansible test to pytest.
Old ansible test :https://github.com/Azure/sonic-mgmt/blob/master/ansible/roles/test/tasks/read_mac_metadata.yml
How did you verify/test it?
iteration, image1 and image2 params are mandatory
minigraph1 and minigraph2 are optional
Any platform specific information?
N/A
Supported testbed topology if it's a new test case?
any
Documentation
'read mac' test flow:
Note
This test has at least 2 parameters that cannot be defined as default (image1 and image2)
Because of this backward compatibility currently does not work (I mean ability to run test using ansible-playbook)
Current implementation of ansible to pytest wrapper does not allow to pass python input params. And this may be motivation to improve it fuctionality in future