Skip to content

Commit 3daee2f

Browse files
authored
ci: stabilize testcontainers step for scheduled workflow (#18)
* ci: stabilize testcontainers step for scheduled workflow * fix(ci): pass LocalStack auth token to Testcontainers
1 parent 0cf526a commit 3daee2f

2 files changed

Lines changed: 4 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ jobs:
9090
AWS_ACCESS_KEY_ID: test
9191
AWS_SECRET_ACCESS_KEY: test
9292
AWS_REGION: us-east-1
93+
LOCALSTACK_AUTH_TOKEN: ${{ secrets.LOCALSTACK_AUTH_TOKEN }}
9394
run: |
9495
mvn test -Dtest=dev.ancaghenade.shipmentlistdemo.integrationtests.ShipmentServiceIntegrationTest
9596

src/test/java/dev/ancaghenade/shipmentlistdemo/integrationtests/LocalStackSetupConfigurations.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,11 +65,14 @@
6565
@Testcontainers
6666
@SpringBootTest(webEnvironment = WebEnvironment.DEFINED_PORT)
6767
public class LocalStackSetupConfigurations {
68+
private static final String LOCALSTACK_AUTH_TOKEN = System.getenv().getOrDefault(
69+
"LOCALSTACK_AUTH_TOKEN", "");
6870

6971
@Container
7072
protected static LocalStackContainer localStack =
7173
new LocalStackContainer(DockerImageName.parse("localstack/localstack:latest"))
7274
.withEnv("LOCALSTACK_HOST", "localhost.localstack.cloud")
75+
.withEnv("LOCALSTACK_AUTH_TOKEN", LOCALSTACK_AUTH_TOKEN)
7376
.withEnv("LAMBDA_RUNTIME_ENVIRONMENT_TIMEOUT", "60")
7477
.withEnv("DEBUG", "1");
7578

0 commit comments

Comments
 (0)