commit
60530b9b5b
|
|
@ -20,6 +20,7 @@ import java.io.File;
|
||||||
import java.time.Duration;
|
import java.time.Duration;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.function.Predicate;
|
||||||
|
|
||||||
import org.assertj.core.api.Condition;
|
import org.assertj.core.api.Condition;
|
||||||
import org.testcontainers.containers.GenericContainer;
|
import org.testcontainers.containers.GenericContainer;
|
||||||
|
|
@ -50,11 +51,13 @@ abstract class AbstractLaunchScriptIntegrationTests {
|
||||||
this.scriptsDir = scriptsDir;
|
this.scriptsDir = scriptsDir;
|
||||||
}
|
}
|
||||||
|
|
||||||
static List<Object[]> parameters() {
|
static List<Object[]> parameters(Predicate<File> osFilter) {
|
||||||
List<Object[]> parameters = new ArrayList<>();
|
List<Object[]> parameters = new ArrayList<>();
|
||||||
for (File os : new File("src/intTest/resources/conf").listFiles()) {
|
for (File os : new File("src/intTest/resources/conf").listFiles()) {
|
||||||
for (File version : os.listFiles()) {
|
if (osFilter.test(os)) {
|
||||||
parameters.add(new Object[] { os.getName(), version.getName() });
|
for (File version : os.listFiles()) {
|
||||||
|
parameters.add(new Object[] { os.getName(), version.getName() });
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return parameters;
|
return parameters;
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,8 @@
|
||||||
|
|
||||||
package org.springframework.boot.launchscript;
|
package org.springframework.boot.launchscript;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
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;
|
||||||
|
|
||||||
|
|
@ -36,6 +38,10 @@ class JarLaunchScriptIntegrationTests extends AbstractLaunchScriptIntegrationTes
|
||||||
super("jar/");
|
super("jar/");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static List<Object[]> parameters() {
|
||||||
|
return parameters((file) -> true);
|
||||||
|
}
|
||||||
|
|
||||||
@ParameterizedTest(name = "{0} {1}")
|
@ParameterizedTest(name = "{0} {1}")
|
||||||
@MethodSource("parameters")
|
@MethodSource("parameters")
|
||||||
void basicLaunch(String os, String version) throws Exception {
|
void basicLaunch(String os, String version) throws Exception {
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,7 @@
|
||||||
|
|
||||||
package org.springframework.boot.launchscript;
|
package org.springframework.boot.launchscript;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
import java.util.regex.Pattern;
|
import java.util.regex.Pattern;
|
||||||
|
|
||||||
import org.junit.jupiter.api.Assumptions;
|
import org.junit.jupiter.api.Assumptions;
|
||||||
|
|
@ -41,6 +42,10 @@ class SysVinitLaunchScriptIntegrationTests extends AbstractLaunchScriptIntegrati
|
||||||
super("init.d/");
|
super("init.d/");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static List<Object[]> parameters() {
|
||||||
|
return parameters((file) -> !file.getName().contains("CentOS"));
|
||||||
|
}
|
||||||
|
|
||||||
@ParameterizedTest(name = "{0} {1}")
|
@ParameterizedTest(name = "{0} {1}")
|
||||||
@MethodSource("parameters")
|
@MethodSource("parameters")
|
||||||
void statusWhenStopped(String os, String version) throws Exception {
|
void statusWhenStopped(String os, String version) throws Exception {
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
# CentOS 6.9 from 02/06/2017
|
# CentOS 7.9 from 18/11/2020
|
||||||
FROM centos@sha256:a23bced61701af9a0a758e94229676d9f09996a3ff0f3d26955b06bac8c282e0
|
FROM centos@sha256:e4ca2ed0202e76be184e75fb26d14bf974193579039d5573fb2348664deef76e
|
||||||
RUN yum install -y wget && \
|
RUN yum install -y wget && \
|
||||||
yum install -y system-config-services && \
|
|
||||||
yum install -y curl && \
|
yum install -y curl && \
|
||||||
wget --output-document jdk.rpm \
|
wget --output-document jdk.rpm \
|
||||||
https://cdn.azul.com/zulu/bin/zulu8.21.0.1-jdk8.0.131-linux.x86_64.rpm && \
|
https://cdn.azul.com/zulu/bin/zulu8.21.0.1-jdk8.0.131-linux.x86_64.rpm && \
|
||||||
Loading…
Reference in New Issue