diff --git a/spring-cloud-aws-autoconfigure/src/test/java/io/awspring/cloud/autoconfigure/config/parameterstore/ParameterStoreConfigDataLoaderIntegrationTests.java b/spring-cloud-aws-autoconfigure/src/test/java/io/awspring/cloud/autoconfigure/config/parameterstore/ParameterStoreConfigDataLoaderIntegrationTests.java index a3f5c47c0..a114ce545 100644 --- a/spring-cloud-aws-autoconfigure/src/test/java/io/awspring/cloud/autoconfigure/config/parameterstore/ParameterStoreConfigDataLoaderIntegrationTests.java +++ b/spring-cloud-aws-autoconfigure/src/test/java/io/awspring/cloud/autoconfigure/config/parameterstore/ParameterStoreConfigDataLoaderIntegrationTests.java @@ -70,7 +70,7 @@ class ParameterStoreConfigDataLoaderIntegrationTests { @Container static LocalStackContainer localstack = new LocalStackContainer( - DockerImageName.parse("localstack/localstack:2.3.2")).withReuse(true); + DockerImageName.parse("localstack/localstack:3.2.0")).withReuse(true); @BeforeAll static void beforeAll() { diff --git a/spring-cloud-aws-autoconfigure/src/test/java/io/awspring/cloud/autoconfigure/config/secretsmanager/SecretsManagerConfigDataLoaderIntegrationTests.java b/spring-cloud-aws-autoconfigure/src/test/java/io/awspring/cloud/autoconfigure/config/secretsmanager/SecretsManagerConfigDataLoaderIntegrationTests.java index b4e1ef6e6..3ec366a3f 100644 --- a/spring-cloud-aws-autoconfigure/src/test/java/io/awspring/cloud/autoconfigure/config/secretsmanager/SecretsManagerConfigDataLoaderIntegrationTests.java +++ b/spring-cloud-aws-autoconfigure/src/test/java/io/awspring/cloud/autoconfigure/config/secretsmanager/SecretsManagerConfigDataLoaderIntegrationTests.java @@ -74,7 +74,7 @@ class SecretsManagerConfigDataLoaderIntegrationTests { @Container static LocalStackContainer localstack = new LocalStackContainer( - DockerImageName.parse("localstack/localstack:2.3.2")).withReuse(true); + DockerImageName.parse("localstack/localstack:3.2.0")).withReuse(true); @TempDir static Path tokenTempDir; diff --git a/spring-cloud-aws-autoconfigure/src/test/java/io/awspring/cloud/autoconfigure/metrics/CloudWatchExportAutoConfigurationIntegrationTests.java b/spring-cloud-aws-autoconfigure/src/test/java/io/awspring/cloud/autoconfigure/metrics/CloudWatchExportAutoConfigurationIntegrationTests.java index 8a7af5cdf..d4f12cfa6 100644 --- a/spring-cloud-aws-autoconfigure/src/test/java/io/awspring/cloud/autoconfigure/metrics/CloudWatchExportAutoConfigurationIntegrationTests.java +++ b/spring-cloud-aws-autoconfigure/src/test/java/io/awspring/cloud/autoconfigure/metrics/CloudWatchExportAutoConfigurationIntegrationTests.java @@ -53,7 +53,7 @@ class CloudWatchExportAutoConfigurationIntegrationTests { @Container static LocalStackContainer localstack = new LocalStackContainer( - DockerImageName.parse("localstack/localstack:2.3.2")); + DockerImageName.parse("localstack/localstack:3.2.0")); @DynamicPropertySource static void registerProperties(DynamicPropertyRegistry registry) { diff --git a/spring-cloud-aws-autoconfigure/src/test/java/io/awspring/cloud/autoconfigure/sqs/SqsAutoConfigurationIntegrationTest.java b/spring-cloud-aws-autoconfigure/src/test/java/io/awspring/cloud/autoconfigure/sqs/SqsAutoConfigurationIntegrationTest.java index 11d94e22b..461d4d930 100644 --- a/spring-cloud-aws-autoconfigure/src/test/java/io/awspring/cloud/autoconfigure/sqs/SqsAutoConfigurationIntegrationTest.java +++ b/spring-cloud-aws-autoconfigure/src/test/java/io/awspring/cloud/autoconfigure/sqs/SqsAutoConfigurationIntegrationTest.java @@ -60,7 +60,7 @@ class SqsAutoConfigurationIntegrationTest { @Container static LocalStackContainer localstack = new LocalStackContainer( - DockerImageName.parse("localstack/localstack:2.3.2")); + DockerImageName.parse("localstack/localstack:3.2.0")); @SuppressWarnings("unchecked") @Test diff --git a/spring-cloud-aws-dynamodb/src/test/java/io/awspring/cloud/dynamodb/DynamoDbTemplateIntegrationTest.java b/spring-cloud-aws-dynamodb/src/test/java/io/awspring/cloud/dynamodb/DynamoDbTemplateIntegrationTest.java index d9ec2d4de..926544fd0 100644 --- a/spring-cloud-aws-dynamodb/src/test/java/io/awspring/cloud/dynamodb/DynamoDbTemplateIntegrationTest.java +++ b/spring-cloud-aws-dynamodb/src/test/java/io/awspring/cloud/dynamodb/DynamoDbTemplateIntegrationTest.java @@ -59,7 +59,7 @@ public class DynamoDbTemplateIntegrationTest { @Container static LocalStackContainer localstack = new LocalStackContainer( - DockerImageName.parse("localstack/localstack:2.3.2")).withReuse(true); + DockerImageName.parse("localstack/localstack:3.2.0")).withReuse(true); @BeforeAll public static void createTable() { diff --git a/spring-cloud-aws-s3-parent/spring-cloud-aws-s3-cross-region-client/src/test/java/io/awspring/cloud/s3/crossregion/CrossRegionS3ClientIntegrationTests.java b/spring-cloud-aws-s3-parent/spring-cloud-aws-s3-cross-region-client/src/test/java/io/awspring/cloud/s3/crossregion/CrossRegionS3ClientIntegrationTests.java index 7a2781f59..a1d4dc628 100644 --- a/spring-cloud-aws-s3-parent/spring-cloud-aws-s3-cross-region-client/src/test/java/io/awspring/cloud/s3/crossregion/CrossRegionS3ClientIntegrationTests.java +++ b/spring-cloud-aws-s3-parent/spring-cloud-aws-s3-cross-region-client/src/test/java/io/awspring/cloud/s3/crossregion/CrossRegionS3ClientIntegrationTests.java @@ -45,7 +45,7 @@ class CrossRegionS3ClientIntegrationTests { @Container static LocalStackContainer localstack = new LocalStackContainer( - DockerImageName.parse("localstack/localstack:2.3.2")); + DockerImageName.parse("localstack/localstack:3.2.0")); private static S3Client client; diff --git a/spring-cloud-aws-s3-parent/spring-cloud-aws-s3/src/test/java/io/awspring/cloud/s3/S3PathMatchingResourcePatternResolverTests.java b/spring-cloud-aws-s3-parent/spring-cloud-aws-s3/src/test/java/io/awspring/cloud/s3/S3PathMatchingResourcePatternResolverTests.java index b1ca1180a..cb3e14c9e 100644 --- a/spring-cloud-aws-s3-parent/spring-cloud-aws-s3/src/test/java/io/awspring/cloud/s3/S3PathMatchingResourcePatternResolverTests.java +++ b/spring-cloud-aws-s3-parent/spring-cloud-aws-s3/src/test/java/io/awspring/cloud/s3/S3PathMatchingResourcePatternResolverTests.java @@ -41,7 +41,7 @@ class S3PathMatchingResourcePatternResolverTests { @Container static LocalStackContainer localstack = new LocalStackContainer( - DockerImageName.parse("localstack/localstack:2.3.2")).withReuse(true); + DockerImageName.parse("localstack/localstack:3.2.0")).withReuse(true); private static ResourcePatternResolver resourceLoader; diff --git a/spring-cloud-aws-s3-parent/spring-cloud-aws-s3/src/test/java/io/awspring/cloud/s3/S3ResourceIntegrationTests.java b/spring-cloud-aws-s3-parent/spring-cloud-aws-s3/src/test/java/io/awspring/cloud/s3/S3ResourceIntegrationTests.java index 23a22ecb9..7a12a872f 100644 --- a/spring-cloud-aws-s3-parent/spring-cloud-aws-s3/src/test/java/io/awspring/cloud/s3/S3ResourceIntegrationTests.java +++ b/spring-cloud-aws-s3-parent/spring-cloud-aws-s3/src/test/java/io/awspring/cloud/s3/S3ResourceIntegrationTests.java @@ -69,7 +69,7 @@ class S3ResourceIntegrationTests { @Container static LocalStackContainer localstack = new LocalStackContainer( - DockerImageName.parse("localstack/localstack:2.3.2")).withReuse(true); + DockerImageName.parse("localstack/localstack:3.2.0")).withReuse(true); private static S3Client client; private static S3AsyncClient asyncClient; @@ -194,7 +194,8 @@ void objectMetadataCanBeSetOnWriting(S3OutputStreamProvider s3OutputStreamProvid @TestAvailableOutputStreamProviders void contentTypeCanBeResolvedForLargeFiles(S3OutputStreamProvider s3OutputStreamProvider) throws IOException { - S3Resource resource = s3Resource("s3://first-bucket/new-file.txt", s3OutputStreamProvider); + int i = new Random().nextInt(); + S3Resource resource = s3Resource("s3://first-bucket/new-file" + i + ".txt", s3OutputStreamProvider); // create file larger than single part size in multipart upload to make sure that file can be successfully // uploaded in parts @@ -207,7 +208,7 @@ void contentTypeCanBeResolvedForLargeFiles(S3OutputStreamProvider s3OutputStream outputStream.write(Files.toByteArray(file)); } GetObjectResponse result = client - .getObject(request -> request.bucket("first-bucket").key("new-file.txt").build()).response(); + .getObject(request -> request.bucket("first-bucket").key("new-file" + i + ".txt").build()).response(); assertThat(result.contentType()).isEqualTo("text/plain"); } diff --git a/spring-cloud-aws-s3-parent/spring-cloud-aws-s3/src/test/java/io/awspring/cloud/s3/S3TemplateIntegrationTests.java b/spring-cloud-aws-s3-parent/spring-cloud-aws-s3/src/test/java/io/awspring/cloud/s3/S3TemplateIntegrationTests.java index 312a26e6b..88adbb422 100644 --- a/spring-cloud-aws-s3-parent/spring-cloud-aws-s3/src/test/java/io/awspring/cloud/s3/S3TemplateIntegrationTests.java +++ b/spring-cloud-aws-s3-parent/spring-cloud-aws-s3/src/test/java/io/awspring/cloud/s3/S3TemplateIntegrationTests.java @@ -70,7 +70,7 @@ class S3TemplateIntegrationTests { @Container static LocalStackContainer localstack = new LocalStackContainer( - DockerImageName.parse("localstack/localstack:2.3.2")).withReuse(true); + DockerImageName.parse("localstack/localstack:3.2.0")).withReuse(true); private static S3Client client; diff --git a/spring-cloud-aws-samples/docker-compose.yml b/spring-cloud-aws-samples/docker-compose.yml index 4491f9c55..5d44f6ada 100644 --- a/spring-cloud-aws-samples/docker-compose.yml +++ b/spring-cloud-aws-samples/docker-compose.yml @@ -3,7 +3,7 @@ version: "3.8" services: localstack: container_name: "${LOCALSTACK_DOCKER_NAME-localstack_main}" - image: localstack/localstack:2.3.2 + image: localstack/localstack:3.2.0 ports: - "127.0.0.1:4566:4566" # LocalStack Gateway - "127.0.0.1:4510-4559:4510-4559" # external services port range diff --git a/spring-cloud-aws-sns/src/test/java/io/awspring/cloud/sns/integration/SnsTemplateIntegrationTest.java b/spring-cloud-aws-sns/src/test/java/io/awspring/cloud/sns/integration/SnsTemplateIntegrationTest.java index 8d97ce86c..d7ffcc791 100644 --- a/spring-cloud-aws-sns/src/test/java/io/awspring/cloud/sns/integration/SnsTemplateIntegrationTest.java +++ b/spring-cloud-aws-sns/src/test/java/io/awspring/cloud/sns/integration/SnsTemplateIntegrationTest.java @@ -19,6 +19,7 @@ import static io.awspring.cloud.sns.core.SnsHeaders.MESSAGE_GROUP_ID_HEADER; import static org.assertj.core.api.Assertions.*; import static org.awaitility.Awaitility.await; +import static org.testcontainers.containers.localstack.LocalStackContainer.Service.SNS; import static org.testcontainers.containers.localstack.LocalStackContainer.Service.SQS; import io.awspring.cloud.sns.Person; @@ -63,7 +64,7 @@ class SnsTemplateIntegrationTest { @Container static LocalStackContainer localstack = new LocalStackContainer( - DockerImageName.parse("localstack/localstack:2.3.2")).withServices(SQS).withReuse(true); + DockerImageName.parse("localstack/localstack:3.2.0")).withReuse(true); @BeforeAll public static void createSnsTemplate() { diff --git a/spring-cloud-aws-sns/src/test/java/io/awspring/cloud/sns/sms/SnsSmsTemplateIntegrationTest.java b/spring-cloud-aws-sns/src/test/java/io/awspring/cloud/sns/sms/SnsSmsTemplateIntegrationTest.java index a42715649..e744614ce 100644 --- a/spring-cloud-aws-sns/src/test/java/io/awspring/cloud/sns/sms/SnsSmsTemplateIntegrationTest.java +++ b/spring-cloud-aws-sns/src/test/java/io/awspring/cloud/sns/sms/SnsSmsTemplateIntegrationTest.java @@ -42,7 +42,7 @@ class SnsSmsTemplateIntegrationTest { @Container static LocalStackContainer localstack = new LocalStackContainer( - DockerImageName.parse("localstack/localstack:2.3.2")).withEnv("DEBUG", "1"); + DockerImageName.parse("localstack/localstack:3.2.0")).withEnv("DEBUG", "1"); @BeforeAll public static void createSnsTemplate() { diff --git a/spring-cloud-aws-sqs/src/test/java/io/awspring/cloud/sqs/integration/BaseSqsIntegrationTest.java b/spring-cloud-aws-sqs/src/test/java/io/awspring/cloud/sqs/integration/BaseSqsIntegrationTest.java index 193237f6b..c30b104c6 100644 --- a/spring-cloud-aws-sqs/src/test/java/io/awspring/cloud/sqs/integration/BaseSqsIntegrationTest.java +++ b/spring-cloud-aws-sqs/src/test/java/io/awspring/cloud/sqs/integration/BaseSqsIntegrationTest.java @@ -48,7 +48,7 @@ abstract class BaseSqsIntegrationTest { protected static boolean waitForPurge = true; - private static final String LOCAL_STACK_VERSION = "localstack/localstack:2.3.2"; + private static final String LOCAL_STACK_VERSION = "localstack/localstack:3.2.0"; static LocalStackContainer localstack = new LocalStackContainer(DockerImageName.parse(LOCAL_STACK_VERSION)); diff --git a/spring-cloud-aws-test/src/test/java/io/awspring/cloud/test/sqs/BaseSqsIntegrationTest.java b/spring-cloud-aws-test/src/test/java/io/awspring/cloud/test/sqs/BaseSqsIntegrationTest.java index 1bf21d951..d5b04df07 100644 --- a/spring-cloud-aws-test/src/test/java/io/awspring/cloud/test/sqs/BaseSqsIntegrationTest.java +++ b/spring-cloud-aws-test/src/test/java/io/awspring/cloud/test/sqs/BaseSqsIntegrationTest.java @@ -31,7 +31,7 @@ abstract class BaseSqsIntegrationTest { @Container static LocalStackContainer localstack = new LocalStackContainer( - DockerImageName.parse("localstack/localstack:2.3.2")).withReuse(true); + DockerImageName.parse("localstack/localstack:3.2.0")).withReuse(true); @BeforeAll static void beforeAll() throws IOException, InterruptedException {