Skip to content

Commit edc5828

Browse files
committed
Update spring-boot-loader-tests to use docker-test plugin
See gh-41228
1 parent d5ef5e9 commit edc5828

File tree

9 files changed

+13
-16
lines changed

9 files changed

+13
-16
lines changed

spring-boot-tests/spring-boot-integration-tests/spring-boot-loader-tests/build.gradle

+8-9
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
plugins {
22
id "java"
33
id "org.springframework.boot.conventions"
4-
id "org.springframework.boot.integration-test"
4+
id "org.springframework.boot.docker-test"
55
id "de.undercouch.download"
66
}
77

@@ -21,16 +21,15 @@ dependencies {
2121
app project(path: ":spring-boot-project:spring-boot-starters:spring-boot-starter", configuration: "mavenRepository")
2222
app("org.bouncycastle:bcprov-jdk18on:1.78.1")
2323

24-
intTestImplementation(enforcedPlatform(project(":spring-boot-project:spring-boot-parent")))
25-
intTestImplementation(project(":spring-boot-project:spring-boot-tools:spring-boot-test-support"))
26-
intTestImplementation(project(":spring-boot-project:spring-boot-starters:spring-boot-starter-test"))
27-
intTestImplementation("org.testcontainers:junit-jupiter")
28-
intTestImplementation("org.testcontainers:testcontainers")
24+
dockerTestImplementation(project(":spring-boot-project:spring-boot-tools:spring-boot-test-support"))
25+
dockerTestImplementation(project(":spring-boot-project:spring-boot-starters:spring-boot-starter-test"))
26+
dockerTestImplementation("org.testcontainers:junit-jupiter")
27+
dockerTestImplementation("org.testcontainers:testcontainers")
2928
}
3029

3130
task syncMavenRepository(type: Sync) {
3231
from configurations.app
33-
into "${buildDir}/int-test-maven-repository"
32+
into "${buildDir}/docker-test-maven-repository"
3433
}
3534

3635
task syncAppSource(type: org.springframework.boot.build.SyncAppSource) {
@@ -74,10 +73,10 @@ task syncJdkDownloads(type: Sync) {
7473
into "${project.buildDir}/downloads/jdk/oracle/"
7574
}
7675

77-
processIntTestResources {
76+
tasks.named("processDockerTestResources").configure {
7877
dependsOn syncJdkDownloads
7978
}
8079

81-
intTest {
80+
tasks.named("dockerTest").configure {
8281
dependsOn buildApp, buildSignedJarApp
8382
}

spring-boot-tests/spring-boot-integration-tests/spring-boot-loader-tests/spring-boot-loader-tests-app/build.gradle

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
plugins {
22
id "java"
33
id "org.springframework.boot"
4-
// id 'org.springframework.boot' version '3.1.4'
5-
// id 'io.spring.dependency-management' version '1.1.3'
64
}
75

86
apply plugin: "io.spring.dependency-management"
97

108
repositories {
11-
maven { url "file:${rootDir}/../int-test-maven-repository"}
9+
maven { url "file:${rootDir}/../docker-test-maven-repository"}
1210
mavenCentral()
1311
maven { url "https://repo.spring.io/snapshot" }
1412
maven { url "https://repo.spring.io/milestone" }

spring-boot-tests/spring-boot-integration-tests/spring-boot-loader-tests/spring-boot-loader-tests-app/settings.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
pluginManagement {
22
repositories {
3-
maven { url "file:${rootDir}/../int-test-maven-repository"}
3+
maven { url "file:${rootDir}/../docker-test-maven-repository"}
44
mavenCentral()
55
maven { url "https://repo.spring.io/snapshot" }
66
maven { url "https://repo.spring.io/milestone" }

spring-boot-tests/spring-boot-integration-tests/spring-boot-loader-tests/spring-boot-loader-tests-signed-jar/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ plugins {
88
apply plugin: "io.spring.dependency-management"
99

1010
repositories {
11-
maven { url "file:${rootDir}/../int-test-maven-repository"}
11+
maven { url "file:${rootDir}/../docker-test-maven-repository"}
1212
mavenCentral()
1313
maven { url "https://repo.spring.io/snapshot" }
1414
maven { url "https://repo.spring.io/milestone" }

spring-boot-tests/spring-boot-integration-tests/spring-boot-loader-tests/spring-boot-loader-tests-signed-jar/settings.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
pluginManagement {
22
repositories {
3-
maven { url "file:${rootDir}/../int-test-maven-repository"}
3+
maven { url "file:${rootDir}/../docker-test-maven-repository"}
44
mavenCentral()
55
maven { url "https://repo.spring.io/snapshot" }
66
maven { url "https://repo.spring.io/milestone" }
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ static JavaRuntime openJdk(JavaVersion version) {
156156

157157
static JavaRuntime oracleJdk17() {
158158
ImageFromDockerfile image = new ImageFromDockerfile("spring-boot-loader/oracle-jdk");
159-
image.withFileFromFile("Dockerfile", new File("src/intTest/resources/conf/oracle-jdk-17/Dockerfile"));
159+
image.withFileFromFile("Dockerfile", new File("src/dockerTest/resources/conf/oracle-jdk-17/Dockerfile"));
160160
for (File file : new File("build/downloads/jdk/oracle").listFiles()) {
161161
image.withFileFromFile("downloads/" + file.getName(), file);
162162
}

0 commit comments

Comments
 (0)