Skip to content

Commit 1fa45d5

Browse files
committed
minor fixes
1 parent 464637c commit 1fa45d5

File tree

3 files changed

+21
-13
lines changed

3 files changed

+21
-13
lines changed

Makefile

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,16 @@ build: ## Build the code using Maven
99
publish-maven: ## Publish artifacts to Maven Central
1010
ADDITIONAL_MVN_TARGETS=deploy ADDITIONAL_MVN_ARGS=" " make build
1111

12-
test: ## Run Java/JUnit tests for AWS SDK v1 and v2
12+
test-v1:
13+
USE_SSL=1 SERVICES=serverless,kinesis,sns,sqs,iam,cloudwatch mvn -Pawssdkv1 \
14+
-Dtest="!cloud.localstack.awssdkv2.*Test" test
15+
16+
test-v2:
1317
USE_SSL=1 SERVICES=serverless,kinesis,sns,sqs,iam,cloudwatch mvn -Pawssdkv2 \
1418
-Dtest="cloud.localstack.awssdkv2.*Test" test
15-
USE_SSL=1 SERVICES=serverless,kinesis,sns,sqs,iam,cloudwatch mvn -Pawssdkv1 \
16-
-Dtest="!cloud.localstack.awssdkv2.*Test" test
1719

18-
.PHONY: usage clean install test
20+
test: ## Run Java/JUnit tests for AWS SDK v1 and v2
21+
make test-v2
22+
make test-v1
23+
24+
.PHONY: usage clean install test test-v1 test-v2

README.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ different location, then use the `DOCKER_LOCATION` environment variable to speci
8383

8484
### Deprecated Configurations
8585

86-
Due to recent changes in LocalStack (e.g., exposing all services via a single edge port, `4566`), the following configuration parameters are now deprecated in the latest version:
86+
Due to recent changes in LocalStack (exposing all services via a single edge port, `4566`), the following configuration parameters are now deprecated in the latest version:
8787

8888
| property | usage | type | default value |
8989
|-----------------------------|------------------------------------------------------------------------------------------------------------------------------|------------------------------|---------------|
@@ -106,6 +106,4 @@ make build
106106

107107
## License
108108

109-
Copyright (c) LocalStack maintainers and contributors.
110-
111-
This version of LocalStack is released under the Apache License, Version 2.0 (see LICENSE.txt).
109+
This code is released under the Apache License, Version 2.0 (see LICENSE.txt).

src/test/java/cloud/localstack/awssdkv2/BasicFeaturesSDKV2Test.java

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public void testCreateKinesisStreamV2() throws Exception {
5353
CreateStreamResponse response = kinesisClient.createStream(request).get();
5454
Assert.assertNotNull(response);
5555
}
56-
56+
5757
@Test
5858
public void testCreateKinesisRecordV2() throws Exception {
5959
String streamName = "test-s-"+UUID.randomUUID().toString();
@@ -62,7 +62,7 @@ public void testCreateKinesisRecordV2() throws Exception {
6262
.streamName(streamName).shardCount(1).build();
6363
CreateStreamResponse response = kinesisClient.createStream(request).get();
6464
Assert.assertNotNull(response);
65-
65+
6666
SdkBytes payload = SdkBytes.fromByteBuffer(ByteBuffer.wrap(String.format("testData-%d", 1).getBytes()));
6767
PutRecordRequest.Builder putRecordRequest = PutRecordRequest.builder();
6868
putRecordRequest.streamName(streamName);
@@ -117,7 +117,8 @@ public void testGetSsmParameter() throws Exception {
117117
public void testGetSecretsManagerSecret() throws Exception {
118118
final SecretsManagerAsyncClient clientSecretsManager = TestUtils.getClientSecretsManagerAsyncV2();
119119
clientSecretsManager.createSecret(CreateSecretRequest.builder().name("testsecret").secretString("secretcontent").build());
120-
CompletableFuture<GetSecretValueResponse> getSecretResponse = clientSecretsManager.getSecretValue(GetSecretValueRequest.builder().secretId("testsecret").build());
120+
CompletableFuture<GetSecretValueResponse> getSecretResponse = clientSecretsManager.getSecretValue(
121+
GetSecretValueRequest.builder().secretId("testsecret").build());
121122
String secretValue = getSecretResponse.get().secretString();
122123

123124
Assert.assertNotNull(secretValue);
@@ -128,8 +129,11 @@ public void testGetSecretsManagerSecret() throws Exception {
128129
public void testGetSecretAsParam() throws Exception {
129130
final SsmAsyncClient clientSsm = TestUtils.getClientSSMAsyncV2();
130131
final SecretsManagerAsyncClient clientSecretsManager = TestUtils.getClientSecretsManagerAsyncV2();
131-
clientSecretsManager.createSecret(CreateSecretRequest.builder().name("testsecret").secretString("secretcontent").build());
132-
CompletableFuture<GetParameterResponse> getParameterResponse = clientSsm.getParameter(GetParameterRequest.builder().name("/aws/reference/secretsmanager/testsecret").build());
132+
clientSecretsManager.createSecret(CreateSecretRequest.builder()
133+
.name("testsecret").secretString("secretcontent").build()).join();
134+
135+
CompletableFuture<GetParameterResponse> getParameterResponse = clientSsm.getParameter(
136+
GetParameterRequest.builder().name("/aws/reference/secretsmanager/testsecret").build());
133137
String parameterValue = getParameterResponse.get().parameter().value();
134138

135139
Assert.assertNotNull(parameterValue);

0 commit comments

Comments
 (0)