mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-08-29 03:06:45 +08:00
Merge branch '3.1.x'
Closes gh-37658
This commit is contained in:
commit
e3036dcb99
@ -23,7 +23,6 @@ import java.util.List;
|
|||||||
import java.util.function.Supplier;
|
import java.util.function.Supplier;
|
||||||
import java.util.stream.Stream;
|
import java.util.stream.Stream;
|
||||||
|
|
||||||
import org.junit.jupiter.api.condition.OS;
|
|
||||||
import org.junit.jupiter.params.ParameterizedTest;
|
import org.junit.jupiter.params.ParameterizedTest;
|
||||||
import org.junit.jupiter.params.provider.MethodSource;
|
import org.junit.jupiter.params.provider.MethodSource;
|
||||||
import org.testcontainers.containers.GenericContainer;
|
import org.testcontainers.containers.GenericContainer;
|
||||||
@ -34,7 +33,6 @@ import org.testcontainers.utility.DockerImageName;
|
|||||||
import org.testcontainers.utility.MountableFile;
|
import org.testcontainers.utility.MountableFile;
|
||||||
|
|
||||||
import org.springframework.boot.system.JavaVersion;
|
import org.springframework.boot.system.JavaVersion;
|
||||||
import org.springframework.boot.testsupport.junit.DisabledOnOs;
|
|
||||||
import org.springframework.boot.testsupport.testcontainers.DisabledIfDockerUnavailable;
|
import org.springframework.boot.testsupport.testcontainers.DisabledIfDockerUnavailable;
|
||||||
import org.springframework.util.Assert;
|
import org.springframework.util.Assert;
|
||||||
|
|
||||||
@ -47,8 +45,6 @@ import static org.assertj.core.api.Assertions.assertThat;
|
|||||||
* @author Moritz Halbritter
|
* @author Moritz Halbritter
|
||||||
*/
|
*/
|
||||||
@DisabledIfDockerUnavailable
|
@DisabledIfDockerUnavailable
|
||||||
@DisabledOnOs(os = { OS.LINUX, OS.MAC }, architecture = "aarch64",
|
|
||||||
disabledReason = "Not all docker images have ARM support")
|
|
||||||
class LoaderIntegrationTests {
|
class LoaderIntegrationTests {
|
||||||
|
|
||||||
private final ToStringConsumer output = new ToStringConsumer();
|
private final ToStringConsumer output = new ToStringConsumer();
|
||||||
@ -123,8 +119,10 @@ class LoaderIntegrationTests {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static JavaRuntime oracleJdk17() {
|
static JavaRuntime oracleJdk17() {
|
||||||
|
String arch = System.getProperty("os.arch");
|
||||||
|
String dockerFile = ("aarch64".equals(arch)) ? "Dockerfile-aarch64" : "Dockerfile";
|
||||||
ImageFromDockerfile image = new ImageFromDockerfile("spring-boot-loader/oracle-jdk-17")
|
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/intTest/resources/conf/oracle-jdk-17/" + dockerFile));
|
||||||
return new JavaRuntime("Oracle JDK 17", JavaVersion.SEVENTEEN, () -> new GenericContainer<>(image));
|
return new JavaRuntime("Oracle JDK 17", JavaVersion.SEVENTEEN, () -> new GenericContainer<>(image));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -0,0 +1,8 @@
|
|||||||
|
FROM ubuntu:jammy-20230624
|
||||||
|
RUN apt-get update && \
|
||||||
|
apt-get install -y software-properties-common curl && \
|
||||||
|
mkdir -p /opt/oraclejdk && \
|
||||||
|
cd /opt/oraclejdk && \
|
||||||
|
curl -L https://download.oracle.com/java/17/archive/jdk-17.0.8_linux-aarch64_bin.tar.gz | tar zx --strip-components=1
|
||||||
|
ENV JAVA_HOME /opt/oraclejdk
|
||||||
|
ENV PATH $JAVA_HOME/bin:$PATH
|
Loading…
Reference in New Issue
Block a user