Skip to content

Commit b9427af

Browse files
authored
fix: skip tests if Logs resources aren't available (#3570)
1 parent 6d3b39f commit b9427af

File tree

3 files changed

+12
-3
lines changed

3 files changed

+12
-3
lines changed

integration/combination/test_function_with_all_event_types.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
from unittest.case import skipIf
22

3-
from integration.config.service_names import IOT, SCHEDULE_EVENT
3+
from integration.config.service_names import IOT, LOGS, SCHEDULE_EVENT
44
from integration.helpers.base_test import BaseTest
55
from integration.helpers.resource import current_region_does_not_support, generate_suffix
66

77

88
@skipIf(
9-
current_region_does_not_support([IOT, SCHEDULE_EVENT]),
10-
"IoT, ScheduleEvent is not supported in this testing region",
9+
current_region_does_not_support([IOT, SCHEDULE_EVENT, LOGS]),
10+
"IoT, ScheduleEvent or a Logs resource is not supported in this testing region",
1111
)
1212
class TestFunctionWithAllEventTypes(BaseTest):
1313
def test_function_with_all_event_types(self):

integration/combination/test_function_with_cloudwatch_log.py

+8
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
1+
from unittest.case import skipIf
2+
3+
from integration.config.service_names import LOGS
14
from integration.helpers.base_test import BaseTest
5+
from integration.helpers.resource import current_region_does_not_support
26

37

8+
@skipIf(
9+
current_region_does_not_support([LOGS]),
10+
"A Logs resource that is a part of this test is not supported in this testing region",
11+
)
412
class TestFunctionWithCloudWatchLog(BaseTest):
513
def test_function_with_cloudwatch_log(self):
614
self.create_and_verify_stack("combination/function_with_cloudwatch_log")

integration/config/service_names.py

+1
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,4 @@
3535
API_KEY = "ApiKey"
3636
APP_SYNC = "AppSync"
3737
SNS_FILTER_POLICY_SCOPE = "SnsFilterPolicyScope"
38+
LOGS = "Logs"

0 commit comments

Comments
 (0)