mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-07-05 00:56:58 +08:00
Update spring-boot-loader-classic-tests to use docker-test plugin
See gh-41228
This commit is contained in:
parent
edc582800b
commit
6564abb12a
|
@ -1,7 +1,7 @@
|
|||
plugins {
|
||||
id "java"
|
||||
id "org.springframework.boot.conventions"
|
||||
id "org.springframework.boot.integration-test"
|
||||
id "org.springframework.boot.docker-test"
|
||||
}
|
||||
|
||||
description = "Spring Boot Classic Loader Integration Tests"
|
||||
|
@ -15,16 +15,16 @@ dependencies {
|
|||
app project(path: ":spring-boot-project:spring-boot-tools:spring-boot-gradle-plugin", configuration: "mavenRepository")
|
||||
app project(path: ":spring-boot-project:spring-boot-starters:spring-boot-starter-web", configuration: "mavenRepository")
|
||||
|
||||
intTestImplementation(enforcedPlatform(project(":spring-boot-project:spring-boot-parent")))
|
||||
intTestImplementation(project(":spring-boot-project:spring-boot-tools:spring-boot-test-support"))
|
||||
intTestImplementation(project(":spring-boot-project:spring-boot-starters:spring-boot-starter-test"))
|
||||
intTestImplementation("org.testcontainers:junit-jupiter")
|
||||
intTestImplementation("org.testcontainers:testcontainers")
|
||||
dockerTestImplementation(enforcedPlatform(project(":spring-boot-project:spring-boot-parent")))
|
||||
dockerTestImplementation(project(":spring-boot-project:spring-boot-tools:spring-boot-test-support"))
|
||||
dockerTestImplementation(project(":spring-boot-project:spring-boot-starters:spring-boot-starter-test"))
|
||||
dockerTestImplementation("org.testcontainers:junit-jupiter")
|
||||
dockerTestImplementation("org.testcontainers:testcontainers")
|
||||
}
|
||||
|
||||
task syncMavenRepository(type: Sync) {
|
||||
from configurations.app
|
||||
into "${buildDir}/int-test-maven-repository"
|
||||
into "${buildDir}/docker-test-maven-repository"
|
||||
}
|
||||
|
||||
task syncAppSource(type: org.springframework.boot.build.SyncAppSource) {
|
||||
|
@ -39,6 +39,6 @@ task buildApp(type: GradleBuild) {
|
|||
tasks = ["build"]
|
||||
}
|
||||
|
||||
intTest {
|
||||
tasks.named("dockerTest").configure {
|
||||
dependsOn buildApp
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,7 +6,7 @@ plugins {
|
|||
apply plugin: "io.spring.dependency-management"
|
||||
|
||||
repositories {
|
||||
maven { url "file:${rootDir}/../int-test-maven-repository"}
|
||||
maven { url "file:${rootDir}/../docker-test-maven-repository"}
|
||||
mavenCentral()
|
||||
maven { url "https://repo.spring.io/snapshot" }
|
||||
maven { url "https://repo.spring.io/milestone" }
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
pluginManagement {
|
||||
repositories {
|
||||
maven { url "file:${rootDir}/../int-test-maven-repository"}
|
||||
maven { url "file:${rootDir}/../docker-test-maven-repository"}
|
||||
mavenCentral()
|
||||
maven { url "https://repo.spring.io/snapshot" }
|
||||
maven { url "https://repo.spring.io/milestone" }
|
||||
|
|
|
@ -130,7 +130,7 @@ class LoaderIntegrationTests {
|
|||
String arch = System.getProperty("os.arch");
|
||||
String dockerFile = ("aarch64".equals(arch)) ? "Dockerfile-aarch64" : "Dockerfile";
|
||||
ImageFromDockerfile image = new ImageFromDockerfile("spring-boot-loader/oracle-jdk-17")
|
||||
.withFileFromFile("Dockerfile", new File("src/intTest/resources/conf/oracle-jdk-17/" + dockerFile));
|
||||
.withFileFromFile("Dockerfile", new File("src/dockerTest/resources/conf/oracle-jdk-17/" + dockerFile));
|
||||
return new JavaRuntime("Oracle JDK 17", JavaVersion.SEVENTEEN, () -> new GenericContainer<>(image));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user