From a90a4513e1444d1efc9e2012b2dccd083f0bec28 Mon Sep 17 00:00:00 2001 From: Ryan Baxter <524254+ryanjbaxter@users.noreply.github.com> Date: Thu, 4 May 2023 11:39:01 -0400 Subject: [PATCH] Set credentials via system property --- .../cloud/config/server/AwsS3IntegrationTests.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/AwsS3IntegrationTests.java b/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/AwsS3IntegrationTests.java index 88aace79..b945edf7 100644 --- a/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/AwsS3IntegrationTests.java +++ b/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/AwsS3IntegrationTests.java @@ -69,6 +69,8 @@ public class AwsS3IntegrationTests { @BeforeAll public static void startConfigServer() throws IOException, InterruptedException, JSONException { + System.setProperty("aws.accessKeyId", localstack.getAccessKey()); + System.setProperty("aws.secretAccessKey", localstack.getSecretKey()); server = SpringApplication.run(new Class[] {TestConfigServerApplication.class, S3AutoConfiguration.class}, new String[] {"--spring.config.name=server", "--spring.profiles.active=awss3", "--server.port=" + configServerPort, @@ -107,6 +109,8 @@ public class AwsS3IntegrationTests { @AfterAll public static void after() { server.close(); + System.clearProperty("aws.accessKeyId"); + System.clearProperty("aws.secretAccessKey"); } @Test