diff --git a/documentation/localstack/docker-compose.yml b/documentation/localstack/docker-compose.yml index 1294b9f5..933d3696 100644 --- a/documentation/localstack/docker-compose.yml +++ b/documentation/localstack/docker-compose.yml @@ -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' diff --git a/documentation/src/test/java/example/SqsQueueUrlTest.java b/documentation/src/test/java/example/SqsQueueUrlTest.java index e91381d6..aeb9c0bc 100644 --- a/documentation/src/test/java/example/SqsQueueUrlTest.java +++ b/documentation/src/test/java/example/SqsQueueUrlTest.java @@ -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; @@ -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()); } diff --git a/localstack/src/main/kotlin/com/github/awstestkit/localstack/junit5/LocalStackExtension.kt b/localstack/src/main/kotlin/com/github/awstestkit/localstack/junit5/LocalStackExtension.kt index 5e1194fb..5377f18f 100644 --- a/localstack/src/main/kotlin/com/github/awstestkit/localstack/junit5/LocalStackExtension.kt +++ b/localstack/src/main/kotlin/com/github/awstestkit/localstack/junit5/LocalStackExtension.kt @@ -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() diff --git a/sqs/src/test/kotlin/com/github/awstestkit/sqs/junit5/QueueUrlParameterResolverTest.kt b/sqs/src/test/kotlin/com/github/awstestkit/sqs/junit5/QueueUrlParameterResolverTest.kt index 918fe79e..67692a4e 100644 --- a/sqs/src/test/kotlin/com/github/awstestkit/sqs/junit5/QueueUrlParameterResolverTest.kt +++ b/sqs/src/test/kotlin/com/github/awstestkit/sqs/junit5/QueueUrlParameterResolverTest.kt @@ -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 @@ -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()