From 0d90387e91cd631dc1788a897b96377122b1e6bc Mon Sep 17 00:00:00 2001 From: Chengjun Li Date: Tue, 13 Oct 2026 11:30:53 -0700 Subject: [PATCH] test: Gate MultiTenancy and NetworkConnector integ tests per region Replace the unconditional `@skipIf(True, ...)` on the tenancy config and NetworkConnector tests with per-region gating via `current_region_does_not_support`, so the tests run in regions where the corresponding Lambda features are available instead of never running. Adds the `MultiTenancy` and `NetworkConnector` service name constants. Verified in us-west-2: 3 passed - test_basic_function_with_tenancy_config - test_basic_network_connector - test_network_connector_with_custom_role --- integration/config/service_names.py | 2 ++ integration/single/test_basic_function.py | 4 ++-- integration/single/test_basic_network_connector.py | 6 +++++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/integration/config/service_names.py b/integration/config/service_names.py index dd26fdc1c..e14bc9d83 100644 --- a/integration/config/service_names.py +++ b/integration/config/service_names.py @@ -33,6 +33,8 @@ LAMBDA_URL = "LambdaUrl" LAMBDA_MANAGED_INSTANCES = "LambdaManagedInstances" MICROVM_IMAGE = "MicrovmImage" +MULTI_TENANCY = "MultiTenancy" +NETWORK_CONNECTOR = "NetworkConnector" WEB_FUNCTION = "WebFunction" LAMBDA_ENV_VARS = "LambdaEnvVars" EVENT_INVOKE_CONFIG = "EventInvokeConfig" diff --git a/integration/single/test_basic_function.py b/integration/single/test_basic_function.py index 6ce23da98..0740182db 100644 --- a/integration/single/test_basic_function.py +++ b/integration/single/test_basic_function.py @@ -11,6 +11,7 @@ HTTP_API, KMS, LAMBDA_URL, + MULTI_TENANCY, XRAY, ) from integration.helpers.base_test import BaseTest @@ -394,8 +395,7 @@ def _verify_get_request(self, url, expected_text): response = self.verify_get_request_response(url, 200) self.assertEqual(response.text, expected_text) - # @skipIf(current_region_does_not_support([MULTI_TENANCY]), "Multi-tenancy is not supported in this testing region") - @skipIf(True, "Multi-tenancy feature is not available to test yet") + @skipIf(current_region_does_not_support([MULTI_TENANCY]), "Multi-tenancy is not supported in this testing region") def test_basic_function_with_tenancy_config(self): """ Creates a basic lambda function with TenancyConfig diff --git a/integration/single/test_basic_network_connector.py b/integration/single/test_basic_network_connector.py index 8e7b6dbc7..80cb285f9 100644 --- a/integration/single/test_basic_network_connector.py +++ b/integration/single/test_basic_network_connector.py @@ -3,12 +3,16 @@ import pytest +from integration.config.service_names import NETWORK_CONNECTOR from integration.helpers.base_test import BaseTest +from integration.helpers.resource import current_region_does_not_support LOG = logging.getLogger(__name__) -@skipIf(True, "NetworkConnector is not yet GA - enable when RIP feature flag is available") +@skipIf( + current_region_does_not_support([NETWORK_CONNECTOR]), "NetworkConnector is not supported in this testing region" +) class TestBasicNetworkConnector(BaseTest): """ Basic AWS::Serverless::NetworkConnector tests