Skip to content

Commit fca7537

Browse files
committed
Print function error on failure in E2E tests.
1 parent 9bb882e commit fca7537

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

powertools-e2e-tests/src/test/java/software/amazon/lambda/powertools/LambdaMetadataE2ET.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ void test_getMetadata() throws Exception {
6262

6363
// THEN
6464
assertThat(invocationResult.getFunctionError())
65-
.describedAs("Lambda function failed: %s", invocationResult.getResult())
65+
.describedAs("Lambda function failed: %s", invocationResult.getFunctionError())
6666
.isNull();
6767

6868
JsonNode response = JsonConfig.get().getObjectMapper().readTree(invocationResult.getResult());
@@ -78,10 +78,10 @@ void test_metadataCaching() throws Exception {
7878

7979
// THEN - both should return the same AZ ID (cached within sandbox)
8080
assertThat(firstResult.getFunctionError())
81-
.describedAs("Lambda function failed on first invocation: %s", firstResult.getResult())
81+
.describedAs("Lambda function failed on first invocation: %s", firstResult.getFunctionError())
8282
.isNull();
8383
assertThat(secondResult.getFunctionError())
84-
.describedAs("Lambda function failed on second invocation: %s", secondResult.getResult())
84+
.describedAs("Lambda function failed on second invocation: %s", secondResult.getFunctionError())
8585
.isNull();
8686

8787
JsonNode firstResponse = JsonConfig.get().getObjectMapper().readTree(firstResult.getResult());

0 commit comments

Comments
 (0)