Polish "Log a warning when using fallback for pid and log locations"

Closes gh-14519
This commit is contained in:
Andy Wilkinson
2018-10-04 15:19:01 +01:00
parent 3f894cbeeb
commit 4a222cb4e5
4 changed files with 30 additions and 3 deletions

View File

@@ -171,7 +171,22 @@ public class SysVinitLaunchScriptIT {
@Test
public void basicLaunch() throws Exception {
doLaunch("basic-launch.sh");
String output = doTest("basic-launch.sh");
assertThat(output).doesNotContain("PID_FOLDER");
}
@Test
public void launchWithMissingLogFolderGeneratesAWarning() throws Exception {
String output = doTest("launch-with-missing-log-folder.sh");
assertThat(output).has(coloredString(AnsiColor.YELLOW,
"LOG_FOLDER /does/not/exist does not exist. Falling back to /tmp"));
}
@Test
public void launchWithMissingPidFolderGeneratesAWarning() throws Exception {
String output = doTest("launch-with-missing-pid-folder.sh");
assertThat(output).has(coloredString(AnsiColor.YELLOW,
"PID_FOLDER /does/not/exist does not exist. Falling back to /tmp"));
}
@Test

View File

@@ -0,0 +1,6 @@
source ./test-functions.sh
install_service
echo 'LOG_FOLDER=/does/not/exist' > /test-service/spring-boot-app.conf
start_service
await_app
curl -s http://127.0.0.1:8080/

View File

@@ -0,0 +1,6 @@
source ./test-functions.sh
install_service
echo 'PID_FOLDER=/does/not/exist' > /test-service/spring-boot-app.conf
start_service
await_app
curl -s http://127.0.0.1:8080/