Skip to content

Commit

Permalink
Move ignore logs from TC to conftest for sub ports suite (#6175)
Browse files Browse the repository at this point in the history
PR #5951 introduced 2 error log ignore while running sub_port_interfaces test suite. Sub port folder has 2 more cases that need those skip to be performed

What is the motivation for this PR?
Enable ignore for all sub port test suite

How did you do it?
Move ignore fixture from test to conftest scope

How did you verify/test it?
Run TC, all passed
  • Loading branch information
roman_savchuk authored and wangxin committed Nov 17, 2022
1 parent 87d03b2 commit 689eac3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
9 changes: 9 additions & 0 deletions tests/sub_port_interfaces/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -591,3 +591,12 @@ def teardown_test_class(duthost):
"""
yield
config_reload(duthost)

@pytest.fixture(autouse=True)
def ignore_expected_loganalyzer_exception(duthost, loganalyzer):
if loganalyzer and loganalyzer[duthost.hostname]:
ignore_regex_list = [
".*ERR teamd[0-9]*#tlm_teamd.*process_add_queue: Can't connect to teamd after.*attempts. LAG 'PortChannel.*'",
".*ERR swss[0-9]*#orchagent.*update: Failed to get port by bridge port ID.*"
]
loganalyzer[duthost.hostname].ignore_regex.extend(ignore_regex_list)
9 changes: 0 additions & 9 deletions tests/sub_port_interfaces/test_sub_port_interfaces.py
Original file line number Diff line number Diff line change
Expand Up @@ -477,12 +477,3 @@ def test_balancing_sub_ports(self, duthost, ptfhost, ptfadapter, apply_balancing
type_of_traffic='balancing',
ttl=63)


@pytest.fixture(autouse=True)
def ignore_expected_loganalyzer_exception(duthost, loganalyzer):
if loganalyzer and loganalyzer[duthost.hostname]:
ignore_regex_list = [
".*ERR teamd[0-9]*#tlm_teamd.*process_add_queue: Can't connect to teamd after.*attempts. LAG 'PortChannel.*'",
".*ERR swss[0-9]*#orchagent.*update: Failed to get port by bridge port ID.*"
]
loganalyzer[duthost.hostname].ignore_regex.extend(ignore_regex_list)

0 comments on commit 689eac3

Please sign in to comment.