Skip to content

build(deps): bump test-containers.version from 1.17.6 to 1.19.7 #1850

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ Integrates with Spring Data, Spring Data REST and Apache Solr</description>
<elasticsearch-rest-high-level-client.version>7.17.18</elasticsearch-rest-high-level-client.version>

<!-- Test dependencies -->
<test-containers.version>1.17.6</test-containers.version>
<test-containers.version>1.19.7</test-containers.version>
<mockito.version>3.12.4</mockito.version>

<docs.output.dir>../target/generated-docs/refs/${env.BUILD_TYPE}/</docs.output.dir>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import java.net.URI;
import java.net.URISyntaxException;

import net.bytebuddy.asm.Advice;
import org.testcontainers.containers.localstack.LocalStackContainer;
import org.testcontainers.utility.DockerImageName;

Expand All @@ -14,6 +15,8 @@
import software.amazon.awssdk.auth.credentials.AwsBasicCredentials;
import software.amazon.awssdk.auth.credentials.AwsCredentials;
import software.amazon.awssdk.auth.credentials.AwsCredentialsProvider;
import software.amazon.awssdk.auth.credentials.StaticCredentialsProvider;
import software.amazon.awssdk.regions.Region;
import software.amazon.awssdk.core.ServiceConfiguration;
import software.amazon.awssdk.services.s3.S3Client;

Expand All @@ -38,9 +41,13 @@ public static LocalStack singleton() {

public static S3Client getAmazonS3Client() throws URISyntaxException {
return S3Client.builder()
.endpointOverride(new URI(LocalStack.singleton().getEndpointConfiguration(LocalStackContainer.Service.S3).getServiceEndpoint()))
.credentialsProvider(new LocalStack.CrossAwsCredentialsProvider(LocalStack.singleton().getDefaultCredentialsProvider()))
.serviceConfiguration((serviceBldr) -> {serviceBldr.pathStyleAccessEnabled(true);})
.endpointOverride(LocalStack.singleton().getEndpoint())
.credentialsProvider(
StaticCredentialsProvider.create(
AwsBasicCredentials.create(LocalStack.singleton().getAccessKey(), LocalStack.singleton().getSecretKey())
)
)
.region(Region.of(LocalStack.singleton().getRegion()))
.build();
}

Expand Down