Skip to content

Commit

Permalink
Address review comments
Browse files Browse the repository at this point in the history
Signed-off-by: Jayashree Huttanagoudar <[email protected]>
  • Loading branch information
jhuttana committed Mar 18, 2024
1 parent 2842ed4 commit a8ac991
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 40 deletions.
40 changes: 0 additions & 40 deletions modules/jvm/api/tests/features/runtime.feature
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,6 @@
@ubi8/openjdk-21
Feature: OpenJDK Runtime tests

@ubi8
Scenario: Check JAVA_APP_NAME can contain spaces (OPENJDK-104)
Given container is started with env
| variable | value |
| JAVA_APP_NAME | foo bar |
Then container log should not contain exec: bar': not found

@ubi8
Scenario: Check JAVA_OPTS overrides defaults (OPENJDK-2009)
Given container is started with env
Expand All @@ -24,36 +17,3 @@ Feature: OpenJDK Runtime tests
| variable | value |
| JAVA_OPTS | |
Then container log should not contain -XX:MaxRAMPercentage

Scenario: JAVA_OPTIONS sets JAVA_OPTS and overrides defaults (OPENJDK-2009)
Given container is started with env
| variable | value |
| JAVA_OPTIONS | --show-version |
Then container log should not contain -XX:MaxRAMPercentage
And container log should contain --show-version

@ubi8
Scenario: Check default JAVA_APP_DIR (OPENJDK-2033)
When container is ready
Then available container log should contain INFO running in /deployments

@ubi8
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

@ubi8
Scenario: Check relative path JAVA_APP_DIR (OPENJDK-2033)
Given container is started with env
| variable | value |
| JAVA_APP_DIR | . |
Then available container log should contain INFO running in /home/jboss

@ubi8
Scenario: Check non-existent path JAVA_APP_DIR (OPENJDK-2033)
Given container is started with env
| variable | value |
| JAVA_APP_DIR | /nope |
Then available container log should contain ERROR No directory /nope found for auto detection
32 changes: 32 additions & 0 deletions modules/run/tests/features/java.runtime.feature
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,38 @@
@ubi8/openjdk-17
@ubi8/openjdk-21
Feature: Openshift OpenJDK Runtime tests
@ubi8
Scenario: Check JAVA_APP_NAME can contain spaces (OPENJDK-104)
Given container is started with env
| variable | value |
| JAVA_APP_NAME | foo bar |
Then container log should not contain exec: bar': not found

@ubi8
Scenario: Check default JAVA_APP_DIR (OPENJDK-2033)
When container is ready
Then available container log should contain INFO running in /deployments

@ubi8
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

@ubi8
Scenario: Check relative path JAVA_APP_DIR (OPENJDK-2033)
Given container is started with env
| variable | value |
| JAVA_APP_DIR | . |
Then available container log should contain INFO running in /home/jboss

@ubi8
Scenario: Check non-existent path JAVA_APP_DIR (OPENJDK-2033)
Given container is started with env
| variable | value |
| JAVA_APP_DIR | /nope |
Then available container log should contain ERROR No directory /nope found for auto detection
Scenario: Ensure JVM_ARGS is no longer present in the run script
Given s2i build https://github.com/jboss-container-images/openjdk-test-applications from undertow-servlet
Then file /usr/local/s2i/run should not contain JVM_ARGS
Expand Down
12 changes: 12 additions & 0 deletions modules/s2i/bash/tests/features/java.s2i.runtime.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
@ubi8/openjdk-8
@ubi8/openjdk-11
@ubi8/openjdk-17
@ubi8/openjdk-21
Feature: OpenJDK JAVA s2i Runtime tests

Scenario: JAVA_OPTIONS sets JAVA_OPTS and overrides defaults (OPENJDK-2009)
Given container is started with env
| variable | value |
| JAVA_OPTIONS | --show-version |
Then container log should not contain -XX:MaxRAMPercentage
And container log should contain --show-version

0 comments on commit a8ac991

Please sign in to comment.