Skip to content

Commit e3fbd78

Browse files
committed
Step1: Upgrade localstack dependency.
1 parent e7e0a45 commit e3fbd78

File tree

11 files changed

+42
-32
lines changed

11 files changed

+42
-32
lines changed

.editorconfig

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,6 @@ trim_trailing_whitespace = true
88
end_of_line = lf
99
insert_final_newline = true
1010

11-
[Makefile]
12-
indent_style = tab
13-
1411
[**/examples/**.java]
1512
# 84 looks like a odd number, however
1613
# it accounts for 4 spaces (class and example method indentation)

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@ target
55
build
66
.vertx
77
.DS_Store
8+
.run

build.gradle.kts

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,16 @@ val logbackVersion = "1.2.3"
55
val integrationOption = "tests.integration"
66

77
group = "io.reactiverse"
8-
version = "0.6.0"
8+
version = "0.7.0"
99

1010
plugins {
1111
`java-library`
1212
`maven-publish`
1313
jacoco
1414
id("com.jfrog.bintray") version "1.8.5"
1515
id("com.jaredsburrows.license") version "0.8.42"
16-
id("org.sonarqube") version "2.6"
16+
id("org.sonarqube") version "3.0"
17+
id("com.github.ben-manes.versions") version "0.34.0"
1718
}
1819

1920
// In order to publish SNAPSHOTs to Sonatype Snapshots repository => the CI should define such `ossrhUsername` and `ossrhPassword` properties
@@ -54,13 +55,20 @@ repositories {
5455
}
5556
}
5657

58+
fun isNonStable(version: String): Boolean {
59+
val stableKeyword = listOf("RELEASE", "FINAL", "GA").any { version.toUpperCase().contains(it) }
60+
val regex = "^[0-9,.v-]+(-r)?$".toRegex()
61+
val isStable = stableKeyword || regex.matches(version)
62+
return isStable.not()
63+
}
64+
5765
dependencies {
5866
api("io.vertx:vertx-core:$vertxVersion")
5967
api("software.amazon.awssdk:aws-core:$awsSdkVersion")
6068

6169
testImplementation("io.vertx:vertx-junit5:$vertxVersion")
6270
testImplementation("io.vertx:vertx-rx-java2:$vertxVersion")
63-
testImplementation("cloud.localstack:localstack-utils:0.1.22")
71+
testImplementation("cloud.localstack:localstack-utils:0.2.5")
6472
testImplementation("ch.qos.logback:logback-classic:$logbackVersion")
6573
testImplementation("ch.qos.logback:logback-core:$logbackVersion")
6674
testImplementation("software.amazon.awssdk:aws-sdk-java:$awsSdkVersion")
@@ -78,6 +86,11 @@ jacoco {
7886
}
7987

8088
tasks {
89+
named("dependencyUpdates", com.github.benmanes.gradle.versions.updates.DependencyUpdatesTask::class.java).configure {
90+
rejectVersionIf {
91+
isNonStable(candidate.version)
92+
}
93+
}
8194

8295
jacocoTestReport {
8396
dependsOn(":test")

src/test/java/io/reactiverse/awssdk/integration/LocalStackBaseSpec.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package io.reactiverse.awssdk.integration;
22

3-
import cloud.localstack.docker.LocalstackDocker;
3+
import cloud.localstack.Localstack;
44
import io.reactivex.Single;
55
import io.reactivex.SingleOnSubscribe;
66
import io.vertx.core.Context;
@@ -39,7 +39,7 @@ protected void assertContext(Vertx vertx, Context context, VertxTestContext test
3939
}
4040

4141
protected static URI s3URI() throws Exception {
42-
return new URI(LocalstackDocker.INSTANCE.getEndpointS3());
42+
return new URI(Localstack.INSTANCE.getEndpointS3());
4343
}
4444

4545
protected static S3AsyncClient s3(Context context) throws Exception {

src/test/java/io/reactiverse/awssdk/integration/apigateway/VertxApiGatewaySpec.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package io.reactiverse.awssdk.integration.apigateway;
22

3-
import cloud.localstack.docker.LocalstackDocker;
3+
import cloud.localstack.Localstack;
44
import cloud.localstack.docker.LocalstackDockerExtension;
55
import cloud.localstack.docker.annotation.LocalstackDockerProperties;
66
import io.reactiverse.awssdk.VertxSdkClient;
@@ -40,13 +40,13 @@
4040
import static org.junit.jupiter.api.Assertions.assertEquals;
4141

4242
@EnabledIfSystemProperty(named = "tests.integration", matches = "localstack")
43-
@LocalstackDockerProperties(services = { "apigateway" }, imageTag = "0.10.2")
43+
@LocalstackDockerProperties(services = { "apigateway" }, imageTag = "0.12.2")
4444
@ExtendWith(VertxExtension.class)
4545
@ExtendWith(LocalstackDockerExtension.class)
4646
public class VertxApiGatewaySpec extends LocalStackBaseSpec {
4747

48-
private final static String API_NAME = "My-API";
49-
private final static String PATH = "/faking";
48+
private final static String API_NAME = "MyAPI";
49+
private final static String PATH = "faking";
5050
private final static HttpMethod METHOD = HttpMethod.GET;
5151
private final static Map<String, String> TEMPLATES = new HashMap<>();
5252
private final static String MOCK_RESPONSE = "{\"message\": \"Hello from a fake backend\"}";
@@ -174,11 +174,11 @@ private Single<TestInvokeMethodResponse> makeIntegrationTest() {
174174
private static CreateRestApiRequest.Builder restApiDefinition(CreateRestApiRequest.Builder rar) {
175175
return rar.name(API_NAME)
176176
.binaryMediaTypes("text/plain")
177-
.description("Fetches weather");
177+
.description("Fetches_weather");
178178
}
179179

180180
private void createGatewayClient(Context context) throws Exception {
181-
final URI gatewayURI = new URI(LocalstackDocker.INSTANCE.getEndpointAPIGateway());
181+
final URI gatewayURI = new URI(Localstack.INSTANCE.getEndpointAPIGateway());
182182
final ApiGatewayAsyncClientBuilder builder = ApiGatewayAsyncClient.builder()
183183
.region(Region.US_EAST_1)
184184
.credentialsProvider(credentialsProvider)

src/test/java/io/reactiverse/awssdk/integration/cloudwatch/VertxCloudWatchClientSpec.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package io.reactiverse.awssdk.integration.cloudwatch;
22

3-
import cloud.localstack.docker.LocalstackDocker;
3+
import cloud.localstack.Localstack;
44
import cloud.localstack.docker.LocalstackDockerExtension;
55
import cloud.localstack.docker.annotation.LocalstackDockerProperties;
66
import io.reactiverse.awssdk.VertxSdkClient;
@@ -23,11 +23,10 @@
2323
import java.net.URI;
2424
import java.util.concurrent.TimeUnit;
2525

26-
import static org.junit.jupiter.api.Assertions.assertEquals;
2726
import static org.junit.jupiter.api.Assertions.assertTrue;
2827

2928
@EnabledIfSystemProperty(named = "tests.integration", matches = "localstack")
30-
@LocalstackDockerProperties(services = { "cloudwatch" }, imageTag = "0.10.2")
29+
@LocalstackDockerProperties(services = { "cloudwatch" }, imageTag = "0.12.2")
3130
@ExtendWith(VertxExtension.class)
3231
@ExtendWith(LocalstackDockerExtension.class)
3332
public class VertxCloudWatchClientSpec extends LocalStackBaseSpec {
@@ -85,7 +84,7 @@ private static PutDashboardRequest.Builder createDashboard(PutDashboardRequest.B
8584
}
8685

8786
private static CloudWatchAsyncClient cloudwatchClient(Context ctx) throws Exception {
88-
final URI cloudwatchURI = new URI(LocalstackDocker.INSTANCE.getEndpointCloudWatch());
87+
final URI cloudwatchURI = new URI(Localstack.INSTANCE.getEndpointCloudWatch());
8988
final CloudWatchAsyncClientBuilder builder =
9089
CloudWatchAsyncClient.builder()
9190
.credentialsProvider(credentialsProvider)

src/test/java/io/reactiverse/awssdk/integration/dynamodb/VertxDynamoClientSpec.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package io.reactiverse.awssdk.integration.dynamodb;
22

3-
import cloud.localstack.docker.LocalstackDocker;
3+
import cloud.localstack.Localstack;
44
import cloud.localstack.docker.LocalstackDockerExtension;
55
import cloud.localstack.docker.annotation.LocalstackDockerProperties;
66
import io.reactiverse.awssdk.VertxSdkClient;
@@ -37,7 +37,7 @@
3737
@ExtendWith(VertxExtension.class)
3838
@ExtendWith(LocalstackDockerExtension.class)
3939
@EnabledIfSystemProperty(named = "tests.integration", matches = "localstack")
40-
@LocalstackDockerProperties(services = { "dynamodb" }, imageTag = "0.10.2")
40+
@LocalstackDockerProperties(services = { "dynamodb" }, imageTag = "0.12.2")
4141
@TestMethodOrder(MethodOrderer.OrderAnnotation.class)
4242
public class VertxDynamoClientSpec extends LocalStackBaseSpec {
4343

@@ -136,7 +136,7 @@ private static GetItemRequest.Builder getItem(GetItemRequest.Builder gib) {
136136
}
137137

138138
private DynamoDbAsyncClient dynamo(Context context) throws Exception {
139-
final URI dynamoEndpoint = new URI(LocalstackDocker.INSTANCE.getEndpointDynamoDB());
139+
final URI dynamoEndpoint = new URI(Localstack.INSTANCE.getEndpointDynamoDB());
140140
return VertxSdkClient.withVertx(
141141
DynamoDbAsyncClient.builder()
142142
.region(Region.EU_WEST_1)

src/test/java/io/reactiverse/awssdk/integration/firehose/VertxFirehoseClientSpec.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package io.reactiverse.awssdk.integration.firehose;
22

3-
import cloud.localstack.docker.LocalstackDocker;
3+
import cloud.localstack.Localstack;
44
import cloud.localstack.docker.LocalstackDockerExtension;
55
import cloud.localstack.docker.annotation.LocalstackDockerProperties;
66
import io.reactiverse.awssdk.VertxSdkClient;
@@ -52,7 +52,7 @@
5252
@ExtendWith(VertxExtension.class)
5353
@ExtendWith(LocalstackDockerExtension.class)
5454
@EnabledIfSystemProperty(named = "tests.integration", matches = "localstack")
55-
@LocalstackDockerProperties(services = { "firehose", "s3" }, imageTag = "0.10.2")
55+
@LocalstackDockerProperties(services = { "firehose", "s3" }, imageTag = "0.12.2")
5656
public class VertxFirehoseClientSpec extends LocalStackBaseSpec {
5757

5858
private final static String STREAM = "My-Vertx-Firehose-Stream";
@@ -173,6 +173,6 @@ private void createFirehoseClient(Context context) throws Exception {
173173
}
174174

175175
private static URI getFirehoseURI() throws Exception {
176-
return new URI(LocalstackDocker.INSTANCE.getEndpointFirehose());
176+
return new URI(Localstack.INSTANCE.getEndpointFirehose());
177177
}
178178
}

src/test/java/io/reactiverse/awssdk/integration/kinesis/VertxKinesisClientSpec.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package io.reactiverse.awssdk.integration.kinesis;
22

3-
import cloud.localstack.docker.LocalstackDocker;
3+
import cloud.localstack.Localstack;
44
import cloud.localstack.docker.LocalstackDockerExtension;
55
import cloud.localstack.docker.annotation.LocalstackDockerProperties;
66
import io.reactiverse.awssdk.VertxSdkClient;
@@ -41,7 +41,7 @@
4141
@ExtendWith(VertxExtension.class)
4242
@ExtendWith(LocalstackDockerExtension.class)
4343
@EnabledIfSystemProperty(named = "tests.integration", matches = "localstack")
44-
@LocalstackDockerProperties(services = { "kinesis" }, imageTag = "0.10.2")
44+
@LocalstackDockerProperties(services = { "kinesis" }, imageTag = "0.12.2")
4545
public class VertxKinesisClientSpec extends LocalStackBaseSpec {
4646

4747
private final static String STREAM = "my-awesome-stream";
@@ -61,7 +61,7 @@ public static void createStream() throws Exception {
6161
KinesisClient client = KinesisClient.builder()
6262
.region(Region.EU_WEST_1)
6363
.credentialsProvider(credentialsProvider)
64-
.endpointOverride(new URI(LocalstackDocker.INSTANCE.getEndpointKinesis()))
64+
.endpointOverride(new URI(Localstack.INSTANCE.getEndpointKinesis()))
6565
.build();
6666
CreateStreamResponse resp = client.createStream(cs -> cs.streamName(STREAM).shardCount(1));
6767
assertNotNull(resp);
@@ -149,7 +149,7 @@ private Consumer<GetShardIteratorRequest.Builder> shardIterator(String shardId)
149149
}
150150

151151
private KinesisAsyncClient kinesis(Context context) throws Exception {
152-
final URI kinesisURI = new URI(LocalstackDocker.INSTANCE.getEndpointKinesis());
152+
final URI kinesisURI = new URI(Localstack.INSTANCE.getEndpointKinesis());
153153
final KinesisAsyncClientBuilder builder = KinesisAsyncClient.builder()
154154
.region(Region.EU_WEST_1)
155155
.endpointOverride(kinesisURI)

src/test/java/io/reactiverse/awssdk/integration/lambda/VertxLambdaClientSpec.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package io.reactiverse.awssdk.integration.lambda;
22

3-
import cloud.localstack.docker.LocalstackDocker;
3+
import cloud.localstack.Localstack;
44
import cloud.localstack.docker.LocalstackDockerExtension;
55
import cloud.localstack.docker.annotation.LocalstackDockerProperties;
66
import io.reactiverse.awssdk.VertxSdkClient;
@@ -38,7 +38,7 @@
3838
import static org.junit.jupiter.api.Assertions.assertNull;
3939

4040
@EnabledIfSystemProperty(named = "tests.integration", matches = "localstack")
41-
@LocalstackDockerProperties(services = { "lambda" }, imageTag = "0.10.2")
41+
@LocalstackDockerProperties(services = { "lambda" }, imageTag = "0.12.2")
4242
@ExtendWith(VertxExtension.class)
4343
@ExtendWith(LocalstackDockerExtension.class)
4444
@TestMethodOrder(MethodOrderer.OrderAnnotation.class)
@@ -119,7 +119,7 @@ private static InvokeRequest.Builder lambdaInvokation(InvokeRequest.Builder irb)
119119
}
120120

121121
private static LambdaAsyncClient createLambdaClient(Context ctx) throws Exception {
122-
final URI lambdaURI = new URI(LocalstackDocker.INSTANCE.getEndpointLambda());
122+
final URI lambdaURI = new URI(Localstack.INSTANCE.getEndpointLambda());
123123
final LambdaAsyncClientBuilder builder =
124124
LambdaAsyncClient.builder()
125125
.credentialsProvider(credentialsProvider)

0 commit comments

Comments
 (0)