From 22559c8330ede3790c57a7e8dc1bb5b4a3b2e577 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 27 Dec 2024 13:27:58 +0530 Subject: [PATCH] fix(deps): update dependency org.springframework.cloud:spring-cloud-dependencies to v2024 (#808) * fix(deps): update dependency org.springframework.cloud:spring-cloud-dependencies to v2024 * upgrade localstack version --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Raja Kolli --- aws-lambda-project/docker/docker-compose.yml | 2 +- aws-lambda-project/pom.xml | 2 +- .../awslambda/ApplicationIntegrationTest.java | 4 ++-- .../learning/awslambda/SchemaValidationTest.java | 14 ++++++++++++-- .../awslambda/common/ContainersConfig.java | 2 +- .../web/controllers/ActorControllerTest.java | 4 ++-- 6 files changed, 19 insertions(+), 9 deletions(-) diff --git a/aws-lambda-project/docker/docker-compose.yml b/aws-lambda-project/docker/docker-compose.yml index 517a2050..0ac24ade 100644 --- a/aws-lambda-project/docker/docker-compose.yml +++ b/aws-lambda-project/docker/docker-compose.yml @@ -13,7 +13,7 @@ services: - aws-lambda localstack: - image: localstack/localstack:3.8.1 + image: localstack/localstack:4.0.3 ports: - "127.0.0.1:4566:4566" # LocalStack Gateway - "127.0.0.1:4510-4559:4510-4559" # external services port range diff --git a/aws-lambda-project/pom.xml b/aws-lambda-project/pom.xml index bb3d6922..91eac917 100644 --- a/aws-lambda-project/pom.xml +++ b/aws-lambda-project/pom.xml @@ -20,7 +20,7 @@ UTF-8 21 - 2023.0.4 + 2024.0.0 3.2.1 2.2.0 1.0.31.RELEASE diff --git a/aws-lambda-project/src/test/java/com/learning/awslambda/ApplicationIntegrationTest.java b/aws-lambda-project/src/test/java/com/learning/awslambda/ApplicationIntegrationTest.java index e0ff2e53..1ab43a93 100644 --- a/aws-lambda-project/src/test/java/com/learning/awslambda/ApplicationIntegrationTest.java +++ b/aws-lambda-project/src/test/java/com/learning/awslambda/ApplicationIntegrationTest.java @@ -57,14 +57,14 @@ class ApplicationIntegrationTest { static Network network = Network.newNetwork(); @Container - static PostgreSQLContainer postgres = new PostgreSQLContainer<>("postgres:16.4-alpine") + static PostgreSQLContainer postgres = new PostgreSQLContainer<>("postgres:17.2-alpine") .withNetwork(network) .withNetworkAliases("postgres") .withReuse(true); @Container static LocalStackContainer localstack = new LocalStackContainer( - DockerImageName.parse("localstack/localstack").withTag("3.7.2")) + DockerImageName.parse("localstack/localstack").withTag("4.0.3")) .withNetwork(network) .withEnv("LOCALSTACK_HOST", "localhost.localstack.cloud") .withEnv("LAMBDA_DOCKER_NETWORK", ((Network.NetworkImpl) network).getName()) diff --git a/aws-lambda-project/src/test/java/com/learning/awslambda/SchemaValidationTest.java b/aws-lambda-project/src/test/java/com/learning/awslambda/SchemaValidationTest.java index 1da30620..c891e890 100644 --- a/aws-lambda-project/src/test/java/com/learning/awslambda/SchemaValidationTest.java +++ b/aws-lambda-project/src/test/java/com/learning/awslambda/SchemaValidationTest.java @@ -1,14 +1,24 @@ package com.learning.awslambda; +import static org.assertj.core.api.Assertions.assertThat; + import com.learning.awslambda.common.ContainersConfig; +import com.zaxxer.hikari.HikariDataSource; +import javax.sql.DataSource; import org.junit.jupiter.api.Test; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.autoconfigure.orm.jpa.DataJpaTest; import org.springframework.context.annotation.Import; -@DataJpaTest(properties = {"spring.jpa.hibernate.ddl-auto=validate", "spring.test.database.replace=none"}) +@DataJpaTest(properties = {"spring.jpa.hibernate.ddl-auto=validate"}) @Import(ContainersConfig.class) class SchemaValidationTest { + @Autowired + DataSource dataSource; + @Test - void validateJpaMappingsWithDbSchema() {} + void validateJpaMappingsWithDbSchema() { + assertThat(dataSource).isInstanceOf(HikariDataSource.class); + } } diff --git a/aws-lambda-project/src/test/java/com/learning/awslambda/common/ContainersConfig.java b/aws-lambda-project/src/test/java/com/learning/awslambda/common/ContainersConfig.java index 2c003583..2aafa64b 100644 --- a/aws-lambda-project/src/test/java/com/learning/awslambda/common/ContainersConfig.java +++ b/aws-lambda-project/src/test/java/com/learning/awslambda/common/ContainersConfig.java @@ -12,6 +12,6 @@ public class ContainersConfig { @Bean @ServiceConnection PostgreSQLContainer postgreSQLContainer() { - return new PostgreSQLContainer<>(DockerImageName.parse("postgres:17.0-alpine")); + return new PostgreSQLContainer<>(DockerImageName.parse("postgres:17.2-alpine")); } } diff --git a/aws-lambda-project/src/test/java/com/learning/awslambda/web/controllers/ActorControllerTest.java b/aws-lambda-project/src/test/java/com/learning/awslambda/web/controllers/ActorControllerTest.java index 112e9a0e..d5d07547 100644 --- a/aws-lambda-project/src/test/java/com/learning/awslambda/web/controllers/ActorControllerTest.java +++ b/aws-lambda-project/src/test/java/com/learning/awslambda/web/controllers/ActorControllerTest.java @@ -17,8 +17,8 @@ import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.autoconfigure.web.servlet.WebMvcTest; -import org.springframework.boot.test.mock.mockito.MockBean; import org.springframework.test.context.ActiveProfiles; +import org.springframework.test.context.bean.override.mockito.MockitoBean; import org.springframework.test.web.servlet.MockMvc; @WebMvcTest(controllers = ActorController.class) @@ -28,7 +28,7 @@ class ActorControllerTest { @Autowired private MockMvc mockMvc; - @MockBean + @MockitoBean private ActorService actorService; @Autowired