You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ac...@apache.org on 2020/09/11 06:15:12 UTC

[camel] branch master updated: Camel-AWS2-S3: Provide a credentials provider for s3client of localstack instance

This is an automated email from the ASF dual-hosted git repository.

acosentino pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/master by this push:
     new 0c898f6  Camel-AWS2-S3: Provide a credentials provider for s3client of localstack instance
0c898f6 is described below

commit 0c898f6c5227c1bfdcd907e0efc6dd2b397eaa20
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Fri Sep 11 08:14:18 2020 +0200

    Camel-AWS2-S3: Provide a credentials provider for s3client of localstack instance
---
 .../org/apache/camel/component/aws2/s3/localstack/Aws2S3BaseTest.java  | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/components/camel-aws2-s3/src/test/java/org/apache/camel/component/aws2/s3/localstack/Aws2S3BaseTest.java b/components/camel-aws2-s3/src/test/java/org/apache/camel/component/aws2/s3/localstack/Aws2S3BaseTest.java
index 78262e0..a123d39 100644
--- a/components/camel-aws2-s3/src/test/java/org/apache/camel/component/aws2/s3/localstack/Aws2S3BaseTest.java
+++ b/components/camel-aws2-s3/src/test/java/org/apache/camel/component/aws2/s3/localstack/Aws2S3BaseTest.java
@@ -24,6 +24,8 @@ import org.apache.camel.test.testcontainers.junit5.ContainerAwareTestSupport;
 import org.apache.camel.test.testcontainers.junit5.Wait;
 import org.junit.jupiter.api.TestInstance;
 import org.testcontainers.containers.GenericContainer;
+import software.amazon.awssdk.auth.credentials.AwsBasicCredentials;
+import software.amazon.awssdk.auth.credentials.StaticCredentialsProvider;
 import software.amazon.awssdk.regions.Region;
 import software.amazon.awssdk.services.s3.S3Client;
 
@@ -58,6 +60,7 @@ public class Aws2S3BaseTest extends ContainerAwareTestSupport {
         S3Client s3Client = S3Client
                 .builder()
                 .endpointOverride(URI.create("http://" + getS3Url()))
+                .credentialsProvider(StaticCredentialsProvider.create(AwsBasicCredentials.create("xxx", "yyy")))
                 .region(Region.EU_WEST_1)
                 .build();
         return s3Client;