Skip to content

Commit ca5041d

Browse files
authored
Ignore test_snmp_phy_entity for 201911 images (#2625)
Skip test_snmp_phy_entity testcase on 201911 images. This testcase is primarily targeted to be executed on 202012 images. Added a module scoped skip fixture. Executed the test on a 201911 image, and it was successfully skipped.
1 parent 806348a commit ca5041d

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

tests/snmp/test_snmp_phy_entity.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import time
44

55
from tests.common.utilities import wait_until
6+
from tests.common.helpers.assertions import pytest_require
67
from tests.platform_tests.thermal_control_test_helper import mocker_factory
78

89
pytestmark = [
@@ -99,6 +100,13 @@
99100
XCVR_DOM_KEY_TEMPLATE = 'TRANSCEIVER_DOM_SENSOR|{}'
100101

101102

103+
@pytest.fixture(autouse=True, scope="module")
104+
def check_image_version(duthost):
105+
"""Skip the test for unsupported images."""
106+
pytest_require("201911" not in duthost.os_version, "Test not supported for 201911 images. Skipping the test")
107+
yield
108+
109+
102110
@pytest.fixture(scope="module")
103111
def snmp_physical_entity_info(duthost, localhost, creds):
104112
"""

0 commit comments

Comments
 (0)