You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix useStartStopDaemon in launch script and allow config via conf file
Commit 5a1ee6e added support for disabling use of start-stop-daemon
via a placeholder in the default launch script. Unfortunately, that
placeholder was subsequently broken in 81a4763.
This commit reinstates the placeholder and adds tests to verify that all
of the placeholders in the launch script can be replaced and that they
have the required default values. Furthermore, it also allows the use of
start-stop-daemon to be configured via USE_START_STOP_DAEMON in an
app’s .conf file. This allows the configuration to be changed after the
app has been built.
Closesgh-4985
Copy file name to clipboardExpand all lines: spring-boot-integration-tests/spring-boot-launch-script-tests/src/test/java/org/springframework/boot/launchscript/SysVinitLaunchScriptIT.java
+10Lines changed: 10 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -50,7 +50,10 @@
50
50
importorg.springframework.boot.ansi.AnsiColor;
51
51
52
52
importstaticorg.hamcrest.Matchers.containsString;
53
+
importstaticorg.hamcrest.Matchers.is;
54
+
importstaticorg.hamcrest.Matchers.not;
53
55
importstaticorg.junit.Assert.assertThat;
56
+
importstaticorg.junit.Assume.assumeThat;
54
57
55
58
/**
56
59
* Integration tests for Spring Boot's launch script on OSs that use SysVinit.
@@ -188,6 +191,13 @@ public void launchWithMultipleJavaOpts() throws Exception {
Copy file name to clipboardExpand all lines: spring-boot-tools/spring-boot-loader-tools/src/main/resources/org/springframework/boot/loader/tools/launch.script
Copy file name to clipboardExpand all lines: spring-boot-tools/spring-boot-loader-tools/src/test/java/org/springframework/boot/loader/tools/DefaultLaunchScriptTests.java
+69-13Lines changed: 69 additions & 13 deletions
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
/*
2
-
* Copyright 2012-2015 the original author or authors.
2
+
* Copyright 2012-2016 the original author or authors.
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
@@ -17,7 +17,8 @@
17
17
packageorg.springframework.boot.loader.tools;
18
18
19
19
importjava.io.File;
20
-
importjava.util.Properties;
20
+
importjava.util.HashMap;
21
+
importjava.util.Map;
21
22
22
23
importorg.junit.Rule;
23
24
importorg.junit.Test;
@@ -33,6 +34,7 @@
33
34
* Tests for {@link DefaultLaunchScript}.
34
35
*
35
36
* @author Phillip Webb
37
+
* @author Andy Wilkinson
36
38
*/
37
39
publicclassDefaultLaunchScriptTests {
38
40
@@ -44,6 +46,49 @@ public void loadsDefaultScript() throws Exception {
0 commit comments