From 7f5ab0b8bcf00ad2b174451d996dd6013344ca1e Mon Sep 17 00:00:00 2001 From: selldinesh Date: Tue, 26 Sep 2023 16:46:42 +0000 Subject: [PATCH] adding the port remove and skip all fixture --- tests/api/test_isolation_group_member.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tests/api/test_isolation_group_member.py b/tests/api/test_isolation_group_member.py index 7fa6b50d..de056dbe 100644 --- a/tests/api/test_isolation_group_member.py +++ b/tests/api/test_isolation_group_member.py @@ -1,6 +1,16 @@ from pprint import pprint +import pytest + +@pytest.fixture(scope='module', autouse=True) +def skip_all(testbed_instance): + testbed = testbed_instance + if testbed is not None and len(testbed.npu) != 1: + pytest.skip('invalid for {} testbed'.format(testbed.name)) + + +@pytest.mark.npu class TestSaiIsolationGroupMember: # object with parent SAI_OBJECT_TYPE_ISOLATION_GROUP SAI_OBJECT_TYPE_PORT SAI_OBJECT_TYPE_BRIDGE_PORT @@ -46,6 +56,7 @@ def test_isolation_group_member_create(self, npu): def test_isolation_group_member_remove(self, npu): commands = [ {'name': 'isolation_group_member_1', 'op': 'remove'}, + {'name': 'port_1', 'op': 'remove'}, {'name': 'isolation_group_1', 'op': 'remove'}, ]