Skip to content

Commit d7ed900

Browse files
committed
Move actuator test support out spring-boot-actuator-integration-tests
1 parent b44f7a1 commit d7ed900

File tree

11 files changed

+68
-20
lines changed

11 files changed

+68
-20
lines changed

settings.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ include "spring-boot-project:spring-boot-actuator-autoconfigure"
4646
include "spring-boot-project:spring-boot-actuator-autoconfigure-all"
4747
include "spring-boot-project:spring-boot-actuator-docs"
4848
include "spring-boot-project:spring-boot-actuator-integration-tests"
49+
include "spring-boot-project:spring-boot-actuator-test-support"
4950
include "spring-boot-project:spring-boot-amqp"
5051
include "spring-boot-project:spring-boot-artemis"
5152
include "spring-boot-project:spring-boot-autoconfigure"

spring-boot-project/spring-boot-actuator-integration-tests/build.gradle

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,13 @@
11
plugins {
22
id "java-library"
3-
id "java-test-fixtures"
43
}
54

65
description = "Spring Boot Actuator Integration Tests"
76

87

98
dependencies {
10-
testFixturesImplementation(project(":spring-boot-project:spring-boot-actuator"))
11-
testFixturesImplementation(project(":spring-boot-project:spring-boot-autoconfigure"))
12-
testFixturesImplementation(project(":spring-boot-project:spring-boot-http-converter"))
13-
testFixturesImplementation(project(":spring-boot-project:spring-boot-jackson"))
14-
testFixturesImplementation(project(":spring-boot-project:spring-boot-jersey"))
15-
testFixturesImplementation(project(":spring-boot-project:spring-boot-reactor-netty"))
16-
testFixturesImplementation(project(":spring-boot-project:spring-boot-test"))
17-
testFixturesImplementation(project(":spring-boot-project:spring-boot-tomcat"))
18-
testFixturesImplementation(project(":spring-boot-project:spring-boot-tools:spring-boot-test-support"))
19-
testFixturesImplementation(project(":spring-boot-project:spring-boot-webflux"))
20-
testFixturesImplementation(project(":spring-boot-project:spring-boot-webmvc"))
21-
testFixturesImplementation("com.fasterxml.jackson.datatype:jackson-datatype-jsr310")
229
testImplementation(project(":spring-boot-project:spring-boot-actuator"))
10+
testImplementation(project(":spring-boot-project:spring-boot-actuator-test-support"))
2311
testImplementation(project(":spring-boot-project:spring-boot-autoconfigure"))
2412
testImplementation(project(":spring-boot-project:spring-boot-http-converter"))
2513
testImplementation(project(":spring-boot-project:spring-boot-jackson"))
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
plugins {
2+
id "java-library"
3+
id "org.springframework.boot.optional-dependencies"
4+
}
5+
6+
description = "Spring Boot Actuator Testing Support"
7+
8+
dependencies {
9+
api(project(":spring-boot-project:spring-boot-actuator"))
10+
api(project(":spring-boot-project:spring-boot-autoconfigure"))
11+
api(project(":spring-boot-project:spring-boot-http-converter"))
12+
api(project(":spring-boot-project:spring-boot-jackson"))
13+
api(project(":spring-boot-project:spring-boot-jersey"))
14+
api(project(":spring-boot-project:spring-boot-reactor-netty"))
15+
api(project(":spring-boot-project:spring-boot-test"))
16+
api(project(":spring-boot-project:spring-boot-tomcat"))
17+
api(project(":spring-boot-project:spring-boot-tools:spring-boot-test-support"))
18+
api(project(":spring-boot-project:spring-boot-webflux"))
19+
api(project(":spring-boot-project:spring-boot-webmvc"))
20+
api("com.fasterxml.jackson.datatype:jackson-datatype-jsr310")
21+
api("com.jayway.jsonpath:json-path")
22+
api("org.assertj:assertj-core")
23+
api("org.awaitility:awaitility")
24+
api("org.hamcrest:hamcrest-core")
25+
api("org.hamcrest:hamcrest-library")
26+
api("org.junit.jupiter:junit-jupiter")
27+
api("org.mockito:mockito-core")
28+
api("org.mockito:mockito-junit-jupiter")
29+
api("org.skyscreamer:jsonassert")
30+
api("org.springframework:spring-core")
31+
api("org.springframework:spring-test")
32+
api("org.springframework:spring-core-test")
33+
34+
compileOnly("org.junit.platform:junit-platform-engine")
35+
compileOnly("org.junit.platform:junit-platform-launcher")
36+
compileOnly("org.springframework:spring-context")
37+
}

spring-boot-project/spring-boot-actuator-integration-tests/src/testFixtures/java/org/springframework/boot/actuate/endpoint/web/test/WebEndpointTest.java renamed to spring-boot-project/spring-boot-actuator-test-support/src/main/java/org/springframework/boot/actuate/endpoint/web/test/WebEndpointTest.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2024 the original author or authors.
2+
* Copyright 2012-2025 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -31,9 +31,10 @@
3131

3232
/**
3333
* Signals that a test should be run against one or more of the web endpoint
34-
* infrastructure implementations (Jersey, Web MVC, and WebFlux)
34+
* infrastructure implementations (Jersey, Web MVC, and WebFlux).
3535
*
3636
* @author Andy Wilkinson
37+
* @since 4.0.0
3738
*/
3839
@Retention(RetentionPolicy.RUNTIME)
3940
@Target(ElementType.METHOD)

spring-boot-project/spring-boot-actuator-integration-tests/src/testFixtures/java/org/springframework/boot/actuate/endpoint/web/test/WebEndpointTestInvocationContextProvider.java renamed to spring-boot-project/spring-boot-actuator-test-support/src/main/java/org/springframework/boot/actuate/endpoint/web/test/WebEndpointTestInvocationContextProvider.java

File renamed without changes.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
/*
2+
* Copyright 2012-2025 the original author or authors.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* https://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
/**
18+
* Support for testing endpoints against one or more of the web endpoint infrastructure
19+
* implementations.
20+
*/
21+
package org.springframework.boot.actuate.endpoint.web.test;

spring-boot-project/spring-boot-cache/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,9 @@ dependencies {
4444
dockerTestImplementation("org.testcontainers:junit-jupiter")
4545
dockerTestImplementation("org.testcontainers:testcontainers")
4646

47+
testImplementation(project(":spring-boot-project:spring-boot-actuator-test-support"))
4748
testImplementation(project(":spring-boot-project:spring-boot-test"))
4849
testImplementation(project(":spring-boot-project:spring-boot-tools:spring-boot-test-support"))
49-
testImplementation(testFixtures(project(":spring-boot-project:spring-boot-actuator-integration-tests")))
5050
testImplementation(testFixtures(project(":spring-boot-project:spring-boot-autoconfigure")))
5151

5252
testRuntimeOnly("ch.qos.logback:logback-classic")

spring-boot-project/spring-boot-integration/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@ dependencies {
2222
optional("org.springframework.integration:spring-integration-jmx")
2323
optional("org.springframework.integration:spring-integration-rsocket")
2424

25+
testImplementation(project(":spring-boot-project:spring-boot-actuator-test-support"))
2526
testImplementation(project(":spring-boot-project:spring-boot-flyway"))
2627
testImplementation(project(":spring-boot-project:spring-boot-rsocket"))
2728
testImplementation(project(":spring-boot-project:spring-boot-test"))
2829
testImplementation(project(":spring-boot-project:spring-boot-tools:spring-boot-test-support"))
29-
testImplementation(testFixtures(project(":spring-boot-project:spring-boot-actuator-integration-tests")))
3030
testImplementation("org.springframework:spring-web")
3131

3232
testRuntimeOnly(project(":spring-boot-project:spring-boot-reactor-netty"))

spring-boot-project/spring-boot-metrics/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ dependencies {
2020
optional("org.apache.logging.log4j:log4j-core")
2121
optional("org.aspectj:aspectjweaver")
2222

23+
testImplementation(project(":spring-boot-project:spring-boot-actuator-test-support"))
2324
testImplementation(project(":spring-boot-project:spring-boot-test"))
2425
testImplementation(project(":spring-boot-project:spring-boot-tools:spring-boot-test-support"))
25-
testImplementation(testFixtures(project(":spring-boot-project:spring-boot-actuator-integration-tests")))
2626
testImplementation("com.fasterxml.jackson.core:jackson-databind")
2727
testImplementation("io.micrometer:micrometer-registry-atlas")
2828
testImplementation("io.micrometer:micrometer-registry-new-relic")

spring-boot-project/spring-boot-quartz/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@ dependencies {
1919
optional(project(":spring-boot-project:spring-boot-autoconfigure"))
2020
optional(project(":spring-boot-project:spring-boot-jdbc"))
2121

22+
testImplementation(project(":spring-boot-project:spring-boot-actuator-test-support"))
2223
testImplementation(project(":spring-boot-project:spring-boot-flyway"))
2324
testImplementation(project(":spring-boot-project:spring-boot-liquibase"))
2425
testImplementation(project(":spring-boot-project:spring-boot-test"))
2526
testImplementation(project(":spring-boot-project:spring-boot-tools:spring-boot-test-support"))
26-
testImplementation(testFixtures(project(":spring-boot-project:spring-boot-actuator-integration-tests")))
2727
testImplementation("net.minidev:json-smart")
2828
testImplementation("org.springframework:spring-web")
2929

0 commit comments

Comments
 (0)