Skip to content

Commit

Permalink
Upgrade to Localstack 3.2
Browse files Browse the repository at this point in the history
  • Loading branch information
arhohuttunen committed Mar 2, 2024
1 parent 649f1c9 commit 1455ee5
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
5 changes: 2 additions & 3 deletions documentation/localstack/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,13 @@ version: '3.5'

services:
localstack:
image: localstack/localstack:0.12.17
image: localstack/localstack:3.2
ports:
- '4566:4566' # LocalStack Edge
environment:
- DEBUG=1
- DATA_DIR=/tmp/localstack/data
- AWS_ACCESS_KEY_ID=dummy
- AWS_SECRET_ACCESS_KEY=dummy
volumes:
- './.localstack:/tmp/localstack'
- './localstack:/var/lib/localstack'
- '/var/run/docker.sock:/var/run/docker.sock'
2 changes: 2 additions & 0 deletions documentation/src/test/java/example/SqsQueueUrlTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import org.junit.jupiter.api.Test;
import software.amazon.awssdk.services.sqs.SqsClient;
import software.amazon.awssdk.services.sqs.model.GetQueueAttributesRequest;
import software.amazon.awssdk.services.sqs.model.QueueAttributeName;

import static org.junit.jupiter.api.Assertions.assertFalse;

Expand All @@ -20,6 +21,7 @@ class SqsQueueUrlTest {
void setupQueues(@AwsClient SqsClient client, @QueueUrl("QueueName") String queueUrl) {
GetQueueAttributesRequest request = GetQueueAttributesRequest.builder()
.queueUrl(queueUrl)
.attributeNames(QueueAttributeName.ALL)
.build();
assertFalse(client.getQueueAttributes(request).attributes().isEmpty());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class LocalStackExtension : BeforeAllCallback, AfterAllCallback {
val services = annotation.services.toMutableSet() + scanServiceAnnotations(testClass)

@Suppress("SpreadOperator")
container = LocalStackContainer(DockerImageName.parse("localstack/localstack:0.12.17"))
container = LocalStackContainer(DockerImageName.parse("localstack/localstack:3.2"))
.withServices(*services.toTypedArray())
container.start()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import io.kotest.matchers.maps.shouldNotBeEmpty
import org.junit.jupiter.api.Test
import software.amazon.awssdk.services.sqs.SqsClient
import software.amazon.awssdk.services.sqs.model.GetQueueAttributesRequest
import software.amazon.awssdk.services.sqs.model.QueueAttributeName

@LocalStackTest
@SqsTest
Expand All @@ -15,6 +16,7 @@ class QueueUrlParameterResolverTest {
fun `resolve queue URL`(@AwsClient client: SqsClient, @QueueUrl("Queue") queueUrl: String) {
val request = GetQueueAttributesRequest.builder()
.queueUrl(queueUrl)
.attributeNames(QueueAttributeName.ALL)
.build()
val result = client.getQueueAttributes(request)
result.attributes().shouldNotBeEmpty()
Expand Down

0 comments on commit 1455ee5

Please sign in to comment.