Skip to content

Commit

Permalink
Fix syslog test failure about fixture tbinfo (sonic-net#13821)
Browse files Browse the repository at this point in the history
Description of PR
Syslog test failed for complaining about tbinfo usage as it's a fixture. Solution is to add tbinfo as fixture in the orch_logrotate_setup. Then referencing tbinfo will be the yield of tbinfo which is a dict

What is the motivation for this PR?
Fix the test failure for syslog test_logrotate.

How did you do it?
How did you verify/test it?
Tested on OC test bed and see test pass now.

co-authorized by: [email protected]
  • Loading branch information
wumiaont authored and hdwhdw committed Sep 20, 2024
1 parent 8b3d23b commit 3be5b0a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/syslog/test_logrotate.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
from tests.common import config_reload
from tests.common.helpers.assertions import pytest_assert
from tests.common.utilities import wait_until
from tests.conftest import tbinfo

logger = logging.getLogger(__name__)

Expand Down Expand Up @@ -262,7 +261,8 @@ def no_pending_entries(duthost, ignore_list=None):


@pytest.fixture
def orch_logrotate_setup(duthosts, enum_rand_one_per_hwsku_frontend_hostname, enum_rand_one_frontend_asic_index):
def orch_logrotate_setup(duthosts, enum_rand_one_per_hwsku_frontend_hostname, tbinfo,
enum_rand_one_frontend_asic_index):
duthost = duthosts[enum_rand_one_per_hwsku_frontend_hostname]
if duthost.sonichost.is_multi_asic:
asic_id = enum_rand_one_frontend_asic_index
Expand Down

0 comments on commit 3be5b0a

Please sign in to comment.