Skip to content

Commit 507fa1e

Browse files
authored
Add required skipifs for integration tests (#2462)
1 parent d2fcfdd commit 507fa1e

12 files changed

+84
-8
lines changed

integration/combination/test_api_with_authorizer_apikey.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,15 @@
1+
from unittest.case import skipIf
2+
13
from integration.helpers.base_test import BaseTest
24
from integration.helpers.deployer.utils.retry import retry
35
from integration.helpers.exception import StatusCodeError
46

57

8+
from integration.helpers.resource import current_region_does_not_support
9+
from integration.config.service_names import REST_API
10+
11+
12+
@skipIf(current_region_does_not_support([REST_API]), "RestApi is not supported in this testing region")
613
class TestApiWithAuthorizerApiKey(BaseTest):
714
def test_authorizer_apikey(self):
815
self.create_and_verify_stack("combination/api_with_authorizer_apikey")

integration/combination/test_api_with_disable_execute_api_endpoint.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,14 @@
1+
from unittest.case import skipIf
12
from parameterized import parameterized
23

34
from integration.helpers.base_test import BaseTest
45

56

7+
from integration.helpers.resource import current_region_does_not_support
8+
from integration.config.service_names import REST_API
9+
10+
11+
@skipIf(current_region_does_not_support([REST_API]), "RestApi is not supported in this testing region")
612
class TestApiWithDisableExecuteApiEndpoint(BaseTest):
713
@parameterized.expand(
814
[

integration/combination/test_api_with_fail_on_warnings.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
1+
from unittest.case import skipIf
12
from parameterized import parameterized
23

34
from integration.helpers.base_test import BaseTest
5+
from integration.helpers.resource import current_region_does_not_support
6+
from integration.config.service_names import REST_API
47

58

9+
@skipIf(current_region_does_not_support([REST_API]), "RestApi is not supported in this testing region")
610
class TestApiWithFailOnWarnings(BaseTest):
711
@parameterized.expand(
812
[

integration/combination/test_function_with_kinesis.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ def test_function_with_kinesis_trigger(self):
2929
self.assertEqual(event_source_mapping_kinesis_stream_arn, kinesis_stream["StreamARN"])
3030

3131

32+
@skipIf(current_region_does_not_support([KINESIS]), "Kinesis is not supported in this testing region")
3233
class TestFunctionWithKinesisIntrinsics(BaseTest):
3334
def test_function_with_kinesis_trigger(self):
3435
self.create_and_verify_stack("combination/function_with_kinesis_intrinsics")

integration/combination/test_state_machine_with_api.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,16 @@
1+
from unittest.case import skipIf
12
from integration.helpers.base_test import BaseTest
23
from integration.helpers.common_api import get_policy_statements
34

45

6+
from integration.helpers.resource import current_region_does_not_support
7+
from integration.config.service_names import STATE_MACHINE_WITH_APIS
8+
9+
10+
@skipIf(
11+
current_region_does_not_support([STATE_MACHINE_WITH_APIS]),
12+
"StateMachine with APIs is not supported in this testing region",
13+
)
514
class TestStateMachineWithApi(BaseTest):
615
def test_state_machine_with_api(self):
716
self.create_and_verify_stack("combination/state_machine_with_api")

integration/combination/test_state_machine_with_cwe.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,15 @@
1+
from unittest.case import skipIf
12
from integration.helpers.base_test import BaseTest
23
from integration.helpers.common_api import get_policy_statements
34

5+
from integration.helpers.resource import current_region_does_not_support
6+
from integration.config.service_names import STATE_MACHINE_CWE_CWS
47

8+
9+
@skipIf(
10+
current_region_does_not_support([STATE_MACHINE_CWE_CWS]),
11+
"StateMachineCWECWS is not supported in this testing region",
12+
)
513
class TestStateMachineWithCwe(BaseTest):
614
def test_state_machine_with_cwe(self):
715
self.create_and_verify_stack("combination/state_machine_with_cwe")

integration/combination/test_state_machine_with_cwe_dlq_and_retry_policy.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,13 @@
22

33
from integration.helpers.base_test import BaseTest
44
from integration.helpers.resource import current_region_does_not_support
5-
from integration.config.service_names import CWE_CWS_DLQ
5+
from integration.config.service_names import CWE_CWS_DLQ, STATE_MACHINE_CWE_CWS
66

77

8-
@skipIf(current_region_does_not_support([CWE_CWS_DLQ]), "CweCwsDlq is not supported in this testing region")
8+
@skipIf(
9+
current_region_does_not_support([CWE_CWS_DLQ, STATE_MACHINE_CWE_CWS]),
10+
"CweCwsDlq is not supported in this testing region",
11+
)
912
class TestStateMachineWithCweDlqAndRetryPolicy(BaseTest):
1013
def test_state_machine_with_api(self):
1114
self.create_and_verify_stack("combination/state_machine_with_cwe_with_dlq_and_retry_policy")

integration/combination/test_state_machine_with_cwe_dlq_generated.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,13 @@
33
from integration.helpers.base_test import BaseTest
44
from integration.helpers.common_api import get_policy_statements, get_queue_policy
55
from integration.helpers.resource import current_region_does_not_support
6-
from integration.config.service_names import CWE_CWS_DLQ
6+
from integration.config.service_names import CWE_CWS_DLQ, STATE_MACHINE_CWE_CWS
77

88

9-
@skipIf(current_region_does_not_support([CWE_CWS_DLQ]), "CweCwsDlq is not supported in this testing region")
9+
@skipIf(
10+
current_region_does_not_support([CWE_CWS_DLQ, STATE_MACHINE_CWE_CWS]),
11+
"CweCwsDlq is not supported in this testing region",
12+
)
1013
class TestStateMachineWithCweDlqGenerated(BaseTest):
1114
def test_state_machine_with_cwe(self):
1215
self.create_and_verify_stack("combination/state_machine_with_cwe_dlq_generated")

integration/combination/test_state_machine_with_schedule.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,16 @@
1+
from unittest.case import skipIf
12
from integration.helpers.base_test import BaseTest
23
from integration.helpers.common_api import get_policy_statements
34

45

6+
from integration.helpers.resource import current_region_does_not_support
7+
from integration.config.service_names import STATE_MACHINE_CWE_CWS
8+
9+
10+
@skipIf(
11+
current_region_does_not_support([STATE_MACHINE_CWE_CWS]),
12+
"StateMachine CweCws is not supported in this testing region",
13+
)
514
class TestStateMachineWithSchedule(BaseTest):
615
def test_state_machine_with_schedule(self):
716
self.create_and_verify_stack("combination/state_machine_with_schedule")

integration/config/service_names.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@
2626
S3_EVENTS = "S3Events"
2727
SELF_MANAGED_KAFKA = "SelfManagedKafka"
2828
SECRET_MANAGER = "SecretsManager"
29-
STATE_MACHINE = "StepFunctions"
29+
STATE_MACHINE_INLINE_DEFINITION = "StateMachineInlineDefinition"
30+
STATE_MACHINE_CWE_CWS = "StateMachineCweCws"
31+
STATE_MACHINE_WITH_APIS = "StateMachineWithApis"
3032
LAMBDA_URL = "LambdaUrl"
33+
LAMBDA_ENV_VARS = "LambdaEnvVars"
3134
EVENT_INVOKE_CONFIG = "EventInvokeConfig"
35+
EPHEMERAL_STORAGE = "EphemeralStorage"

0 commit comments

Comments
 (0)