File tree 3 files changed +31
-2
lines changed
modules/run/artifacts/opt/jboss/container/java/run
3 files changed +31
-2
lines changed Original file line number Diff line number Diff line change 1
1
#! /bin/sh
2
2
3
- # Set the application dir to the S2I deployment dir
4
- JAVA_APP_DIR=/deployments
3
+ # Default the application dir to the S2I deployment dir
4
+ if [ -z " $JAVA_APP_DIR " ]
5
+ then JAVA_APP_DIR=/deployments
6
+ fi
Original file line number Diff line number Diff line change @@ -215,6 +215,7 @@ startup() {
215
215
procname=" ${JAVA_APP_NAME-java} "
216
216
217
217
log_info " exec -a \" ${procname} \" java $( get_java_options) -cp \" $( get_classpath) \" ${args} $* "
218
+ log_info " running in $PWD "
218
219
exec -a " ${procname} " java $( get_java_options) -cp " $( get_classpath) " ${args} $*
219
220
}
220
221
Original file line number Diff line number Diff line change @@ -41,3 +41,29 @@ Feature: Openshift OpenJDK Runtime tests
41
41
| variable | value |
42
42
| JAVA_APP_NAME | foo bar |
43
43
Then container log should not contain exec: bar': not found
44
+
45
+ @ubi9
46
+ Scenario : Check default JAVA_APP_DIR (OPENJDK-2033)
47
+ When container is ready
48
+ Then available container log should contain INFO running in /deployments
49
+
50
+ @ubi9
51
+ Scenario : Check custom JAVA_APP_DIR (OPENJDK-2033)
52
+ Given container is started with env
53
+ | variable | value |
54
+ | JAVA_APP_DIR | /home /default |
55
+ Then available container log should contain INFO running in /home/default
56
+
57
+ @ubi9
58
+ Scenario : Check relative path JAVA_APP_DIR (OPENJDK-2033)
59
+ Given container is started with env
60
+ | variable | value |
61
+ | JAVA_APP_DIR | . |
62
+ Then available container log should contain INFO running in /home/default
63
+
64
+ @ubi9
65
+ Scenario : Check non-existent path JAVA_APP_DIR (OPENJDK-2033)
66
+ Given container is started with env
67
+ | variable | value |
68
+ | JAVA_APP_DIR | /nope |
69
+ Then available container log should contain ERROR No directory /nope found for auto detection
You can’t perform that action at this time.
0 commit comments