Skip to content

Commit

Permalink
Skip autoneg testcase on older images - unsupported CLI (sonic-net#4053)
Browse files Browse the repository at this point in the history
Co-authored-by: Ubuntu <tchadaga@tchadaga-vm-0.hiwlp34jpfluxhegaa1hqcmqrh.phxx.internal.cloudapp.net>
  • Loading branch information
2 people authored and lolyu committed Aug 18, 2021
1 parent b6a8288 commit 79ca865
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tests/platform_tests/test_auto_negotiation.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
from tests.common.helpers.dut_ports import decode_dut_port_name
from tests.common.utilities import wait_until
from tests.platform_tests.link_flap.link_flap_utils import build_test_candidates
from tests.common.utilities import skip_version

pytestmark = [
pytest.mark.topology('any'),
Expand All @@ -37,6 +38,17 @@
# Key: dut host object, value: a list of candidate ports tuple
cadidate_test_ports = {}

@pytest.fixture(autouse=True, scope="module")
def check_image_version(duthost):
"""Skips this test if the SONiC image installed on DUT is older than 202106
Args:
duthost: Hostname of DUT.
Returns:
None.
"""
skip_version(duthost, ["201811", "201911", "202012"])

@pytest.fixture(scope='module', autouse=True)
def recover_ports(duthosts, enum_dut_portname_module_fixture, fanouthosts):
Expand Down

0 comments on commit 79ca865

Please # to comment.