From cc45c1e7f4efad42c0a2255a4cdcb1f989c79dea Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Le Duigou Date: Wed, 3 Apr 2024 19:48:39 +0000 Subject: [PATCH] =?UTF-8?q?fix:=20=F0=9F=A7=AA=20add=20failing=20test?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- handler.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/handler.go b/handler.go index 41abea2..363bc05 100644 --- a/handler.go +++ b/handler.go @@ -4,8 +4,10 @@ import ( "context" "log/slog" "os" + "testing" "github.com/aws/aws-lambda-go/lambdacontext" + "github.com/stretchr/testify/assert" ) type LambdaHandler struct { @@ -51,3 +53,11 @@ func getLogLevel() slog.Leveler { return l } + +func TestUsingNonAwsContextShouldNotError(t *testing.T) { + ctx := context.Background() + + h := NewAWSLambdaHandler(ctx, nil) + + assert.NotNil(t, h) +}