From cf4f1292b06f9f9ad2d860860118ca5c7bb5383d Mon Sep 17 00:00:00 2001 From: Christoph Schulz Date: Sat, 12 Aug 2023 08:52:52 +0200 Subject: [PATCH] Add test Signed-off-by: Christoph Schulz --- .../opt/jboss/container/java/run/run-java.sh | 1 + tests/features/java/runtime.feature | 12 ++++++++++++ 2 files changed, 13 insertions(+) diff --git a/modules/run/artifacts/opt/jboss/container/java/run/run-java.sh b/modules/run/artifacts/opt/jboss/container/java/run/run-java.sh index d274d801..a2160d24 100644 --- a/modules/run/artifacts/opt/jboss/container/java/run/run-java.sh +++ b/modules/run/artifacts/opt/jboss/container/java/run/run-java.sh @@ -215,6 +215,7 @@ startup() { procname="${JAVA_APP_NAME-java}" log_info "exec -a \"${procname}\" java $(get_java_options) -cp \"$(get_classpath)\" ${args} $*" + log_info "running in $PWD" exec -a "${procname}" java $(get_java_options) -cp "$(get_classpath)" ${args} $* } diff --git a/tests/features/java/runtime.feature b/tests/features/java/runtime.feature index 8f6e8c35..eac94dd6 100644 --- a/tests/features/java/runtime.feature +++ b/tests/features/java/runtime.feature @@ -41,3 +41,15 @@ Feature: Openshift OpenJDK Runtime tests | variable | value | | JAVA_APP_NAME | foo bar | Then container log should not contain exec: bar': not found + + @ubi9 + Scenario: Check default JAVA_APP_DIR (OPENJDK-2033) + When container is ready + Then available container log should contain INFO running in /deployments + + @ubi9 + Scenario: Check custom JAVA_APP_DIR (OPENJDK-2033) + Given container is started with env + | variable | value | + | JAVA_APP_DIR | /home/jboss | + Then available container log should contain INFO running in /home/jboss \ No newline at end of file