Skip to content

Commit

Permalink
Making pytest happy with e2e tests
Browse files Browse the repository at this point in the history
  • Loading branch information
leandrodamascena committed Sep 12, 2024
1 parent 805b527 commit 6102353
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions tests/e2e/event_handler/infrastructure.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from typing import Dict, List, Optional

from aws_cdk import CfnOutput
from aws_cdk import CfnOutput, Duration
from aws_cdk import aws_apigateway as apigwv1
from aws_cdk import aws_apigatewayv2_alpha as apigwv2
from aws_cdk import aws_apigatewayv2_authorizers_alpha as apigwv2authorizers
Expand All @@ -15,7 +15,7 @@

class EventHandlerStack(BaseInfrastructure):
def create_resources(self):
functions = self.create_lambda_functions()
functions = self.create_lambda_functions(function_props={"timeout": Duration.seconds(10)})

self._create_alb(function=[functions["AlbHandler"], functions["AlbHandlerWithBodyNone"]])
self._create_api_gateway_rest(function=[functions["ApiGatewayRestHandler"], functions["OpenapiHandler"]])
Expand Down
4 changes: 2 additions & 2 deletions tests/e2e/streaming/infrastructure.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from pathlib import Path

from aws_cdk import CfnOutput, RemovalPolicy
from aws_cdk import CfnOutput, Duration, RemovalPolicy
from aws_cdk import aws_s3 as s3
from aws_cdk import aws_s3_deployment as s3deploy

Expand All @@ -9,7 +9,7 @@

class StreamingStack(BaseInfrastructure):
def create_resources(self):
functions = self.create_lambda_functions()
functions = self.create_lambda_functions(function_props={"timeout": Duration.seconds(10)})

regular_bucket = s3.Bucket(
self.stack,
Expand Down
4 changes: 2 additions & 2 deletions tests/e2e/utils/infrastructure.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

import boto3
import pytest
from aws_cdk import App, CfnOutput, Duration, Environment, RemovalPolicy, Stack, aws_logs
from aws_cdk import App, CfnOutput, Environment, RemovalPolicy, Stack, aws_logs
from aws_cdk.aws_lambda import (
Architecture,
Code,
Expand Down Expand Up @@ -148,7 +148,7 @@ def create_lambda_functions(
**function_settings_override,
}

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

aws_logs.LogGroup(
self.stack,
Expand Down

0 comments on commit 6102353

Please sign in to comment.