From 9b966ba3f00cdbfd8c2a50a0e9a1d9a448a5a301 Mon Sep 17 00:00:00 2001 From: Alex Moinet Date: Wed, 19 Feb 2025 11:48:00 +0000 Subject: [PATCH] Fix tests --- test/e2e/aws-sam/features/invoke.feature | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/test/e2e/aws-sam/features/invoke.feature b/test/e2e/aws-sam/features/invoke.feature index a825493c..72df5295 100644 --- a/test/e2e/aws-sam/features/invoke.feature +++ b/test/e2e/aws-sam/features/invoke.feature @@ -74,17 +74,21 @@ Scenario: Executing a lambda function that returns a HTML body And the SAM exit code equals 0 Scenario: Executing a lambda function that returns nothing - + Given I invoke the "NoResponseFunction" lambda in "features/fixtures/ruby-app" + And the lambda response "body" is null + And the lambda response "statusCode" equals 200 + And the SAM exit code equals 0 Scenario: Executing a lambda function that fails with no internal errors Given I invoke the "ProcessExitFunction" lambda in "features/fixtures/node-app" - Then the lambda response "errorMessage" contains "this is an error" - And the lambda response "errorType" equals "Error" + Then the lambda response "errorMessage" contains "Error: Runtime exited with error: exit status 1" + And the lambda response "errorType" equals "Runtime.ExitError" And the lambda response "body" is null And the SAM exit code equals 0 Scenario: Executing a lambda function that fails with an internal error - Given I invoke the "NoResponseFunction" lambda in "features/fixtures/ruby-app" + Given I invoke the "ThrownErrorFunction" lambda in "features/fixtures/node-app" + Then the lambda response "errorMessage" contains "this is an error" + And the lambda response "errorType" equals "Error" And the lambda response "body" is null - And the lambda response "statusCode" equals 200 And the SAM exit code equals 0