From 532fb9327d0f5c85540e0c5dec8d3945c8709e9b Mon Sep 17 00:00:00 2001 From: buildmaster Date: Fri, 10 Feb 2023 00:26:36 +0000 Subject: [PATCH] Bumping versions --- .../cloud/config/server/AwsS3IntegrationTests.java | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) 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 7317cb2f..5a14613d 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 @@ -65,10 +65,10 @@ public class AwsS3IntegrationTests { @BeforeAll public static void startConfigServer() throws IOException, InterruptedException, JSONException { server = SpringApplication.run( - new Class[] { TestConfigServerApplication.class, ContextResourceLoaderConfiguration.class, CredentialsProvider.class }, + new Class[] { TestConfigServerApplication.class, ContextResourceLoaderConfiguration.class, + CredentialsProvider.class }, new String[] { "--spring.config.name=server", "--spring.profiles.active=awss3", - "--spring.main.allow-bean-definition-overriding=true", - "--server.port=" + configServerPort, + "--spring.main.allow-bean-definition-overriding=true", "--server.port=" + configServerPort, "--spring.cloud.config.server.awss3.endpoint=" + localstack.getEndpointOverride(LocalStackContainer.Service.S3).toString(), "--spring.cloud.config.server.awss3.bucket=test-bucket", @@ -105,14 +105,18 @@ public class AwsS3IntegrationTests { public static void after() { server.close(); } + @Configuration static class CredentialsProvider { - //Override the bean from spring cloud aws to provide our own credentials for localstack + // Override the bean from spring cloud aws to provide our own credentials for + // localstack @Bean("io.awspring.cloud.core.credentials.CredentialsProviderFactoryBean.BEAN_NAME") public AWSCredentialsProvider provider() { - return new AWSStaticCredentialsProvider(new BasicAWSCredentials(localstack.getAccessKey(), localstack.getSecretKey())); + return new AWSStaticCredentialsProvider( + new BasicAWSCredentials(localstack.getAccessKey(), localstack.getSecretKey())); } + } }