From fd1ee2da211ff175778ffb0dc6d53da3d44b771a Mon Sep 17 00:00:00 2001 From: Mingkun He Date: Wed, 29 Jun 2022 17:30:07 -0700 Subject: [PATCH 1/2] add skip condition for EFS test --- .../combination/test_function_with_file_system_config.py | 5 +++++ integration/config/service_names.py | 1 + 2 files changed, 6 insertions(+) diff --git a/integration/combination/test_function_with_file_system_config.py b/integration/combination/test_function_with_file_system_config.py index 48d357b5be..aa391ba3ad 100644 --- a/integration/combination/test_function_with_file_system_config.py +++ b/integration/combination/test_function_with_file_system_config.py @@ -1,6 +1,11 @@ +from unittest.case import skipIf + +from integration.config.service_names import EFS from integration.helpers.base_test import BaseTest +from integration.helpers.resource import current_region_not_included class TestFunctionWithFileSystemConfig(BaseTest): + @skipIf(current_region_not_included([EFS]), "EFS is not supported in this testing region") def test_function_with_efs_integration(self): self.create_and_verify_stack("combination/function_with_file_system_config") diff --git a/integration/config/service_names.py b/integration/config/service_names.py index 6862586a70..ec94e1e98c 100644 --- a/integration/config/service_names.py +++ b/integration/config/service_names.py @@ -21,3 +21,4 @@ SQS = "SQS" CUSTOM_DOMAIN = "CustomDomain" ARM = "ARM" +EFS = "EFS" From 5bb863501c686719cd14a7d96ca3dc84cbbc0a0d Mon Sep 17 00:00:00 2001 From: Mingkun He Date: Wed, 29 Jun 2022 17:35:30 -0700 Subject: [PATCH 2/2] use correct skip method --- .../combination/test_function_with_file_system_config.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/integration/combination/test_function_with_file_system_config.py b/integration/combination/test_function_with_file_system_config.py index aa391ba3ad..50b5b8b209 100644 --- a/integration/combination/test_function_with_file_system_config.py +++ b/integration/combination/test_function_with_file_system_config.py @@ -2,10 +2,10 @@ from integration.config.service_names import EFS from integration.helpers.base_test import BaseTest -from integration.helpers.resource import current_region_not_included +from integration.helpers.resource import current_region_does_not_support class TestFunctionWithFileSystemConfig(BaseTest): - @skipIf(current_region_not_included([EFS]), "EFS is not supported in this testing region") + @skipIf(current_region_does_not_support([EFS]), "EFS is not supported in this testing region") def test_function_with_efs_integration(self): self.create_and_verify_stack("combination/function_with_file_system_config")