Skip to content

Commit 6102353

Browse files
Making pytest happy with e2e tests
1 parent 805b527 commit 6102353

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

tests/e2e/event_handler/infrastructure.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from typing import Dict, List, Optional
22

3-
from aws_cdk import CfnOutput
3+
from aws_cdk import CfnOutput, Duration
44
from aws_cdk import aws_apigateway as apigwv1
55
from aws_cdk import aws_apigatewayv2_alpha as apigwv2
66
from aws_cdk import aws_apigatewayv2_authorizers_alpha as apigwv2authorizers
@@ -15,7 +15,7 @@
1515

1616
class EventHandlerStack(BaseInfrastructure):
1717
def create_resources(self):
18-
functions = self.create_lambda_functions()
18+
functions = self.create_lambda_functions(function_props={"timeout": Duration.seconds(10)})
1919

2020
self._create_alb(function=[functions["AlbHandler"], functions["AlbHandlerWithBodyNone"]])
2121
self._create_api_gateway_rest(function=[functions["ApiGatewayRestHandler"], functions["OpenapiHandler"]])

tests/e2e/streaming/infrastructure.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from pathlib import Path
22

3-
from aws_cdk import CfnOutput, RemovalPolicy
3+
from aws_cdk import CfnOutput, Duration, RemovalPolicy
44
from aws_cdk import aws_s3 as s3
55
from aws_cdk import aws_s3_deployment as s3deploy
66

@@ -9,7 +9,7 @@
99

1010
class StreamingStack(BaseInfrastructure):
1111
def create_resources(self):
12-
functions = self.create_lambda_functions()
12+
functions = self.create_lambda_functions(function_props={"timeout": Duration.seconds(10)})
1313

1414
regular_bucket = s3.Bucket(
1515
self.stack,

tests/e2e/utils/infrastructure.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
import boto3
1212
import pytest
13-
from aws_cdk import App, CfnOutput, Duration, Environment, RemovalPolicy, Stack, aws_logs
13+
from aws_cdk import App, CfnOutput, Environment, RemovalPolicy, Stack, aws_logs
1414
from aws_cdk.aws_lambda import (
1515
Architecture,
1616
Code,
@@ -148,7 +148,7 @@ def create_lambda_functions(
148148
**function_settings_override,
149149
}
150150

151-
function = Function(self.stack, **function_settings, memory_size=512, timeout=Duration.seconds(10))
151+
function = Function(self.stack, **function_settings)
152152

153153
aws_logs.LogGroup(
154154
self.stack,

0 commit comments

Comments
 (0)