Skip to content

Commit

Permalink
Merge branch '2.2.x' into 2.3.x
Browse files Browse the repository at this point in the history
Closes gh-24347
  • Loading branch information
snicoll committed Dec 7, 2020
2 parents c7fe372 + f64b7f8 commit 07e32bf
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import java.time.Duration;
import java.util.ArrayList;
import java.util.List;
import java.util.function.Predicate;

import org.assertj.core.api.Condition;
import org.testcontainers.containers.GenericContainer;
Expand Down Expand Up @@ -50,11 +51,13 @@ protected AbstractLaunchScriptIntegrationTests(String scriptsDir) {
this.scriptsDir = scriptsDir;
}

static List<Object[]> parameters() {
static List<Object[]> parameters(Predicate<File> osFilter) {
List<Object[]> parameters = new ArrayList<>();
for (File os : new File("src/intTest/resources/conf").listFiles()) {
for (File version : os.listFiles()) {
parameters.add(new Object[] { os.getName(), version.getName() });
if (osFilter.test(os)) {
for (File version : os.listFiles()) {
parameters.add(new Object[] { os.getName(), version.getName() });
}
}
}
return parameters;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@

package org.springframework.boot.launchscript;

import java.util.List;

import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.MethodSource;

Expand All @@ -36,6 +38,10 @@ class JarLaunchScriptIntegrationTests extends AbstractLaunchScriptIntegrationTes
super("jar/");
}

static List<Object[]> parameters() {
return parameters((file) -> true);
}

@ParameterizedTest(name = "{0} {1}")
@MethodSource("parameters")
void basicLaunch(String os, String version) throws Exception {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

package org.springframework.boot.launchscript;

import java.util.List;
import java.util.regex.Pattern;

import org.junit.jupiter.api.Assumptions;
Expand All @@ -41,6 +42,10 @@ class SysVinitLaunchScriptIntegrationTests extends AbstractLaunchScriptIntegrati
super("init.d/");
}

static List<Object[]> parameters() {
return parameters((file) -> !file.getName().contains("CentOS"));
}

@ParameterizedTest(name = "{0} {1}")
@MethodSource("parameters")
void statusWhenStopped(String os, String version) throws Exception {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# CentOS 6.9 from 02/06/2017
FROM centos@sha256:a23bced61701af9a0a758e94229676d9f09996a3ff0f3d26955b06bac8c282e0
# CentOS 7.9 from 18/11/2020
FROM centos@sha256:e4ca2ed0202e76be184e75fb26d14bf974193579039d5573fb2348664deef76e
RUN yum install -y wget && \
yum install -y system-config-services && \
yum install -y curl && \
wget --output-document jdk.rpm \
https://cdn.azul.com/zulu/bin/zulu8.21.0.1-jdk8.0.131-linux.x86_64.rpm && \
Expand Down

0 comments on commit 07e32bf

Please sign in to comment.