File tree Expand file tree Collapse file tree 4 files changed +54
-4
lines changed
src/test/java/software/amazon/lambda/powertools Expand file tree Collapse file tree 4 files changed +54
-4
lines changed 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 296
296
<dependency >
297
297
<groupId >ch.qos.logback</groupId >
298
298
<artifactId >logback-classic</artifactId >
299
- <version >1.4.7 </version >
299
+ <version >1.3.8 </version >
300
300
<scope >test</scope >
301
301
</dependency >
302
302
<dependency >
Original file line number Diff line number Diff line change 29
29
<dependency >
30
30
<groupId >ch.qos.logback</groupId >
31
31
<artifactId >logback-classic</artifactId >
32
- <version >1.4.7 </version >
32
+ <version >1.3.8 </version >
33
33
</dependency >
34
34
35
35
<dependency >
Original file line number Diff line number Diff line change 10
10
11
11
import java .time .Year ;
12
12
import java .util .Collections ;
13
+ import java .util .UUID ;
13
14
import java .util .concurrent .TimeUnit ;
14
15
15
16
import static software .amazon .lambda .powertools .testutils .lambda .LambdaInvoker .invokeFunction ;
@@ -21,11 +22,12 @@ public class IdempotencyE2ET {
21
22
@ BeforeAll
22
23
@ Timeout (value = 5 , unit = TimeUnit .MINUTES )
23
24
public static void setup () {
25
+ String random = UUID .randomUUID ().toString ().substring (0 , 6 );
24
26
infrastructure = Infrastructure .builder ()
25
27
.testName (IdempotencyE2ET .class .getSimpleName ())
26
28
.pathToFunction ("idempotency" )
27
- .idempotencyTable ("idempo" )
28
- .environmentVariables (Collections .singletonMap ("IDEMPOTENCY_TABLE" , "idempo" ))
29
+ .idempotencyTable ("idempo" + random )
30
+ .environmentVariables (Collections .singletonMap ("IDEMPOTENCY_TABLE" , "idempo" + random ))
29
31
.build ();
30
32
functionName = infrastructure .deploy ();
31
33
}
You can’t perform that action at this time.
0 commit comments