Browse Source

Update spring-boot-loader-tests to use docker-test plugin

See gh-41228
pull/42868/head
Andy Wilkinson 2 years ago
parent
commit
edc582800b
  1. 17
      spring-boot-tests/spring-boot-integration-tests/spring-boot-loader-tests/build.gradle
  2. 4
      spring-boot-tests/spring-boot-integration-tests/spring-boot-loader-tests/spring-boot-loader-tests-app/build.gradle
  3. 2
      spring-boot-tests/spring-boot-integration-tests/spring-boot-loader-tests/spring-boot-loader-tests-app/settings.gradle
  4. 2
      spring-boot-tests/spring-boot-integration-tests/spring-boot-loader-tests/spring-boot-loader-tests-signed-jar/build.gradle
  5. 2
      spring-boot-tests/spring-boot-integration-tests/spring-boot-loader-tests/spring-boot-loader-tests-signed-jar/settings.gradle
  6. 2
      spring-boot-tests/spring-boot-integration-tests/spring-boot-loader-tests/src/dockerTest/java/org/springframework/boot/loader/LoaderIntegrationTests.java
  7. 0
      spring-boot-tests/spring-boot-integration-tests/spring-boot-loader-tests/src/dockerTest/resources/conf/oracle-jdk-17/Dockerfile
  8. 0
      spring-boot-tests/spring-boot-integration-tests/spring-boot-loader-tests/src/dockerTest/resources/conf/oracle-jdk-17/README.adoc
  9. 0
      spring-boot-tests/spring-boot-integration-tests/spring-boot-loader-tests/src/dockerTest/resources/logback.xml

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

@ -1,7 +1,7 @@ @@ -1,7 +1,7 @@
plugins {
id "java"
id "org.springframework.boot.conventions"
id "org.springframework.boot.integration-test"
id "org.springframework.boot.docker-test"
id "de.undercouch.download"
}
@ -21,16 +21,15 @@ dependencies { @@ -21,16 +21,15 @@ dependencies {
app project(path: ":spring-boot-project:spring-boot-starters:spring-boot-starter", configuration: "mavenRepository")
app("org.bouncycastle:bcprov-jdk18on:1.78.1")
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(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) {
@ -74,10 +73,10 @@ task syncJdkDownloads(type: Sync) { @@ -74,10 +73,10 @@ task syncJdkDownloads(type: Sync) {
into "${project.buildDir}/downloads/jdk/oracle/"
}
processIntTestResources {
tasks.named("processDockerTestResources").configure {
dependsOn syncJdkDownloads
}
intTest {
tasks.named("dockerTest").configure {
dependsOn buildApp, buildSignedJarApp
}

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

@ -1,14 +1,12 @@ @@ -1,14 +1,12 @@
plugins {
id "java"
id "org.springframework.boot"
// id 'org.springframework.boot' version '3.1.4'
// id 'io.spring.dependency-management' version '1.1.3'
}
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" }

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

@ -1,6 +1,6 @@ @@ -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" }

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

@ -8,7 +8,7 @@ plugins { @@ -8,7 +8,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" }

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

@ -1,6 +1,6 @@ @@ -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" }

2
spring-boot-tests/spring-boot-integration-tests/spring-boot-loader-tests/src/intTest/java/org/springframework/boot/loader/LoaderIntegrationTests.java → spring-boot-tests/spring-boot-integration-tests/spring-boot-loader-tests/src/dockerTest/java/org/springframework/boot/loader/LoaderIntegrationTests.java

@ -156,7 +156,7 @@ class LoaderIntegrationTests { @@ -156,7 +156,7 @@ class LoaderIntegrationTests {
static JavaRuntime oracleJdk17() {
ImageFromDockerfile image = new ImageFromDockerfile("spring-boot-loader/oracle-jdk");
image.withFileFromFile("Dockerfile", new File("src/intTest/resources/conf/oracle-jdk-17/Dockerfile"));
image.withFileFromFile("Dockerfile", new File("src/dockerTest/resources/conf/oracle-jdk-17/Dockerfile"));
for (File file : new File("build/downloads/jdk/oracle").listFiles()) {
image.withFileFromFile("downloads/" + file.getName(), file);
}

0
spring-boot-tests/spring-boot-integration-tests/spring-boot-loader-tests/src/intTest/resources/conf/oracle-jdk-17/Dockerfile → spring-boot-tests/spring-boot-integration-tests/spring-boot-loader-tests/src/dockerTest/resources/conf/oracle-jdk-17/Dockerfile

0
spring-boot-tests/spring-boot-integration-tests/spring-boot-loader-tests/src/intTest/resources/conf/oracle-jdk-17/README.adoc → spring-boot-tests/spring-boot-integration-tests/spring-boot-loader-tests/src/dockerTest/resources/conf/oracle-jdk-17/README.adoc

0
spring-boot-tests/spring-boot-integration-tests/spring-boot-loader-tests/src/intTest/resources/logback.xml → spring-boot-tests/spring-boot-integration-tests/spring-boot-loader-tests/src/dockerTest/resources/logback.xml

Loading…
Cancel
Save