Add end-to-end integration tests#619
Conversation
| workflow_dispatch: | ||
| push: | ||
| branches: [ main ] | ||
| paths: |
There was a problem hiding this comment.
Same here the test should be run for most packages, at least the one that are involved.
core, serialization, runtime-interface-client, log4j and i would also add events.
| - uses: actions/checkout@v6 | ||
|
|
||
| - name: Set up JDK | ||
| uses: actions/setup-java@v5 |
There was a problem hiding this comment.
Same here and in all other references to github actions.
| group: integration-test | ||
| cancel-in-progress: false | ||
| steps: | ||
| - uses: actions/checkout@v6 |
There was a problem hiding this comment.
add the commit sha to prevent supply chain attacks.
| # integration test script for aws-lambda-java-log4j2. | ||
| # invokes the deployed lambda function and verifies logs appear in CloudWatch. | ||
|
|
||
| set -euo pipefail |
There was a problem hiding this comment.
For the moment it's sufficient like this but we probably can do something more advanced. For example we can create a Java project that uses a something like JUNIT to run the AWS SDK invoke the function and then get the logs.
In this way we avoid doing scripting and we can also have a nice report for how the test has gone.
|
|
||
| - name: Install log4j2 with Maven | ||
| run: | | ||
| export JAVA_HOME=$JAVA_HOME_8_X64 |
There was a problem hiding this comment.
let's make sure we run integ test on both architectures. You can use a matrix job to do this (ie: https://github.com/aws/aws-lambda-ruby-runtime-interface-client/blob/main/.github/workflows/integration-tests.yml#L32)
39f30ee to
0e35558
Compare
f78d3ce to
cb9c4f6
Compare
Add end-to-end integration tests for aws-lambda-java-log4j2
Adds integration tests that deploy a Lambda function using aws-lambda-java-log4j2, invoke it, and verify logs arrive in CloudWatch. This catches the main regression path: Log4j2 plugin discovery failing due to a missing Log4j2Plugins.dat in the shaded JAR.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.