diff --git a/tests/api/test_dash_acl_group.py b/tests/api/test_dash_acl_group.py index 082a2b28..3551a051 100644 --- a/tests/api/test_dash_acl_group.py +++ b/tests/api/test_dash_acl_group.py @@ -3,6 +3,12 @@ import pytest +@pytest.fixture(scope="module", autouse=True) +def skip_all(testbed_instance): + testbed = testbed_instance + if testbed is not None and len(testbed.dpu) != 1: + pytest.skip("invalid for \"{}\" testbed".format(testbed.name)) + @pytest.mark.dpu class TestSaiDashAclGroup: # object with no attributes diff --git a/tests/api/test_direction_lookup_entry.py b/tests/api/test_direction_lookup_entry.py index dd50f4ad..c94ace8d 100644 --- a/tests/api/test_direction_lookup_entry.py +++ b/tests/api/test_direction_lookup_entry.py @@ -3,6 +3,12 @@ import pytest +@pytest.fixture(scope="module", autouse=True) +def skip_all(testbed_instance): + testbed = testbed_instance + if testbed is not None and len(testbed.dpu) != 1: + pytest.skip("invalid for \"{}\" testbed".format(testbed.name)) + @pytest.mark.dpu class TestSaiDirectionLookupEntry: # object with no attributes diff --git a/tests/api/test_eni.py b/tests/api/test_eni.py index f0ffd429..e420e991 100644 --- a/tests/api/test_eni.py +++ b/tests/api/test_eni.py @@ -2,6 +2,11 @@ import pytest +@pytest.fixture(scope="module", autouse=True) +def skip_all(testbed_instance): + testbed = testbed_instance + if testbed is not None and len(testbed.dpu) != 1: + pytest.skip("invalid for \"{}\" testbed".format(testbed.name)) @pytest.mark.dpu class TestSaiEni: diff --git a/tests/api/test_inbound_routing_entry.py b/tests/api/test_inbound_routing_entry.py index 871a3a3a..54b0ea54 100644 --- a/tests/api/test_inbound_routing_entry.py +++ b/tests/api/test_inbound_routing_entry.py @@ -3,6 +3,12 @@ import pytest +@pytest.fixture(scope="module", autouse=True) +def skip_all(testbed_instance): + testbed = testbed_instance + if testbed is not None and len(testbed.dpu) != 1: + pytest.skip("invalid for \"{}\" testbed".format(testbed.name)) + @pytest.mark.dpu class TestSaiInboundRoutingEntry: # object with no attributes diff --git a/tests/api/test_outbound_ca_to_pa_entry.py b/tests/api/test_outbound_ca_to_pa_entry.py index 637679e6..100b036e 100644 --- a/tests/api/test_outbound_ca_to_pa_entry.py +++ b/tests/api/test_outbound_ca_to_pa_entry.py @@ -3,6 +3,12 @@ import pytest +@pytest.fixture(scope="module", autouse=True) +def skip_all(testbed_instance): + testbed = testbed_instance + if testbed is not None and len(testbed.dpu) != 1: + pytest.skip("invalid for \"{}\" testbed".format(testbed.name)) + @pytest.mark.dpu class TestSaiOutboundCaToPaEntry: # object with no attributes diff --git a/tests/api/test_pa_validation_entry.py b/tests/api/test_pa_validation_entry.py index f9d6c376..118b8f7e 100644 --- a/tests/api/test_pa_validation_entry.py +++ b/tests/api/test_pa_validation_entry.py @@ -3,6 +3,12 @@ import pytest +@pytest.fixture(scope="module", autouse=True) +def skip_all(testbed_instance): + testbed = testbed_instance + if testbed is not None and len(testbed.dpu) != 1: + pytest.skip("invalid for \"{}\" testbed".format(testbed.name)) + @pytest.mark.dpu class TestSaiPaValidationEntry: # object with no attributes diff --git a/tests/api/test_vip_entry.py b/tests/api/test_vip_entry.py index 2ce268c0..d59e619f 100644 --- a/tests/api/test_vip_entry.py +++ b/tests/api/test_vip_entry.py @@ -3,6 +3,12 @@ import pytest +@pytest.fixture(scope="module", autouse=True) +def skip_all(testbed_instance): + testbed = testbed_instance + if testbed is not None and len(testbed.dpu) != 1: + pytest.skip("invalid for \"{}\" testbed".format(testbed.name)) + @pytest.mark.dpu class TestSaiVipEntry: # object with no attributes diff --git a/tests/api/test_vnet.py b/tests/api/test_vnet.py index b4cebd9c..db35a3cf 100644 --- a/tests/api/test_vnet.py +++ b/tests/api/test_vnet.py @@ -3,6 +3,12 @@ import pytest +@pytest.fixture(scope="module", autouse=True) +def skip_all(testbed_instance): + testbed = testbed_instance + if testbed is not None and len(testbed.dpu) != 1: + pytest.skip("invalid for \"{}\" testbed".format(testbed.name)) + @pytest.mark.dpu class TestSaiVnet: # object with no attributes