Skip to content

Commit

Permalink
test: upgrade Localstack to 2.3.2
Browse files Browse the repository at this point in the history
Closes #947
  • Loading branch information
straurob committed Nov 8, 2023
1 parent 4e81e22 commit 69200e6
Show file tree
Hide file tree
Showing 16 changed files with 562 additions and 772 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ class ParameterStoreConfigDataLoaderIntegrationTests {

@Container
static LocalStackContainer localstack = new LocalStackContainer(
DockerImageName.parse("localstack/localstack:1.4.0")).withReuse(true);
DockerImageName.parse("localstack/localstack:2.3.2")).withReuse(true);

@BeforeAll
static void beforeAll() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ class SecretsManagerConfigDataLoaderIntegrationTests {

@Container
static LocalStackContainer localstack = new LocalStackContainer(
DockerImageName.parse("localstack/localstack:1.4.0")).withReuse(true);
DockerImageName.parse("localstack/localstack:2.3.2")).withReuse(true);

@TempDir
static Path tokenTempDir;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ class CloudWatchExportAutoConfigurationIntegrationTests {

@Container
static LocalStackContainer localstack = new LocalStackContainer(
DockerImageName.parse("localstack/localstack:1.4.0"));
DockerImageName.parse("localstack/localstack:2.3.2"));

@DynamicPropertySource
static void registerProperties(DynamicPropertyRegistry registry) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ class SqsAutoConfigurationIntegrationTest {

@Container
static LocalStackContainer localstack = new LocalStackContainer(
DockerImageName.parse("localstack/localstack:1.4.0"));
DockerImageName.parse("localstack/localstack:2.3.2"));

@SuppressWarnings("unchecked")
@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public class DynamoDbTemplateIntegrationTest {

@Container
static LocalStackContainer localstack = new LocalStackContainer(
DockerImageName.parse("localstack/localstack:1.4.0")).withServices(DYNAMODB).withReuse(true);
DockerImageName.parse("localstack/localstack:2.3.2")).withServices(DYNAMODB).withReuse(true);

@BeforeAll
public static void createTable() {
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class CrossRegionS3ClientIntegrationTests {

@Container
static LocalStackContainer localstack = new LocalStackContainer(
DockerImageName.parse("localstack/localstack:1.4.0"));
DockerImageName.parse("localstack/localstack:2.3.2"));

private static S3Client client;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class S3PathMatchingResourcePatternResolverTests {

@Container
static LocalStackContainer localstack = new LocalStackContainer(
DockerImageName.parse("localstack/localstack:1.4.0")).withReuse(true);
DockerImageName.parse("localstack/localstack:2.3.2")).withReuse(true);

private static ResourcePatternResolver resourceLoader;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ class S3ResourceIntegrationTests {

@Container
static LocalStackContainer localstack = new LocalStackContainer(
DockerImageName.parse("localstack/localstack:1.4.0")).withReuse(true);
DockerImageName.parse("localstack/localstack:2.3.2")).withReuse(true);

private static S3Client client;
private static S3AsyncClient asyncClient;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ class S3TemplateIntegrationTests {

@Container
static LocalStackContainer localstack = new LocalStackContainer(
DockerImageName.parse("localstack/localstack:1.4.0")).withReuse(true);
DockerImageName.parse("localstack/localstack:2.3.2")).withReuse(true);

private static S3Client client;

Expand Down
2 changes: 1 addition & 1 deletion spring-cloud-aws-samples/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ version: "3.8"
services:
localstack:
container_name: "${LOCALSTACK_DOCKER_NAME-localstack_main}"
image: localstack/localstack:1.3.1
image: localstack/localstack:2.3.2
ports:
- "127.0.0.1:4566:4566" # LocalStack Gateway
- "127.0.0.1:4510-4559:4510-4559" # external services port range
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ class SnsTemplateIntegrationTest {

@Container
static LocalStackContainer localstack = new LocalStackContainer(
DockerImageName.parse("localstack/localstack:1.4.0")).withServices(SNS).withServices(SQS).withReuse(true);
DockerImageName.parse("localstack/localstack:2.3.2")).withServices(SNS).withServices(SQS).withReuse(true);

@BeforeAll
public static void createSnsTemplate() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class SnsSmsTemplateIntegrationTest {

@Container
static LocalStackContainer localstack = new LocalStackContainer(
DockerImageName.parse("localstack/localstack:1.4.0")).withServices(SNS).withEnv("DEBUG", "1");
DockerImageName.parse("localstack/localstack:2.3.2")).withServices(SNS).withEnv("DEBUG", "1");

@BeforeAll
public static void createSnsTemplate() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,19 @@
import io.awspring.cloud.sqs.support.resolver.AcknowledgmentHandlerMethodArgumentResolver;
import io.awspring.cloud.sqs.support.resolver.BatchAcknowledgmentArgumentResolver;
import io.awspring.cloud.sqs.support.resolver.BatchPayloadMethodArgumentResolver;
import java.lang.annotation.Annotation;
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import java.util.stream.StreamSupport;
import org.springframework.aop.support.AopUtils;
import org.springframework.beans.BeansException;
import org.springframework.beans.factory.BeanFactory;
Expand Down Expand Up @@ -57,20 +70,6 @@
import org.springframework.util.Assert;
import org.springframework.util.StringUtils;

import java.lang.annotation.Annotation;
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import java.util.stream.StreamSupport;

/**
* {@link BeanPostProcessor} implementation that scans beans for a {@link SqsListener @SqsListener} annotation, extracts
* information to a {@link SqsEndpoint}, and registers it in the {@link EndpointRegistrar}.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ abstract class BaseSqsIntegrationTest {

protected static final boolean purgeQueues = true;

private static final String LOCAL_STACK_VERSION = "localstack/localstack:1.4.0";
private static final String LOCAL_STACK_VERSION = "localstack/localstack:2.3.2";

static LocalStackContainer localstack = new LocalStackContainer(DockerImageName.parse(LOCAL_STACK_VERSION));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ abstract class BaseSqsIntegrationTest {

@Container
static LocalStackContainer localstack = new LocalStackContainer(
DockerImageName.parse("localstack/localstack:1.4.0")).withReuse(true);
DockerImageName.parse("localstack/localstack:2.3.2")).withReuse(true);

@BeforeAll
static void beforeAll() throws IOException, InterruptedException {
Expand Down

0 comments on commit 69200e6

Please sign in to comment.