From e015c9579b145d109a6f69dde2d52aba240733f9 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 12 Dec 2024 16:03:32 +0530 Subject: [PATCH] chore(deps): update postgres docker tag to v17 (#1428) * chore(deps): update postgres docker tag to v17 * upgrades tests --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Raja Kolli --- .../docker/docker-compose.yml | 2 +- .../common/TestContainersConfig.java | 2 +- docker-compose.yml | 2 +- .../boot-http-proxy/docker/docker-compose.yml | 2 +- httpClients/boot-http-proxy/pom.xml | 2 +- .../example/rest/proxy/TestApplication.java | 18 +++------------ .../proxy/common/AbstractIntegrationTest.java | 3 +-- .../rest/proxy/common/ContainersConfig.java | 19 ++++++++++++++++ .../docker/docker-compose.yml | 2 +- httpClients/boot-rest-template/pom.xml | 2 +- .../rest/template/TestApplication.java | 16 +++----------- .../common/AbstractIntegrationTest.java | 3 +-- .../template/common/ContainersConfig.java | 17 ++++++++++++++ .../docker/docker-compose-app.yml | 6 ----- .../docker/docker-compose.yml | 12 ---------- .../docker/docker-compose-app.yml | 6 ----- .../docker/docker-compose.yml | 22 ------------------- 17 files changed, 51 insertions(+), 85 deletions(-) create mode 100644 httpClients/boot-http-proxy/src/test/java/com/example/rest/proxy/common/ContainersConfig.java create mode 100644 httpClients/boot-rest-template/src/test/java/com/example/rest/template/common/ContainersConfig.java delete mode 100644 httpClients/boot-web-client-mvc/docker/docker-compose.yml delete mode 100644 httpClients/boot-web-client-webflux/docker/docker-compose.yml diff --git a/batch-boot-jpa-sample/docker/docker-compose.yml b/batch-boot-jpa-sample/docker/docker-compose.yml index 39118e356..d6c33d152 100644 --- a/batch-boot-jpa-sample/docker/docker-compose.yml +++ b/batch-boot-jpa-sample/docker/docker-compose.yml @@ -2,7 +2,7 @@ version: '3.8' services: postgresqldb: - image: postgres:16.6-alpine + image: postgres:17.2-alpine hostname: postgresqldb extra_hosts: [ 'host.docker.internal:host-gateway' ] environment: diff --git a/batch-boot-jpa-sample/src/test/java/com/example/bootbatchjpa/common/TestContainersConfig.java b/batch-boot-jpa-sample/src/test/java/com/example/bootbatchjpa/common/TestContainersConfig.java index d2b6b923b..a372135ee 100644 --- a/batch-boot-jpa-sample/src/test/java/com/example/bootbatchjpa/common/TestContainersConfig.java +++ b/batch-boot-jpa-sample/src/test/java/com/example/bootbatchjpa/common/TestContainersConfig.java @@ -8,5 +8,5 @@ public interface TestContainersConfig { @ServiceConnection PostgreSQLContainer postgreSQLContainer = - new PostgreSQLContainer<>(DockerImageName.parse("postgres").withTag("16.4-alpine")); + new PostgreSQLContainer<>(DockerImageName.parse("postgres").withTag("17.2-alpine")); } diff --git a/docker-compose.yml b/docker-compose.yml index 198eac2ad..430328360 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -24,7 +24,7 @@ services: - MYSQL_DATABASE=mydatabase postgres: - image: postgres:16.6-alpine + image: postgres:17.2-alpine ports: - "5432:5432" volumes: diff --git a/httpClients/boot-http-proxy/docker/docker-compose.yml b/httpClients/boot-http-proxy/docker/docker-compose.yml index 044fd99d9..1ffcd3f6f 100644 --- a/httpClients/boot-http-proxy/docker/docker-compose.yml +++ b/httpClients/boot-http-proxy/docker/docker-compose.yml @@ -2,7 +2,7 @@ version: '3.8' services: postgresqldb: - image: postgres:16.6-alpine + image: postgres:17.2-alpine environment: - POSTGRES_USER=appuser - POSTGRES_PASSWORD=secret diff --git a/httpClients/boot-http-proxy/pom.xml b/httpClients/boot-http-proxy/pom.xml index da4376105..ea5776f33 100644 --- a/httpClients/boot-http-proxy/pom.xml +++ b/httpClients/boot-http-proxy/pom.xml @@ -221,7 +221,7 @@ - 1.22.0 + 1.25.0 diff --git a/httpClients/boot-http-proxy/src/test/java/com/example/rest/proxy/TestApplication.java b/httpClients/boot-http-proxy/src/test/java/com/example/rest/proxy/TestApplication.java index fe5db717e..75164e1a1 100644 --- a/httpClients/boot-http-proxy/src/test/java/com/example/rest/proxy/TestApplication.java +++ b/httpClients/boot-http-proxy/src/test/java/com/example/rest/proxy/TestApplication.java @@ -1,23 +1,11 @@ package com.example.rest.proxy; +import com.example.rest.proxy.common.ContainersConfig; import org.springframework.boot.SpringApplication; -import org.springframework.boot.devtools.restart.RestartScope; -import org.springframework.boot.test.context.TestConfiguration; -import org.springframework.boot.testcontainers.service.connection.ServiceConnection; -import org.springframework.context.annotation.Bean; -import org.testcontainers.containers.PostgreSQLContainer; -@TestConfiguration(proxyBeanMethods = false) -public class TestApplication { - - @Bean - @ServiceConnection - @RestartScope - PostgreSQLContainer postgresContainer() { - return new PostgreSQLContainer<>("postgres:16.3-alpine"); - } +class TestApplication { public static void main(String[] args) { - SpringApplication.from(Application::main).with(TestApplication.class).run(args); + SpringApplication.from(Application::main).with(ContainersConfig.class).run(args); } } diff --git a/httpClients/boot-http-proxy/src/test/java/com/example/rest/proxy/common/AbstractIntegrationTest.java b/httpClients/boot-http-proxy/src/test/java/com/example/rest/proxy/common/AbstractIntegrationTest.java index fa24f979b..61a0325e6 100644 --- a/httpClients/boot-http-proxy/src/test/java/com/example/rest/proxy/common/AbstractIntegrationTest.java +++ b/httpClients/boot-http-proxy/src/test/java/com/example/rest/proxy/common/AbstractIntegrationTest.java @@ -3,7 +3,6 @@ import static com.example.rest.proxy.utils.AppConstants.PROFILE_TEST; import static org.springframework.boot.test.context.SpringBootTest.WebEnvironment.RANDOM_PORT; -import com.example.rest.proxy.TestApplication; import com.fasterxml.jackson.databind.ObjectMapper; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc; @@ -12,7 +11,7 @@ import org.springframework.test.web.servlet.MockMvc; @ActiveProfiles({PROFILE_TEST}) -@SpringBootTest(webEnvironment = RANDOM_PORT, classes = TestApplication.class) +@SpringBootTest(webEnvironment = RANDOM_PORT, classes = ContainersConfig.class) @AutoConfigureMockMvc public abstract class AbstractIntegrationTest { diff --git a/httpClients/boot-http-proxy/src/test/java/com/example/rest/proxy/common/ContainersConfig.java b/httpClients/boot-http-proxy/src/test/java/com/example/rest/proxy/common/ContainersConfig.java new file mode 100644 index 000000000..30bf2a9a0 --- /dev/null +++ b/httpClients/boot-http-proxy/src/test/java/com/example/rest/proxy/common/ContainersConfig.java @@ -0,0 +1,19 @@ +package com.example.rest.proxy.common; + +import org.springframework.boot.devtools.restart.RestartScope; +import org.springframework.boot.test.context.TestConfiguration; +import org.springframework.boot.testcontainers.service.connection.ServiceConnection; +import org.springframework.context.annotation.Bean; +import org.testcontainers.containers.PostgreSQLContainer; +import org.testcontainers.utility.DockerImageName; + +@TestConfiguration(proxyBeanMethods = false) +public class ContainersConfig { + + @Bean + @ServiceConnection + @RestartScope + PostgreSQLContainer postgresContainer() { + return new PostgreSQLContainer<>(DockerImageName.parse("postgres").withTag("17.2-alpine")); + } +} diff --git a/httpClients/boot-rest-template/docker/docker-compose.yml b/httpClients/boot-rest-template/docker/docker-compose.yml index 044fd99d9..1ffcd3f6f 100644 --- a/httpClients/boot-rest-template/docker/docker-compose.yml +++ b/httpClients/boot-rest-template/docker/docker-compose.yml @@ -2,7 +2,7 @@ version: '3.8' services: postgresqldb: - image: postgres:16.6-alpine + image: postgres:17.2-alpine environment: - POSTGRES_USER=appuser - POSTGRES_PASSWORD=secret diff --git a/httpClients/boot-rest-template/pom.xml b/httpClients/boot-rest-template/pom.xml index ee92c94db..cf1703cca 100644 --- a/httpClients/boot-rest-template/pom.xml +++ b/httpClients/boot-rest-template/pom.xml @@ -220,7 +220,7 @@ - 1.22.0 + 1.25.0 diff --git a/httpClients/boot-rest-template/src/test/java/com/example/rest/template/TestApplication.java b/httpClients/boot-rest-template/src/test/java/com/example/rest/template/TestApplication.java index 5ebf83069..5c25f9a20 100644 --- a/httpClients/boot-rest-template/src/test/java/com/example/rest/template/TestApplication.java +++ b/httpClients/boot-rest-template/src/test/java/com/example/rest/template/TestApplication.java @@ -1,21 +1,11 @@ package com.example.rest.template; +import com.example.rest.template.common.ContainersConfig; import org.springframework.boot.SpringApplication; -import org.springframework.boot.test.context.TestConfiguration; -import org.springframework.boot.testcontainers.service.connection.ServiceConnection; -import org.springframework.context.annotation.Bean; -import org.testcontainers.containers.PostgreSQLContainer; -@TestConfiguration(proxyBeanMethods = false) -public class TestApplication { - - @ServiceConnection - @Bean - PostgreSQLContainer postgreSQLContainer() { - return new PostgreSQLContainer<>("postgres:16.3-alpine"); - } +class TestApplication { public static void main(String[] args) { - SpringApplication.from(Application::main).with(TestApplication.class).run(args); + SpringApplication.from(Application::main).with(ContainersConfig.class).run(args); } } diff --git a/httpClients/boot-rest-template/src/test/java/com/example/rest/template/common/AbstractIntegrationTest.java b/httpClients/boot-rest-template/src/test/java/com/example/rest/template/common/AbstractIntegrationTest.java index 9b4157b0d..4b797ff74 100644 --- a/httpClients/boot-rest-template/src/test/java/com/example/rest/template/common/AbstractIntegrationTest.java +++ b/httpClients/boot-rest-template/src/test/java/com/example/rest/template/common/AbstractIntegrationTest.java @@ -3,7 +3,6 @@ import static com.example.rest.template.utils.AppConstants.PROFILE_TEST; import static org.springframework.boot.test.context.SpringBootTest.WebEnvironment.RANDOM_PORT; -import com.example.rest.template.TestApplication; import com.fasterxml.jackson.databind.ObjectMapper; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc; @@ -12,7 +11,7 @@ import org.springframework.test.web.servlet.MockMvc; @ActiveProfiles({PROFILE_TEST}) -@SpringBootTest(webEnvironment = RANDOM_PORT, classes = TestApplication.class) +@SpringBootTest(webEnvironment = RANDOM_PORT, classes = ContainersConfig.class) @AutoConfigureMockMvc public abstract class AbstractIntegrationTest { diff --git a/httpClients/boot-rest-template/src/test/java/com/example/rest/template/common/ContainersConfig.java b/httpClients/boot-rest-template/src/test/java/com/example/rest/template/common/ContainersConfig.java new file mode 100644 index 000000000..eb7acf0c9 --- /dev/null +++ b/httpClients/boot-rest-template/src/test/java/com/example/rest/template/common/ContainersConfig.java @@ -0,0 +1,17 @@ +package com.example.rest.template.common; + +import org.springframework.boot.test.context.TestConfiguration; +import org.springframework.boot.testcontainers.service.connection.ServiceConnection; +import org.springframework.context.annotation.Bean; +import org.testcontainers.containers.PostgreSQLContainer; +import org.testcontainers.utility.DockerImageName; + +@TestConfiguration(proxyBeanMethods = false) +public class ContainersConfig { + + @Bean + @ServiceConnection + PostgreSQLContainer postgresContainer() { + return new PostgreSQLContainer<>(DockerImageName.parse("postgres").withTag("17.2-alpine")); + } +} diff --git a/httpClients/boot-web-client-mvc/docker/docker-compose-app.yml b/httpClients/boot-web-client-mvc/docker/docker-compose-app.yml index 46b771f3b..f6214380f 100644 --- a/httpClients/boot-web-client-mvc/docker/docker-compose-app.yml +++ b/httpClients/boot-web-client-mvc/docker/docker-compose-app.yml @@ -7,11 +7,5 @@ services: - "18080:8080" - "18787:8787" restart: always - depends_on: - - postgresqldb environment: - SPRING_PROFILES_ACTIVE=docker - - SPRING_DATASOURCE_DRIVER_CLASS_NAME=org.postgresql.Driver - - SPRING_DATASOURCE_URL=jdbc:postgresql://postgresqldb:5432/appdb - - SPRING_DATASOURCE_USERNAME=appuser - - SPRING_DATASOURCE_PASSWORD=secret diff --git a/httpClients/boot-web-client-mvc/docker/docker-compose.yml b/httpClients/boot-web-client-mvc/docker/docker-compose.yml deleted file mode 100644 index 044fd99d9..000000000 --- a/httpClients/boot-web-client-mvc/docker/docker-compose.yml +++ /dev/null @@ -1,12 +0,0 @@ -version: '3.8' -services: - - postgresqldb: - image: postgres:16.6-alpine - environment: - - POSTGRES_USER=appuser - - POSTGRES_PASSWORD=secret - - POSTGRES_DB=appdb - ports: - - "5432:5432" - diff --git a/httpClients/boot-web-client-webflux/docker/docker-compose-app.yml b/httpClients/boot-web-client-webflux/docker/docker-compose-app.yml index 21c712d36..dc82e2fd7 100644 --- a/httpClients/boot-web-client-webflux/docker/docker-compose-app.yml +++ b/httpClients/boot-web-client-webflux/docker/docker-compose-app.yml @@ -7,11 +7,5 @@ services: - "18080:8080" - "18787:8787" restart: always - depends_on: - - postgresqldb environment: - SPRING_PROFILES_ACTIVE=docker - - SPRING_DATASOURCE_DRIVER_CLASS_NAME=org.postgresql.Driver - - SPRING_DATASOURCE_URL=jdbc:postgresql://postgresqldb:5432/appdb - - SPRING_DATASOURCE_USERNAME=appuser - - SPRING_DATASOURCE_PASSWORD=secret diff --git a/httpClients/boot-web-client-webflux/docker/docker-compose.yml b/httpClients/boot-web-client-webflux/docker/docker-compose.yml deleted file mode 100644 index 7869132fa..000000000 --- a/httpClients/boot-web-client-webflux/docker/docker-compose.yml +++ /dev/null @@ -1,22 +0,0 @@ -version: '3.8' -services: - - postgresqldb: - image: postgres:16.6-alpine - environment: - - POSTGRES_USER=appuser - - POSTGRES_PASSWORD=secret - - POSTGRES_DB=appdb - ports: - - "5432:5432" - - pgadmin4: - image: dpage/pgadmin4 - ports: - - "5050:80" - depends_on: - - postgresqldb - environment: - - PGADMIN_DEFAULT_EMAIL=pgadmin4@pgadmin.org - - PGADMIN_DEFAULT_PASSWORD=admin -