mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-08-29 03:06:45 +08:00
Merge branch '2.7.x' into 3.0.x
Closes gh-38091
This commit is contained in:
commit
66ae086a15
@ -46,7 +46,7 @@ class ArchitectureCheckTests {
|
|||||||
void whenPackagesAreTangledTaskFailsAndWritesAReport() throws Exception {
|
void whenPackagesAreTangledTaskFailsAndWritesAReport() throws Exception {
|
||||||
prepareTask("tangled", (architectureCheck) -> {
|
prepareTask("tangled", (architectureCheck) -> {
|
||||||
assertThatExceptionOfType(GradleException.class).isThrownBy(architectureCheck::checkArchitecture);
|
assertThatExceptionOfType(GradleException.class).isThrownBy(architectureCheck::checkArchitecture);
|
||||||
assertThat(failureReport(architectureCheck).length()).isGreaterThan(0);
|
assertThat(failureReport(architectureCheck)).isNotEmpty();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -54,7 +54,7 @@ class ArchitectureCheckTests {
|
|||||||
void whenPackagesAreNotTangledTaskSucceedsAndWritesAnEmptyReport() throws Exception {
|
void whenPackagesAreNotTangledTaskSucceedsAndWritesAnEmptyReport() throws Exception {
|
||||||
prepareTask("untangled", (architectureCheck) -> {
|
prepareTask("untangled", (architectureCheck) -> {
|
||||||
architectureCheck.checkArchitecture();
|
architectureCheck.checkArchitecture();
|
||||||
assertThat(failureReport(architectureCheck).length()).isZero();
|
assertThat(failureReport(architectureCheck)).isEmpty();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -66,7 +66,7 @@ class ArchitectureCheckTests {
|
|||||||
void whenBeanPostProcessorBeanMethodIsNotStaticTaskFailsAndWritesAReport() throws Exception {
|
void whenBeanPostProcessorBeanMethodIsNotStaticTaskFailsAndWritesAReport() throws Exception {
|
||||||
prepareTask("bpp/nonstatic", (architectureCheck) -> {
|
prepareTask("bpp/nonstatic", (architectureCheck) -> {
|
||||||
assertThatExceptionOfType(GradleException.class).isThrownBy(architectureCheck::checkArchitecture);
|
assertThatExceptionOfType(GradleException.class).isThrownBy(architectureCheck::checkArchitecture);
|
||||||
assertThat(failureReport(architectureCheck).length()).isGreaterThan(0);
|
assertThat(failureReport(architectureCheck)).isNotEmpty();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -74,7 +74,7 @@ class ArchitectureCheckTests {
|
|||||||
void whenBeanPostProcessorBeanMethodIsStaticAndHasUnsafeParametersTaskFailsAndWritesAReport() throws Exception {
|
void whenBeanPostProcessorBeanMethodIsStaticAndHasUnsafeParametersTaskFailsAndWritesAReport() throws Exception {
|
||||||
prepareTask("bpp/unsafeparameters", (architectureCheck) -> {
|
prepareTask("bpp/unsafeparameters", (architectureCheck) -> {
|
||||||
assertThatExceptionOfType(GradleException.class).isThrownBy(architectureCheck::checkArchitecture);
|
assertThatExceptionOfType(GradleException.class).isThrownBy(architectureCheck::checkArchitecture);
|
||||||
assertThat(failureReport(architectureCheck).length()).isGreaterThan(0);
|
assertThat(failureReport(architectureCheck)).isNotEmpty();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -83,7 +83,7 @@ class ArchitectureCheckTests {
|
|||||||
throws Exception {
|
throws Exception {
|
||||||
prepareTask("bpp/safeparameters", (architectureCheck) -> {
|
prepareTask("bpp/safeparameters", (architectureCheck) -> {
|
||||||
architectureCheck.checkArchitecture();
|
architectureCheck.checkArchitecture();
|
||||||
assertThat(failureReport(architectureCheck).length()).isZero();
|
assertThat(failureReport(architectureCheck)).isEmpty();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -92,7 +92,7 @@ class ArchitectureCheckTests {
|
|||||||
throws Exception {
|
throws Exception {
|
||||||
prepareTask("bpp/noparameters", (architectureCheck) -> {
|
prepareTask("bpp/noparameters", (architectureCheck) -> {
|
||||||
architectureCheck.checkArchitecture();
|
architectureCheck.checkArchitecture();
|
||||||
assertThat(failureReport(architectureCheck).length()).isZero();
|
assertThat(failureReport(architectureCheck)).isEmpty();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -100,7 +100,7 @@ class ArchitectureCheckTests {
|
|||||||
void whenBeanFactoryPostProcessorBeanMethodIsNotStaticTaskFailsAndWritesAReport() throws Exception {
|
void whenBeanFactoryPostProcessorBeanMethodIsNotStaticTaskFailsAndWritesAReport() throws Exception {
|
||||||
prepareTask("bfpp/nonstatic", (architectureCheck) -> {
|
prepareTask("bfpp/nonstatic", (architectureCheck) -> {
|
||||||
assertThatExceptionOfType(GradleException.class).isThrownBy(architectureCheck::checkArchitecture);
|
assertThatExceptionOfType(GradleException.class).isThrownBy(architectureCheck::checkArchitecture);
|
||||||
assertThat(failureReport(architectureCheck).length()).isGreaterThan(0);
|
assertThat(failureReport(architectureCheck)).isNotEmpty();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -108,7 +108,7 @@ class ArchitectureCheckTests {
|
|||||||
void whenBeanFactoryPostProcessorBeanMethodIsStaticAndHasParametersTaskFailsAndWritesAReport() throws Exception {
|
void whenBeanFactoryPostProcessorBeanMethodIsStaticAndHasParametersTaskFailsAndWritesAReport() throws Exception {
|
||||||
prepareTask("bfpp/parameters", (architectureCheck) -> {
|
prepareTask("bfpp/parameters", (architectureCheck) -> {
|
||||||
assertThatExceptionOfType(GradleException.class).isThrownBy(architectureCheck::checkArchitecture);
|
assertThatExceptionOfType(GradleException.class).isThrownBy(architectureCheck::checkArchitecture);
|
||||||
assertThat(failureReport(architectureCheck).length()).isGreaterThan(0);
|
assertThat(failureReport(architectureCheck)).isNotEmpty();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -117,7 +117,7 @@ class ArchitectureCheckTests {
|
|||||||
throws Exception {
|
throws Exception {
|
||||||
prepareTask("bfpp/noparameters", (architectureCheck) -> {
|
prepareTask("bfpp/noparameters", (architectureCheck) -> {
|
||||||
architectureCheck.checkArchitecture();
|
architectureCheck.checkArchitecture();
|
||||||
assertThat(failureReport(architectureCheck).length()).isZero();
|
assertThat(failureReport(architectureCheck)).isEmpty();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -37,7 +37,7 @@ import static org.springframework.test.web.client.response.MockRestResponseCreat
|
|||||||
*
|
*
|
||||||
* @author Andy Wilkinson
|
* @author Andy Wilkinson
|
||||||
*/
|
*/
|
||||||
public class ReleaseScheduleTests {
|
class ReleaseScheduleTests {
|
||||||
|
|
||||||
private final RestTemplate rest = new RestTemplate();
|
private final RestTemplate rest = new RestTemplate();
|
||||||
|
|
||||||
|
@ -40,7 +40,7 @@ import static org.assertj.core.api.Assertions.assertThat;
|
|||||||
*
|
*
|
||||||
* @author Andy Wilkinson
|
* @author Andy Wilkinson
|
||||||
*/
|
*/
|
||||||
public class DependencyVersionUpgradeTests {
|
class DependencyVersionUpgradeTests {
|
||||||
|
|
||||||
@ParameterizedTest
|
@ParameterizedTest
|
||||||
@ArtifactVersion(current = "1.2.3", candidate = "1.2.3")
|
@ArtifactVersion(current = "1.2.3", candidate = "1.2.3")
|
||||||
@ -244,7 +244,7 @@ public class DependencyVersionUpgradeTests {
|
|||||||
static class InputProvider implements ArgumentsProvider {
|
static class InputProvider implements ArgumentsProvider {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Stream<? extends Arguments> provideArguments(ExtensionContext context) throws Exception {
|
public Stream<? extends Arguments> provideArguments(ExtensionContext context) {
|
||||||
Method testMethod = context.getRequiredTestMethod();
|
Method testMethod = context.getRequiredTestMethod();
|
||||||
Stream<Arguments> artifactVersions = artifactVersions(testMethod)
|
Stream<Arguments> artifactVersions = artifactVersions(testMethod)
|
||||||
.map((artifactVersion) -> Arguments.of(VersionType.ARTIFACT_VERSION.parse(artifactVersion.current()),
|
.map((artifactVersion) -> Arguments.of(VersionType.ARTIFACT_VERSION.parse(artifactVersion.current()),
|
||||||
|
Loading…
Reference in New Issue
Block a user