Open
Description
I am using 0.2.15
version of the utils. The docker starts up without any issue, but the s3 client can not resolve the url.. here is the config I have:
@ExtendWith(LocalstackDockerExtension::class)
@LocalstackDockerProperties(services = [ServiceName.S3])
@SpringBootTest(classes = [Application::class, SomeControllerTest.S3TestConfiguration::class])
@TestPropertySource(
properties = ["spring.main.allow-bean-definition-overriding=true"]
)
class SomeControllerTest : AbstractTest() {
@Configuration
class S3TestConfiguration {
// override existing s3 client
@Primary
@Bean
fun s3Client(): S3Client =
S3Client.builder()
.credentialsProvider(
StaticCredentialsProvider.create(
AwsBasicCredentials.create(
"key", "secret"
)))
.endpointOverride(URI.create(Localstack.INSTANCE.endpointS3))
.region(Region.AWS_GLOBAL)
.serviceConfiguration { it.pathStyleAccessEnabled() }
.build()
}
...
}
Caused by: software.amazon.awssdk.core.exception.SdkClientException: Unable to execute HTTP request: localhost.localstack.cloud
at software.amazon.awssdk.core.exception.SdkClientException$BuilderImpl.build(SdkClientException.java:98)
...
Caused by: java.net.UnknownHostException: localhost.localstack.cloud
at java.base/java.net.InetAddress$CachedAddresses.get(InetAddress.java:800)
Metadata
Metadata
Assignees
Labels
No labels