Use Localstack 0.2.25

* Upgrade some other dependencies including Gradle
* Fix compatibility with the latest Localstack
This commit is contained in:
Artem Bilan
2020-12-14 12:41:55 -05:00
parent f8ca0e4056
commit 1da944ece8
8 changed files with 32 additions and 30 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2019 the original author or authors.
* Copyright 2019-2020 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -16,12 +16,12 @@
package org.springframework.integration.aws;
import static cloud.localstack.TestUtils.DEFAULT_REGION;
import static cloud.localstack.Constants.DEFAULT_REGION;
import java.util.function.Supplier;
import cloud.localstack.TestUtils;
import cloud.localstack.docker.LocalstackDocker;
import cloud.localstack.Localstack;
import cloud.localstack.awssdkv1.TestUtils;
import com.amazonaws.ClientConfiguration;
import com.amazonaws.client.builder.AwsAsyncClientBuilder;
import com.amazonaws.client.builder.AwsClientBuilder;
@@ -55,7 +55,7 @@ public final class ExtendedDockerTestUtils {
AmazonKinesisAsyncClientBuilder amazonKinesisAsyncClientBuilder =
AmazonKinesisAsyncClientBuilder.standard()
.withEndpointConfiguration(
createEndpointConfiguration(LocalstackDocker.INSTANCE::getEndpointKinesis, ssl));
createEndpointConfiguration(Localstack.INSTANCE::getEndpointKinesis, ssl));
return applyConfigurationAndBuild(amazonKinesisAsyncClientBuilder);
}
@@ -71,7 +71,7 @@ public final class ExtendedDockerTestUtils {
AmazonDynamoDBAsyncClientBuilder dynamoDBAsyncClientBuilder =
AmazonDynamoDBAsyncClientBuilder.standard()
.withEndpointConfiguration(
createEndpointConfiguration(LocalstackDocker.INSTANCE::getEndpointDynamoDB, ssl));
createEndpointConfiguration(Localstack.INSTANCE::getEndpointDynamoDB, ssl));
return applyConfigurationAndBuild(dynamoDBAsyncClientBuilder);
}
@@ -87,7 +87,7 @@ public final class ExtendedDockerTestUtils {
AmazonCloudWatchAsyncClientBuilder cloudWatchAsyncClientBuilder =
AmazonCloudWatchAsyncClientBuilder.standard()
.withEndpointConfiguration(
createEndpointConfiguration(LocalstackDocker.INSTANCE::getEndpointCloudWatch, ssl));
createEndpointConfiguration(Localstack.INSTANCE::getEndpointCloudWatch, ssl));
return applyConfigurationAndBuild(cloudWatchAsyncClientBuilder);
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2017-2019 the original author or authors.
* Copyright 2017-2020 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -70,7 +70,7 @@ import com.amazonaws.services.kinesis.AmazonKinesisAsync;
@SpringJUnitConfig
@EnabledIfEnvironmentVariable(named = EnvironmentHostNameResolver.DOCKER_HOST_NAME, matches = ".+")
@ExtendWith(LocalstackDockerExtension.class)
@LocalstackDockerProperties(randomizePorts = true,
@LocalstackDockerProperties(
hostNameResolver = EnvironmentHostNameResolver.class,
services = "kinesis")
@DirtiesContext

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2017-2019 the original author or authors.
* Copyright 2017-2020 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -56,8 +56,9 @@ import org.springframework.messaging.support.ErrorMessage;
import org.springframework.test.annotation.DirtiesContext;
import org.springframework.test.context.junit.jupiter.SpringJUnitConfig;
import cloud.localstack.TestUtils;
import cloud.localstack.docker.LocalstackDocker;
import cloud.localstack.Constants;
import cloud.localstack.Localstack;
import cloud.localstack.awssdkv1.TestUtils;
import cloud.localstack.docker.LocalstackDockerExtension;
import cloud.localstack.docker.annotation.LocalstackDockerProperties;
import com.amazonaws.services.cloudwatch.AmazonCloudWatch;
@@ -76,7 +77,7 @@ import com.amazonaws.services.kinesis.producer.KinesisProducerConfiguration;
@SpringJUnitConfig
@EnabledIfEnvironmentVariable(named = EnvironmentHostNameResolver.DOCKER_HOST_NAME, matches = ".+")
@ExtendWith(LocalstackDockerExtension.class)
@LocalstackDockerProperties(randomizePorts = true,
@LocalstackDockerProperties(
hostNameResolver = EnvironmentHostNameResolver.class,
environmentVariableProvider = LocalStackSslEnvironmentProvider.class,
services = {"kinesis", "dynamodb", "cloudwatch"})
@@ -152,11 +153,11 @@ public class KplKclIntegrationTests {
@Bean
public KinesisProducerConfiguration kinesisProducerConfiguration() throws URISyntaxException {
URI kinesisUri = new URI(LocalstackDocker.INSTANCE.getEndpointKinesis());
URI cloudWatchUri = new URI(LocalstackDocker.INSTANCE.getEndpointCloudWatch());
URI kinesisUri = new URI(Localstack.INSTANCE.getEndpointKinesis());
URI cloudWatchUri = new URI(Localstack.INSTANCE.getEndpointCloudWatch());
return new KinesisProducerConfiguration()
.setCredentialsProvider(TestUtils.getCredentialsProvider())
.setRegion(TestUtils.DEFAULT_REGION)
.setRegion(Constants.DEFAULT_REGION)
.setKinesisEndpoint(kinesisUri.getHost())
.setKinesisPort(kinesisUri.getPort())
.setCloudwatchEndpoint(cloudWatchUri.getHost())

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2018-2019 the original author or authors.
* Copyright 2018-2020 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -56,7 +56,7 @@ import com.amazonaws.waiters.WaiterParameters;
*/
@EnabledIfEnvironmentVariable(named = EnvironmentHostNameResolver.DOCKER_HOST_NAME, matches = ".+")
@ExtendWith(LocalstackDockerExtension.class)
@LocalstackDockerProperties(randomizePorts = true,
@LocalstackDockerProperties(
hostNameResolver = EnvironmentHostNameResolver.class,
services = "dynamodb")
class DynamoDbLockRegistryLeaderInitiatorTests {

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2018-2019 the original author or authors.
* Copyright 2018-2020 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -60,7 +60,7 @@ import com.amazonaws.waiters.WaiterParameters;
@SpringJUnitConfig
@EnabledIfEnvironmentVariable(named = EnvironmentHostNameResolver.DOCKER_HOST_NAME, matches = ".+")
@ExtendWith(LocalstackDockerExtension.class)
@LocalstackDockerProperties(randomizePorts = true,
@LocalstackDockerProperties(
hostNameResolver = EnvironmentHostNameResolver.class,
services = "dynamodb")
@DirtiesContext

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2017-2019 the original author or authors.
* Copyright 2017-2020 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -49,7 +49,7 @@ import com.amazonaws.waiters.WaiterParameters;
*/
@EnabledIfEnvironmentVariable(named = EnvironmentHostNameResolver.DOCKER_HOST_NAME, matches = ".+")
@ExtendWith(LocalstackDockerExtension.class)
@LocalstackDockerProperties(randomizePorts = true,
@LocalstackDockerProperties(
hostNameResolver = EnvironmentHostNameResolver.class,
services = "dynamodb")
class DynamoDbMetadataStoreTests {