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

@@ -7,7 +7,7 @@ plugins {
id 'checkstyle'
id 'org.ajoberstar.grgit' version '4.1.0'
id "io.spring.dependency-management" version '1.0.10.RELEASE'
id 'com.jfrog.artifactory' version '4.17.2'
id 'com.jfrog.artifactory' version '4.18.2'
}
description = 'Spring Integration AWS Support'
@@ -15,6 +15,7 @@ description = 'Spring Integration AWS Support'
group = 'org.springframework.integration'
repositories {
mavenCentral()
// maven { url 'https://repo.spring.io/libs-staging-local' }
if (version.endsWith('BUILD-SNAPSHOT')) {
maven { url 'https://repo.spring.io/libs-snapshot' }
@@ -23,16 +24,16 @@ repositories {
}
ext {
assertjVersion = '3.18.0'
assertjVersion = '3.18.1'
awaitilityVersion = '4.0.3'
dynamodbLockClientVersion = '1.1.0'
jacksonVersion = '2.11.3'
junitVersion = '5.6.2'
servletApiVersion = '4.0.1'
localstackVersion = '0.1.22'
localstackVersion = '0.2.5'
log4jVersion = '2.13.3'
springCloudAwsVersion = '2.2.4.RELEASE'
springIntegrationVersion = '5.3.3.RELEASE'
springCloudAwsVersion = '2.2.5.RELEASE'
springIntegrationVersion = '5.3.4.RELEASE'
kinesisClientVersion = '1.14.0'
kinesisProducerVersion = '0.14.1'
@@ -90,12 +91,12 @@ dependencyManagement {
}
jacoco {
toolVersion = '0.8.5'
toolVersion = '0.8.6'
}
checkstyle {
configDirectory.set(rootProject.file("src/checkstyle"))
toolVersion = '8.36.2'
toolVersion = '8.38'
}
dependencies {

View File

@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

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 {