File tree Expand file tree Collapse file tree 3 files changed +31
-2
lines changed
modules/run/artifacts/opt/jboss/container/java/run Expand file tree Collapse file tree 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 @@ -245,6 +245,7 @@ startup() {
245
245
procname=" ${JAVA_APP_NAME-java} "
246
246
247
247
log_info " exec -a \" ${procname} \" java $( get_java_options) -cp \" $( get_classpath) \" ${args} $* "
248
+ log_info " running in $PWD "
248
249
exec -a " ${procname} " java $( get_java_options) -cp " $( get_classpath) " ${args} $*
249
250
}
250
251
Original file line number Diff line number Diff line change @@ -67,3 +67,29 @@ Feature: Openshift OpenJDK Runtime tests
67
67
| JAVA_OPTIONS | --show -version |
68
68
Then container log should not contain -XX:MaxRAMPercentage
69
69
And container log should contain --show-version
70
+
71
+ @ubi8
72
+ Scenario : Check default JAVA_APP_DIR (OPENJDK-2033)
73
+ When container is ready
74
+ Then available container log should contain INFO running in /deployments
75
+
76
+ @ubi8
77
+ Scenario : Check custom JAVA_APP_DIR (OPENJDK-2033)
78
+ Given container is started with env
79
+ | variable | value |
80
+ | JAVA_APP_DIR | /home /jboss |
81
+ Then available container log should contain INFO running in /home/jboss
82
+
83
+ @ubi8
84
+ Scenario : Check relative path JAVA_APP_DIR (OPENJDK-2033)
85
+ Given container is started with env
86
+ | variable | value |
87
+ | JAVA_APP_DIR | . |
88
+ Then available container log should contain INFO running in /home/jboss
89
+
90
+ @ubi8
91
+ Scenario : Check non-existent path JAVA_APP_DIR (OPENJDK-2033)
92
+ Given container is started with env
93
+ | variable | value |
94
+ | JAVA_APP_DIR | /nope |
95
+ 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