From e30ae372e3d6894a9f2a8a0321b7617e6c546d77 Mon Sep 17 00:00:00 2001 From: Andy Wilkinson Date: Fri, 7 Mar 2025 16:53:02 +0000 Subject: [PATCH] Move resources into same packages as documentation tests See gh-44639 --- .../env/EnvironmentEndpointDocumentationTests.java | 2 +- .../flyway/FlywayEndpointDocumentationTests.java | 2 +- .../LiquibaseEndpointDocumentationTests.java | 2 +- .../LogFileWebEndpointDocumentationTests.java | 2 +- .../sbom/SbomEndpointDocumentationTests.java | 3 +-- .../documentation => env}/application.properties | 0 .../web/documentation => flyway}/V1__init.sql | 0 .../db.changelog-master.yaml | 0 .../web/documentation => logging}/sample.log | 0 .../sample.log.2021-06-15.0.gz | Bin .../web/documentation => sbom}/cyclonedx.json | 0 11 files changed, 5 insertions(+), 6 deletions(-) rename spring-boot-project/spring-boot-actuator-autoconfigure/src/test/resources/org/springframework/boot/actuate/autoconfigure/{endpoint/web/documentation => env}/application.properties (100%) rename spring-boot-project/spring-boot-actuator-autoconfigure/src/test/resources/org/springframework/boot/actuate/autoconfigure/{endpoint/web/documentation => flyway}/V1__init.sql (100%) rename spring-boot-project/spring-boot-actuator-autoconfigure/src/test/resources/org/springframework/boot/actuate/autoconfigure/{endpoint/web/documentation => liquibase}/db.changelog-master.yaml (100%) rename spring-boot-project/spring-boot-actuator-autoconfigure/src/test/resources/org/springframework/boot/actuate/autoconfigure/{endpoint/web/documentation => logging}/sample.log (100%) rename spring-boot-project/spring-boot-actuator-autoconfigure/src/test/resources/org/springframework/boot/actuate/autoconfigure/{endpoint/web/documentation => logging}/sample.log.2021-06-15.0.gz (100%) rename spring-boot-project/spring-boot-actuator-autoconfigure/src/test/resources/org/springframework/boot/actuate/autoconfigure/{endpoint/web/documentation => sbom}/cyclonedx.json (100%) diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/env/EnvironmentEndpointDocumentationTests.java b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/env/EnvironmentEndpointDocumentationTests.java index 499f6c8a7bd..d5a13f92400 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/env/EnvironmentEndpointDocumentationTests.java +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/env/EnvironmentEndpointDocumentationTests.java @@ -58,7 +58,7 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers. * @author Andy Wilkinson */ @TestPropertySource( - properties = "spring.config.location=classpath:/org/springframework/boot/actuate/autoconfigure/endpoint/web/documentation/") + properties = "spring.config.location=classpath:/org/springframework/boot/actuate/autoconfigure/env/") class EnvironmentEndpointDocumentationTests extends MockMvcEndpointDocumentationTests { private static final FieldDescriptor activeProfiles = fieldWithPath("activeProfiles") diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/flyway/FlywayEndpointDocumentationTests.java b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/flyway/FlywayEndpointDocumentationTests.java index c637484ac8c..013327e257b 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/flyway/FlywayEndpointDocumentationTests.java +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/flyway/FlywayEndpointDocumentationTests.java @@ -47,7 +47,7 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers. * @author Andy Wilkinson */ @TestPropertySource( - properties = "spring.flyway.locations=classpath:org/springframework/boot/actuate/autoconfigure/endpoint/web/documentation") + properties = "spring.flyway.locations=classpath:org/springframework/boot/actuate/autoconfigure/flyway") class FlywayEndpointDocumentationTests extends MockMvcEndpointDocumentationTests { @Test diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/liquibase/LiquibaseEndpointDocumentationTests.java b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/liquibase/LiquibaseEndpointDocumentationTests.java index 0ad7b36cf94..a7022fa8e53 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/liquibase/LiquibaseEndpointDocumentationTests.java +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/liquibase/LiquibaseEndpointDocumentationTests.java @@ -45,7 +45,7 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers. * @author Andy Wilkinson */ @TestPropertySource( - properties = "spring.liquibase.change-log=classpath:org/springframework/boot/actuate/autoconfigure/endpoint/web/documentation/db.changelog-master.yaml") + properties = "spring.liquibase.change-log=classpath:org/springframework/boot/actuate/autoconfigure/liquibase/db.changelog-master.yaml") class LiquibaseEndpointDocumentationTests extends MockMvcEndpointDocumentationTests { @Test diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/logging/LogFileWebEndpointDocumentationTests.java b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/logging/LogFileWebEndpointDocumentationTests.java index 3e81f0eb4b6..4825759d825 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/logging/LogFileWebEndpointDocumentationTests.java +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/logging/LogFileWebEndpointDocumentationTests.java @@ -57,7 +57,7 @@ class LogFileWebEndpointDocumentationTests extends MockMvcEndpointDocumentationT LogFileWebEndpoint endpoint() { MockEnvironment environment = new MockEnvironment(); environment.setProperty("logging.file.name", - "src/test/resources/org/springframework/boot/actuate/autoconfigure/endpoint/web/documentation/sample.log"); + "src/test/resources/org/springframework/boot/actuate/autoconfigure/logging/sample.log"); return new LogFileWebEndpoint(LogFile.get(environment), null); } diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/sbom/SbomEndpointDocumentationTests.java b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/sbom/SbomEndpointDocumentationTests.java index 3eda91f801b..b1dfc18d134 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/sbom/SbomEndpointDocumentationTests.java +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/sbom/SbomEndpointDocumentationTests.java @@ -61,8 +61,7 @@ class SbomEndpointDocumentationTests extends MockMvcEndpointDocumentationTests { SbomProperties sbomProperties() { SbomProperties properties = new SbomProperties(); properties.getApplication() - .setLocation( - "classpath:org/springframework/boot/actuate/autoconfigure/endpoint/web/documentation/cyclonedx.json"); + .setLocation("classpath:org/springframework/boot/actuate/autoconfigure/sbom/cyclonedx.json"); return properties; } diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/resources/org/springframework/boot/actuate/autoconfigure/endpoint/web/documentation/application.properties b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/resources/org/springframework/boot/actuate/autoconfigure/env/application.properties similarity index 100% rename from spring-boot-project/spring-boot-actuator-autoconfigure/src/test/resources/org/springframework/boot/actuate/autoconfigure/endpoint/web/documentation/application.properties rename to spring-boot-project/spring-boot-actuator-autoconfigure/src/test/resources/org/springframework/boot/actuate/autoconfigure/env/application.properties diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/resources/org/springframework/boot/actuate/autoconfigure/endpoint/web/documentation/V1__init.sql b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/resources/org/springframework/boot/actuate/autoconfigure/flyway/V1__init.sql similarity index 100% rename from spring-boot-project/spring-boot-actuator-autoconfigure/src/test/resources/org/springframework/boot/actuate/autoconfigure/endpoint/web/documentation/V1__init.sql rename to spring-boot-project/spring-boot-actuator-autoconfigure/src/test/resources/org/springframework/boot/actuate/autoconfigure/flyway/V1__init.sql diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/resources/org/springframework/boot/actuate/autoconfigure/endpoint/web/documentation/db.changelog-master.yaml b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/resources/org/springframework/boot/actuate/autoconfigure/liquibase/db.changelog-master.yaml similarity index 100% rename from spring-boot-project/spring-boot-actuator-autoconfigure/src/test/resources/org/springframework/boot/actuate/autoconfigure/endpoint/web/documentation/db.changelog-master.yaml rename to spring-boot-project/spring-boot-actuator-autoconfigure/src/test/resources/org/springframework/boot/actuate/autoconfigure/liquibase/db.changelog-master.yaml diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/resources/org/springframework/boot/actuate/autoconfigure/endpoint/web/documentation/sample.log b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/resources/org/springframework/boot/actuate/autoconfigure/logging/sample.log similarity index 100% rename from spring-boot-project/spring-boot-actuator-autoconfigure/src/test/resources/org/springframework/boot/actuate/autoconfigure/endpoint/web/documentation/sample.log rename to spring-boot-project/spring-boot-actuator-autoconfigure/src/test/resources/org/springframework/boot/actuate/autoconfigure/logging/sample.log diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/resources/org/springframework/boot/actuate/autoconfigure/endpoint/web/documentation/sample.log.2021-06-15.0.gz b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/resources/org/springframework/boot/actuate/autoconfigure/logging/sample.log.2021-06-15.0.gz similarity index 100% rename from spring-boot-project/spring-boot-actuator-autoconfigure/src/test/resources/org/springframework/boot/actuate/autoconfigure/endpoint/web/documentation/sample.log.2021-06-15.0.gz rename to spring-boot-project/spring-boot-actuator-autoconfigure/src/test/resources/org/springframework/boot/actuate/autoconfigure/logging/sample.log.2021-06-15.0.gz diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/resources/org/springframework/boot/actuate/autoconfigure/endpoint/web/documentation/cyclonedx.json b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/resources/org/springframework/boot/actuate/autoconfigure/sbom/cyclonedx.json similarity index 100% rename from spring-boot-project/spring-boot-actuator-autoconfigure/src/test/resources/org/springframework/boot/actuate/autoconfigure/endpoint/web/documentation/cyclonedx.json rename to spring-boot-project/spring-boot-actuator-autoconfigure/src/test/resources/org/springframework/boot/actuate/autoconfigure/sbom/cyclonedx.json