Skip to content

Commit

Permalink
chore(deps): Bump io.awspring.cloud:spring-cloud-aws-dependencies fro…
Browse files Browse the repository at this point in the history
…m 3.1.0 to 3.1.1 (springwolf#695)

* chore(deps): Bump io.awspring.cloud:spring-cloud-aws-dependencies

Bumps [io.awspring.cloud:spring-cloud-aws-dependencies](https://github.com/awspring/spring-cloud-aws) from 3.1.0 to 3.1.1.
- [Release notes](https://github.com/awspring/spring-cloud-aws/releases)
- [Commits](awspring/spring-cloud-aws@v3.1.0...v3.1.1)

---
updated-dependencies:
- dependency-name: io.awspring.cloud:spring-cloud-aws-dependencies
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* chore(sqs-example): Update localstack from 2.2.0 to 3.3.0 (latest)

* test(sqs-example): fix ProducerSystemTest

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: David Müller <d4ve.mone@googlemail.com>
  • Loading branch information
dependabot[bot] and sam0r040 authored Apr 12, 2024
1 parent f5f4cde commit 737e781
Show file tree
Hide file tree
Showing 7 changed files with 35 additions and 16 deletions.
2 changes: 1 addition & 1 deletion springwolf-examples/springwolf-sns-example/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ plugins {

dependencyManagement {
imports {
mavenBom "io.awspring.cloud:spring-cloud-aws-dependencies:3.1.0"
mavenBom "io.awspring.cloud:spring-cloud-aws-dependencies:3.1.1"
}
}

Expand Down
2 changes: 1 addition & 1 deletion springwolf-examples/springwolf-sqs-example/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ plugins {

dependencyManagement {
imports {
mavenBom "io.awspring.cloud:spring-cloud-aws-dependencies:3.1.0"
mavenBom "io.awspring.cloud:spring-cloud-aws-dependencies:3.1.1"
}
}

Expand Down
8 changes: 4 additions & 4 deletions springwolf-examples/springwolf-sqs-example/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ services:
- localstack

localstack:
image: localstack/localstack:2.2.0
image: localstack/localstack:3.3.0
environment:
- DEBUG=${DEBUG-}
- AWS_REGION=eu-central-1
Expand All @@ -21,10 +21,10 @@ services:
- "4566:4566" # LocalStack Gateway
# - "4510-4559:4510-4559" # external services port range
volumes:
- "${TMPDIR:-/tmp/localstack}:/tmp/localstack"
- "${TMPDIR:-/tmp/localstack}:/var/lib/localstack"
- "/var/run/docker.sock:/var/run/docker.sock"
localstack_setup:
image: localstack/localstack:2.2.0
image: localstack/localstack:3.3.0
links:
- localstack
depends_on:
Expand All @@ -33,4 +33,4 @@ services:
entrypoint: [ "bash", "-c", "
awslocal --endpoint-url=http://localstack:4566 sqs create-queue --queue-name another-queue --region eu-central-1;
awslocal --endpoint-url=http://localstack:4566 sqs create-queue --queue-name example-queue --region eu-central-1;
" ]
" ]
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,24 @@
import io.github.springwolf.examples.sqs.consumers.ExampleConsumer;
import io.github.springwolf.examples.sqs.dtos.ExamplePayloadDto;
import io.github.springwolf.plugins.sqs.producer.SpringwolfSqsProducer;
import org.junit.jupiter.api.MethodOrderer.OrderAnnotation;
import org.junit.jupiter.api.Order;
import lombok.extern.slf4j.Slf4j;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.TestMethodOrder;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.boot.test.mock.mockito.SpyBean;
import org.springframework.test.annotation.DirtiesContext;
import org.testcontainers.containers.DockerComposeContainer;
import org.testcontainers.containers.wait.strategy.Wait;
import org.testcontainers.junit.jupiter.Container;
import org.testcontainers.junit.jupiter.Testcontainers;

import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.HashMap;
import java.util.Map;
import java.util.Properties;

import static io.github.springwolf.examples.sqs.dtos.ExamplePayloadDto.ExampleEnum.FOO1;
import static org.mockito.Mockito.timeout;
Expand All @@ -31,7 +36,7 @@
webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
@Testcontainers
@DirtiesContext
@TestMethodOrder(OrderAnnotation.class)
@Slf4j
// @Ignore("Uncomment this line if you have issues running this test on your local machine.")
public class ProducerSystemTest {

Expand All @@ -41,12 +46,26 @@ public class ProducerSystemTest {
@SpyBean
ExampleConsumer exampleConsumer;

private static final Map<String, String> ENV = new HashMap<>();

static {
try (InputStream input = new FileInputStream(".env")) {
var properties = new Properties();
properties.load(input);
properties.forEach((key, value) -> ENV.put(String.valueOf(key), String.valueOf(value)));
} catch (IOException e) {
throw new RuntimeException(e);
}
}

@Container
public static DockerComposeContainer<?> environment =
new DockerComposeContainer<>(new File("docker-compose.yml")).withServices("localstack");
public static DockerComposeContainer<?> environment = new DockerComposeContainer<>(new File("docker-compose.yml"))
.withOptions()
.withEnv(ENV)
.withLogConsumer("localstack", l -> log.debug("localstack: {}", l.getUtf8StringWithoutLineEnding()))
.waitingFor("localstack", Wait.forLogMessage(".*Ready.*", 1));

@Test
@Order(2)
void producerCanUseSpringwolfConfigurationToSendMessage() {
// given
ExamplePayloadDto payload = new ExamplePayloadDto();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public class SqsTestContainerExtension implements BeforeAllCallback, ExtensionCo
private static volatile boolean started = false;

static LocalStackContainer localStack =
new LocalStackContainer(DockerImageName.parse("localstack/localstack:2.2.0")).withServices(SQS);
new LocalStackContainer(DockerImageName.parse("localstack/localstack:3.3.0")).withServices(SQS);

@Override
public void beforeAll(ExtensionContext extensionContext) throws Exception {
Expand Down
2 changes: 1 addition & 1 deletion springwolf-plugins/springwolf-sns-plugin/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ plugins {

dependencyManagement {
imports {
mavenBom "io.awspring.cloud:spring-cloud-aws-dependencies:3.1.0"
mavenBom "io.awspring.cloud:spring-cloud-aws-dependencies:3.1.1"
}
}

Expand Down
2 changes: 1 addition & 1 deletion springwolf-plugins/springwolf-sqs-plugin/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ plugins {

dependencyManagement {
imports {
mavenBom "io.awspring.cloud:spring-cloud-aws-dependencies:3.1.0"
mavenBom "io.awspring.cloud:spring-cloud-aws-dependencies:3.1.1"
}
}

Expand Down

0 comments on commit 737e781

Please sign in to comment.