Merge branch '2.3.x' into 2.4.x
This commit is contained in:
commit
abd0b484bc
|
@ -28,8 +28,8 @@ task syncMavenRepository(type: Sync) {
|
||||||
}
|
}
|
||||||
|
|
||||||
task syncAppSource(type: Sync) {
|
task syncAppSource(type: Sync) {
|
||||||
from "app"
|
from "spring-boot-launch-script-tests-app"
|
||||||
into "${buildDir}/app"
|
into "${buildDir}/spring-boot-launch-script-tests-app"
|
||||||
filter { line ->
|
filter { line ->
|
||||||
line.replace("id \"org.springframework.boot\"", "id \"org.springframework.boot\" version \"${project.version}\"")
|
line.replace("id \"org.springframework.boot\"", "id \"org.springframework.boot\" version \"${project.version}\"")
|
||||||
}
|
}
|
||||||
|
@ -37,7 +37,7 @@ task syncAppSource(type: Sync) {
|
||||||
|
|
||||||
task buildApp(type: GradleBuild) {
|
task buildApp(type: GradleBuild) {
|
||||||
dependsOn syncAppSource, syncMavenRepository
|
dependsOn syncAppSource, syncMavenRepository
|
||||||
dir = "${buildDir}/app"
|
dir = "${buildDir}/spring-boot-launch-script-tests-app"
|
||||||
startParameter.buildCacheEnabled = false
|
startParameter.buildCacheEnabled = false
|
||||||
tasks = ["build"]
|
tasks = ["build"]
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,6 +30,7 @@ import org.testcontainers.images.builder.ImageFromDockerfile;
|
||||||
import org.testcontainers.utility.MountableFile;
|
import org.testcontainers.utility.MountableFile;
|
||||||
|
|
||||||
import org.springframework.boot.ansi.AnsiColor;
|
import org.springframework.boot.ansi.AnsiColor;
|
||||||
|
import org.springframework.util.Assert;
|
||||||
|
|
||||||
import static org.assertj.core.api.Assertions.assertThat;
|
import static org.assertj.core.api.Assertions.assertThat;
|
||||||
import static org.hamcrest.Matchers.containsString;
|
import static org.hamcrest.Matchers.containsString;
|
||||||
|
@ -110,12 +111,10 @@ abstract class AbstractLaunchScriptIntegrationTests {
|
||||||
}
|
}
|
||||||
|
|
||||||
private static File findApplication() {
|
private static File findApplication() {
|
||||||
File appJar = new File("build/app/build/libs/app.jar");
|
String name = String.format("build/%1$s/build/libs/%1$s.jar", "spring-boot-launch-script-tests-app");
|
||||||
if (appJar.isFile()) {
|
File jar = new File(name);
|
||||||
return appJar;
|
Assert.state(jar.isFile(), () -> "Could not find " + name + ". Have you built it?");
|
||||||
}
|
return jar;
|
||||||
throw new IllegalStateException(
|
|
||||||
"Could not find test application in build/app/build/libs directory. Have you built it?");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,8 +28,8 @@ task syncMavenRepository(type: Sync) {
|
||||||
}
|
}
|
||||||
|
|
||||||
task syncAppSource(type: Sync) {
|
task syncAppSource(type: Sync) {
|
||||||
from "app"
|
from "spring-boot-loader-tests-app"
|
||||||
into "${buildDir}/app"
|
into "${buildDir}/spring-boot-loader-tests-app"
|
||||||
filter { line ->
|
filter { line ->
|
||||||
line.replace("id \"org.springframework.boot\"", "id \"org.springframework.boot\" version \"${project.version}\"")
|
line.replace("id \"org.springframework.boot\"", "id \"org.springframework.boot\" version \"${project.version}\"")
|
||||||
}
|
}
|
||||||
|
@ -37,7 +37,7 @@ task syncAppSource(type: Sync) {
|
||||||
|
|
||||||
task buildApp(type: GradleBuild) {
|
task buildApp(type: GradleBuild) {
|
||||||
dependsOn syncAppSource, syncMavenRepository
|
dependsOn syncAppSource, syncMavenRepository
|
||||||
dir = "${buildDir}/app"
|
dir = "${buildDir}/spring-boot-loader-tests-app"
|
||||||
startParameter.buildCacheEnabled = false
|
startParameter.buildCacheEnabled = false
|
||||||
tasks = ["build"]
|
tasks = ["build"]
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,6 +28,8 @@ import org.testcontainers.junit.jupiter.Testcontainers;
|
||||||
import org.testcontainers.utility.DockerImageName;
|
import org.testcontainers.utility.DockerImageName;
|
||||||
import org.testcontainers.utility.MountableFile;
|
import org.testcontainers.utility.MountableFile;
|
||||||
|
|
||||||
|
import org.springframework.util.Assert;
|
||||||
|
|
||||||
import static org.assertj.core.api.Assertions.assertThat;
|
import static org.assertj.core.api.Assertions.assertThat;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -49,12 +51,10 @@ class LoaderIntegrationTests {
|
||||||
.withCommand("java", "-jar", "app.jar");
|
.withCommand("java", "-jar", "app.jar");
|
||||||
|
|
||||||
private static File findApplication() {
|
private static File findApplication() {
|
||||||
File appJar = new File("build/app/build/libs/app.jar");
|
String name = String.format("build/%1$s/build/libs/%1$s.jar", "spring-boot-loader-tests-app");
|
||||||
if (appJar.isFile()) {
|
File jar = new File(name);
|
||||||
return appJar;
|
Assert.state(jar.isFile(), () -> "Could not find " + name + ". Have you built it?");
|
||||||
}
|
return jar;
|
||||||
throw new IllegalStateException(
|
|
||||||
"Could not find test application in build/app/build/libs directory. Have you built it?");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|
Loading…
Reference in New Issue