File tree Expand file tree Collapse file tree
src/test/java/software/amazon/lambda/powertools Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Run end-to-end tests
2+
3+ on :
4+ workflow_dispatch :
5+
6+ push :
7+ branches : [main]
8+ paths : # add other modules when there are under e2e tests
9+ - ' powertools-e2e-tests/**'
10+ - ' powertools-core/**'
11+ - ' powertools-serialization/**'
12+ - ' powertools-logging/**'
13+ - ' powertools-tracing/**'
14+ - ' powertools-idempotency/**'
15+ - ' powertools-parameters/**'
16+ - ' powertools-metrics/**'
17+ - ' pom.xml'
18+ - ' .github/workflows/**'
19+
20+ jobs :
21+ e2e :
22+ runs-on : ubuntu-latest
23+ strategy :
24+ max-parallel : 3
25+ matrix :
26+ java : [ 8, 11, 17 ]
27+ name : End-to-end tests java${{ matrix.java }}
28+ env :
29+ JAVA_VERSION : ${{ matrix.java }}
30+ AWS_DEFAULT_REGION : eu-west-1
31+ permissions :
32+ id-token : write # needed to interact with GitHub's OIDC Token endpoint.
33+ contents : read
34+ steps :
35+ - uses : actions/checkout@v3
36+ - name : Setup java
37+ uses : actions/setup-java@v3
38+ with :
39+ distribution : ' corretto'
40+ java-version : ${{ matrix.java }}
41+ cache : maven
42+ - name : Setup AWS credentials
43+ uses : aws-actions/configure-aws-credentials@v1.6.1
44+ with :
45+ role-to-assume : ${{ secrets.AWS_ROLE_ARN_TO_ASSUME }}
46+ aws-region : ${{ env.AWS_DEFAULT_REGION }}
47+ - name : Run e2e test with Maven
48+ run : mvn -Pe2e -B verify --file powertools-e2e-tests/pom.xml
Original file line number Diff line number Diff line change 296296 <dependency >
297297 <groupId >ch.qos.logback</groupId >
298298 <artifactId >logback-classic</artifactId >
299- <version >1.4.7 </version >
299+ <version >1.3.8 </version >
300300 <scope >test</scope >
301301 </dependency >
302302 <dependency >
Original file line number Diff line number Diff line change 2929 <dependency >
3030 <groupId >ch.qos.logback</groupId >
3131 <artifactId >logback-classic</artifactId >
32- <version >1.4.7 </version >
32+ <version >1.3.8 </version >
3333 </dependency >
3434
3535 <dependency >
Original file line number Diff line number Diff line change 1010
1111import java .time .Year ;
1212import java .util .Collections ;
13+ import java .util .UUID ;
1314import java .util .concurrent .TimeUnit ;
1415
1516import static software .amazon .lambda .powertools .testutils .lambda .LambdaInvoker .invokeFunction ;
@@ -21,11 +22,12 @@ public class IdempotencyE2ET {
2122 @ BeforeAll
2223 @ Timeout (value = 5 , unit = TimeUnit .MINUTES )
2324 public static void setup () {
25+ String random = UUID .randomUUID ().toString ().substring (0 , 6 );
2426 infrastructure = Infrastructure .builder ()
2527 .testName (IdempotencyE2ET .class .getSimpleName ())
2628 .pathToFunction ("idempotency" )
27- .idempotencyTable ("idempo" )
28- .environmentVariables (Collections .singletonMap ("IDEMPOTENCY_TABLE" , "idempo" ))
29+ .idempotencyTable ("idempo" + random )
30+ .environmentVariables (Collections .singletonMap ("IDEMPOTENCY_TABLE" , "idempo" + random ))
2931 .build ();
3032 functionName = infrastructure .deploy ();
3133 }
You can’t perform that action at this time.
0 commit comments