Convert neighbor-mac ansible testcase to pytest#1984
Merged
yxieca merged 2 commits intosonic-net:masterfrom Jul 29, 2020
Merged
Convert neighbor-mac ansible testcase to pytest#1984yxieca merged 2 commits intosonic-net:masterfrom
yxieca merged 2 commits intosonic-net:masterfrom
Conversation
| Retruns: | ||
| macIndex (int): index of the mac address used from TEST_MAC | ||
| """ | ||
| yield request.param |
There was a problem hiding this comment.
Why use here yield in case of any teardown is not perform. Return could be used instead
| ]) | ||
|
|
||
| @pytest.fixture(autouse=True) | ||
| def configureNeighborIpAndPing(self, duthost, ptfhost, macIndex): |
There was a problem hiding this comment.
Are we using camel case not only in Class naming but also in function arguments naming (macIndex -> mac_index)?
|
|
||
| time.sleep(2) | ||
|
|
||
| yield |
| "interface", | ||
| "startup", | ||
| self.DUT_ETH_IF | ||
| ]) |
There was a problem hiding this comment.
Could it be done as one-line command?
neethajohn
approved these changes
Jul 29, 2020
| import time | ||
|
|
||
| from tests.common.helpers.assertions import pytest_assert | ||
| from tests.common.config_reload import config_reload |
tahmed-dev
approved these changes
Jul 29, 2020
kazinator-arista
pushed a commit
to kazinator-arista/sonic-mgmt
that referenced
this pull request
Mar 4, 2026
Commits: f147d9e - 2021-10-27 : [Mux orch] Handle setting unknown mux state (sonic-net#1984) [Prince Sunny] 4618b2b - 2021-10-28 : Change tunnel orch order (sonic-net#1990) [Prince Sunny] 505d52d - 2021-10-20 : Fix the option missing in kernel config issue (sonic-net#1973) [xumia] 7bf4dfb - 2021-10-18 : SAI_REDIS_SWITCH_ATTR_CONTEXT shouldbe the last attribute. This is what sairedis library expects (sonic-net#1935) [judyjoseph] c58919e - 2021-10-08 : [logfile][202012]: Add option to specify swss rec file name (sonic-net#1946) [judyjoseph]
kazinator-arista
pushed a commit
to kazinator-arista/sonic-mgmt
that referenced
this pull request
Mar 4, 2026
sonic-snmpagent 7e46eb1 [201911][RFC1213]: Initialize lag oid map in reinit_data (sonic-net#234) aa98ded CPU Spike because of redundant and flooded keyspace notifis handled (sonic-net#230) sonic-swss bc4e334 [Mux orch] Handle setting unknown mux state (sonic-net#1984) bd3630b [tunnel decap] Change tunnel orch order (sonic-net#1977) 87a673a Fix the option missing in kernel config issue (sonic-net#1973) 57967a1 [orchagent] Fix group name of port-buffer-drop in flexcounterorch.cpp (sonic-net#1967) sonic-utilities 181e8b0 Fix the option missing in kernel config issue (sonic-net#1888) 21c0cc0 [watermarkstat] Fix for error in processing empty array from couters db (sonic-net#1810) 7f15755 [chassis][supervisor][show][interfaces]show interfaces command warning on Supervisor card (sonic-net#1771)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of PR
Convert the ansible test neighbour-mac.yml to pytest (test_neighbor_mac.py)
Summary:
Fixes # (issue)
Type of change
Approach
What is the motivation for this PR?
How did you do it?
How did you verify/test it?
Here is the output of running the test
pytest arp/test_neighbor_mac.py --testbed=vms6-t0-7060 --inventory=../ansible/str --testbed_file=../ansible/testbed.csv --host-pattern=str-a7060cx-acs-1 --module-path=../ansible/library --skip_sanity -vvvvvv
platform linux2 -- Python 2.7.12, pytest-4.6.5, py-1.8.1, pluggy-0.13.1 -- /usr/bin/python
cachedir: .pytest_cache
ansible: 2.8.7
rootdir: /var/mgmt/tests, inifile: pytest.ini
plugins: forked-1.1.3, xdist-1.28.0, ansible-2.2.2, repeat-0.8.0
collected 2 items
arp/test_neighbor_mac.py::TestNeighborMac::testNeighborMac[0] PASSED [ 50%]
arp/test_neighbor_mac.py::TestNeighborMac::testNeighborMac[1] PASSED [100%]
========================== 2 passed in 31.35 seconds ===========================
Any platform specific information?
Supported testbed topology if it's a new test case?
ptf-32, ptf-64
Documentation