From ba053dbaac3c9cf4a44838a8ced4e0e0fb8d3280 Mon Sep 17 00:00:00 2001 From: Andy Wilkinson Date: Tue, 25 Jun 2024 17:22:41 +0100 Subject: [PATCH] Update spring-boot-actuator to use docker-test plugin See gh-41228 --- .../spring-boot-actuator/build.gradle | 16 ++++++++++++---- .../metrics/cache/RedisCacheMetricsTests.java | 0 .../MongoHealthIndicatorIntegrationTests.java | 0 ...oReactiveHealthIndicatorIntegrationTests.java | 0 ...jReactiveHealthIndicatorIntegrationTests.java | 0 5 files changed, 12 insertions(+), 4 deletions(-) rename spring-boot-project/spring-boot-actuator/src/{test => dockerTest}/java/org/springframework/boot/actuate/metrics/cache/RedisCacheMetricsTests.java (100%) rename spring-boot-project/spring-boot-actuator/src/{test => dockerTest}/java/org/springframework/boot/actuate/mongo/MongoHealthIndicatorIntegrationTests.java (100%) rename spring-boot-project/spring-boot-actuator/src/{test => dockerTest}/java/org/springframework/boot/actuate/mongo/MongoReactiveHealthIndicatorIntegrationTests.java (100%) rename spring-boot-project/spring-boot-actuator/src/{test => dockerTest}/java/org/springframework/boot/actuate/neo4j/Neo4jReactiveHealthIndicatorIntegrationTests.java (100%) diff --git a/spring-boot-project/spring-boot-actuator/build.gradle b/spring-boot-project/spring-boot-actuator/build.gradle index 4218edbb766..b793b0f8ab1 100644 --- a/spring-boot-project/spring-boot-actuator/build.gradle +++ b/spring-boot-project/spring-boot-actuator/build.gradle @@ -3,6 +3,7 @@ plugins { id "org.springframework.boot.conventions" id "org.springframework.boot.configuration-properties" id "org.springframework.boot.optional-dependencies" + id "org.springframework.boot.docker-test" id "org.springframework.boot.deployed" } @@ -10,6 +11,17 @@ description = "Spring Boot Actuator" dependencies { api(project(":spring-boot-project:spring-boot")) + + dockerTestImplementation(project(":spring-boot-project:spring-boot-autoconfigure")) + dockerTestImplementation(project(":spring-boot-project:spring-boot-test")) + dockerTestImplementation(project(":spring-boot-project:spring-boot-tools:spring-boot-test-support")) + dockerTestImplementation("org.assertj:assertj-core") + dockerTestImplementation("org.junit.jupiter:junit-jupiter") + dockerTestImplementation("org.springframework:spring-test") + dockerTestImplementation("org.testcontainers:junit-jupiter") + dockerTestImplementation("org.testcontainers:mongodb") + dockerTestImplementation("org.testcontainers:neo4j") + dockerTestImplementation("org.testcontainers:testcontainers") optional("com.datastax.oss:java-driver-core") { exclude group: "org.slf4j", module: "jcl-over-slf4j" @@ -98,10 +110,6 @@ dependencies { testImplementation("org.skyscreamer:jsonassert") testImplementation("org.springframework:spring-test") testImplementation("com.squareup.okhttp3:mockwebserver") - testImplementation("org.testcontainers:junit-jupiter") - testImplementation("org.testcontainers:mongodb") - testImplementation("org.testcontainers:neo4j") - testImplementation("org.testcontainers:testcontainers") testRuntimeOnly("ch.qos.logback:logback-classic") testRuntimeOnly("io.projectreactor.netty:reactor-netty-http") diff --git a/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/metrics/cache/RedisCacheMetricsTests.java b/spring-boot-project/spring-boot-actuator/src/dockerTest/java/org/springframework/boot/actuate/metrics/cache/RedisCacheMetricsTests.java similarity index 100% rename from spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/metrics/cache/RedisCacheMetricsTests.java rename to spring-boot-project/spring-boot-actuator/src/dockerTest/java/org/springframework/boot/actuate/metrics/cache/RedisCacheMetricsTests.java diff --git a/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/mongo/MongoHealthIndicatorIntegrationTests.java b/spring-boot-project/spring-boot-actuator/src/dockerTest/java/org/springframework/boot/actuate/mongo/MongoHealthIndicatorIntegrationTests.java similarity index 100% rename from spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/mongo/MongoHealthIndicatorIntegrationTests.java rename to spring-boot-project/spring-boot-actuator/src/dockerTest/java/org/springframework/boot/actuate/mongo/MongoHealthIndicatorIntegrationTests.java diff --git a/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/mongo/MongoReactiveHealthIndicatorIntegrationTests.java b/spring-boot-project/spring-boot-actuator/src/dockerTest/java/org/springframework/boot/actuate/mongo/MongoReactiveHealthIndicatorIntegrationTests.java similarity index 100% rename from spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/mongo/MongoReactiveHealthIndicatorIntegrationTests.java rename to spring-boot-project/spring-boot-actuator/src/dockerTest/java/org/springframework/boot/actuate/mongo/MongoReactiveHealthIndicatorIntegrationTests.java diff --git a/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/neo4j/Neo4jReactiveHealthIndicatorIntegrationTests.java b/spring-boot-project/spring-boot-actuator/src/dockerTest/java/org/springframework/boot/actuate/neo4j/Neo4jReactiveHealthIndicatorIntegrationTests.java similarity index 100% rename from spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/neo4j/Neo4jReactiveHealthIndicatorIntegrationTests.java rename to spring-boot-project/spring-boot-actuator/src/dockerTest/java/org/springframework/boot/actuate/neo4j/Neo4jReactiveHealthIndicatorIntegrationTests.java