Skip to content

Commit d2fcfdd

Browse files
authored
chore: Skip self managed kafka tests (#2461)
* Skip self managed kafka tests * Black reformatting * Add service names for exclusion list
1 parent a61c3d8 commit d2fcfdd

File tree

3 files changed

+19
-12
lines changed

3 files changed

+19
-12
lines changed

integration/combination/test_function_with_self_managed_kafka.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,18 @@
1+
import pytest
2+
13
from integration.helpers.base_test import BaseTest
4+
from integration.helpers.resource import current_region_not_included
5+
6+
from integration.config.service_names import SELF_MANAGED_KAFKA
27
from parameterized import parameterized
38

49

10+
@skipIf(
11+
current_region_not_included([SELF_MANAGED_KAFKA]),
12+
"SelfManagedKafka testing is not performed in this testing region",
13+
)
514
class TestFunctionWithSelfManagedKafka(BaseTest):
15+
@pytest.mark.flaky(reruns=5)
616
@parameterized.expand(
717
[
818
"combination/function_with_self_managed_kafka",

integration/config/service_names.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,8 @@
2424
ARM = "ARM"
2525
EFS = "EFS"
2626
S3_EVENTS = "S3Events"
27+
SELF_MANAGED_KAFKA = "SelfManagedKafka"
28+
SECRET_MANAGER = "SecretsManager"
29+
STATE_MACHINE = "StepFunctions"
30+
LAMBDA_URL = "LambdaUrl"
31+
EVENT_INVOKE_CONFIG = "EventInvokeConfig"

integration/single/test_function_with_http_api_and_auth.py

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,19 @@
1-
import logging
21
from unittest.case import skipIf
32

4-
from tenacity import stop_after_attempt, retry_if_exception_type, after_log, wait_exponential, retry, wait_random
3+
import pytest
54

65
from integration.helpers.base_test import BaseTest
76
from integration.helpers.resource import current_region_does_not_support
7+
from integration.config.service_names import HTTP_API
88

9-
LOG = logging.getLogger(__name__)
109

11-
12-
@skipIf(current_region_does_not_support(["HttpApi"]), "HttpApi is not supported in this testing region")
10+
@skipIf(current_region_does_not_support([HTTP_API]), "HttpApi is not supported in this testing region")
1311
class TestFunctionWithHttpApiAndAuth(BaseTest):
1412
"""
1513
AWS::Lambda::Function tests with http api events and auth
1614
"""
1715

18-
@retry(
19-
stop=stop_after_attempt(5),
20-
wait=wait_exponential(multiplier=1, min=4, max=10) + wait_random(0, 1),
21-
retry=retry_if_exception_type(AssertionError),
22-
after=after_log(LOG, logging.WARNING),
23-
reraise=True,
24-
)
16+
@pytest.mark.flaky(reruns=5)
2517
def test_function_with_http_api_and_auth(self):
2618
# If the request is not signed, which none of the below are, IAM will respond with a "Forbidden" message.
2719
# We are not testing that IAM auth works here, we are simply testing if it was applied.

0 commit comments

Comments
 (0)