Skip to content

Commit

Permalink
Reorder fixture to preserve config db changes (sonic-net#12420)
Browse files Browse the repository at this point in the history
## Description of PR

Summary:
Fixes # (issue)27603887

### Type of change

- [x] Bug fix
- [ ] Testbed and Framework(new/improvement)
- [ ] Test case(new/improvement)

## Approach
#### What is the motivation for this PR?

When ipv6 fixture runs, it overrides changes made by telemetry fixture for setting up testing environment for telemetry.

#### How did you do it?

Have ipv6 fixture run before telemetry fixture.

#### How did you verify/test it?

Manual test
  • Loading branch information
zbud-msft authored Apr 12, 2024
1 parent 156f6ae commit c453050
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/ip/test_mgmt_ipv6_only.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
from tests.syslog.test_syslog import run_syslog, check_default_route # noqa F401
from tests.common.fixtures.duthost_utils import convert_and_restore_config_db_to_ipv6_only # noqa F401
from tests.common.helpers.gnmi_utils import GNMIEnvironment
from tests.telemetry.conftest import setup_streaming_telemetry # noqa F401
from tests.telemetry.conftest import gnxi_path, setup_streaming_telemetry # noqa F401

pytestmark = [
pytest.mark.disable_loganalyzer,
Expand Down Expand Up @@ -129,9 +129,9 @@ def test_rw_user_ipv6_only(localhost, duthosts, enum_rand_one_per_hwsku_hostname


@pytest.mark.parametrize('setup_streaming_telemetry', [True], indirect=True)
def test_telemetry_output_ipv6_only(duthosts, enum_rand_one_per_hwsku_hostname,
setup_streaming_telemetry, # noqa F811
convert_and_restore_config_db_to_ipv6_only): # noqa F811
def test_telemetry_output_ipv6_only(convert_and_restore_config_db_to_ipv6_only, # noqa F811
duthosts, enum_rand_one_per_hwsku_hostname,
setup_streaming_telemetry): # noqa F811
duthost = duthosts[enum_rand_one_per_hwsku_hostname]
env = GNMIEnvironment(duthost, GNMIEnvironment.TELEMETRY_MODE)
if duthost.is_supervisor_node():
Expand Down

0 comments on commit c453050

Please sign in to comment.