Skip to content

Commit 3f8c03b

Browse files
authored
Merge pull request #465 from jhuttana/ubi8-runtime-feature
[OPENJDK-2722] Split the tests inside tests/features/java/runtime.feature to couple them with appropriate modules
2 parents 1c3b4ad + a8ac991 commit 3f8c03b

File tree

3 files changed

+55
-46
lines changed

3 files changed

+55
-46
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
@ubi8/openjdk-8
2+
@ubi8/openjdk-11
3+
@ubi8/openjdk-17
4+
@ubi8/openjdk-21
5+
Feature: OpenJDK Runtime tests
6+
7+
@ubi8
8+
Scenario: Check JAVA_OPTS overrides defaults (OPENJDK-2009)
9+
Given container is started with env
10+
| variable | value |
11+
| JAVA_OPTS | --show-version |
12+
Then container log should not contain -XX:MaxRAMPercentage
13+
14+
@ubi8
15+
Scenario: Check empty JAVA_OPTS overrides defaults (OPENJDK-2009)
16+
Given container is started with env
17+
| variable | value |
18+
| JAVA_OPTS | |
19+
Then container log should not contain -XX:MaxRAMPercentage

tests/features/java/runtime.feature renamed to modules/run/tests/features/java.runtime.feature

Lines changed: 24 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -3,59 +3,13 @@
33
@ubi8/openjdk-17
44
@ubi8/openjdk-21
55
Feature: Openshift OpenJDK Runtime tests
6-
Scenario: Ensure JVM_ARGS is no longer present in the run script
7-
Given s2i build https://github.com/jboss-container-images/openjdk-test-applications from undertow-servlet
8-
Then file /usr/local/s2i/run should not contain JVM_ARGS
9-
10-
Scenario: Ensure JAVA_ARGS are passed through to the running java application
11-
Given s2i build https://github.com/jboss-container-images/openjdk-test-applications from undertow-servlet
12-
| variable | value |
13-
| JAVA_ARGS | Hello from CTF test |
14-
Then container log should contain /deployments/undertow-servlet.jar Hello from CTF test
15-
16-
Scenario: Ensure diagnostic options work correctly
17-
Given s2i build https://github.com/jboss-container-images/openjdk-test-applications from undertow-servlet
18-
| variable | value |
19-
| JAVA_ARGS | Hello from CTF test |
20-
| JAVA_DIAGNOSTICS | true |
21-
Then container log should contain /deployments/undertow-servlet.jar Hello from CTF test
22-
And container log should contain -XX:NativeMemoryTracking=summary
23-
24-
@ubi8
25-
Scenario: OPENJDK-474 to ensure JAVA_ARGS is not duplicated in the java command line
26-
Given container is started with env
27-
| variable | value |
28-
| JAVA_ARGS | unique |
29-
Then container log should not contain unique unique
30-
316
@ubi8
327
Scenario: Check JAVA_APP_NAME can contain spaces (OPENJDK-104)
338
Given container is started with env
349
| variable | value |
3510
| JAVA_APP_NAME | foo bar |
3611
Then container log should not contain exec: bar': not found
3712

38-
@ubi8
39-
Scenario: Check JAVA_OPTS overrides defaults (OPENJDK-2009)
40-
Given container is started with env
41-
| variable | value |
42-
| JAVA_OPTS | --show-version |
43-
Then container log should not contain -XX:MaxRAMPercentage
44-
45-
@ubi8
46-
Scenario: Check empty JAVA_OPTS overrides defaults (OPENJDK-2009)
47-
Given container is started with env
48-
| variable | value |
49-
| JAVA_OPTS | |
50-
Then container log should not contain -XX:MaxRAMPercentage
51-
52-
Scenario: JAVA_OPTIONS sets JAVA_OPTS and overrides defaults (OPENJDK-2009)
53-
Given container is started with env
54-
| variable | value |
55-
| JAVA_OPTIONS | --show-version |
56-
Then container log should not contain -XX:MaxRAMPercentage
57-
And container log should contain --show-version
58-
5913
@ubi8
6014
Scenario: Check default JAVA_APP_DIR (OPENJDK-2033)
6115
When container is ready
@@ -81,3 +35,27 @@ Feature: Openshift OpenJDK Runtime tests
8135
| variable | value |
8236
| JAVA_APP_DIR | /nope |
8337
Then available container log should contain ERROR No directory /nope found for auto detection
38+
Scenario: Ensure JVM_ARGS is no longer present in the run script
39+
Given s2i build https://github.com/jboss-container-images/openjdk-test-applications from undertow-servlet
40+
Then file /usr/local/s2i/run should not contain JVM_ARGS
41+
42+
Scenario: Ensure JAVA_ARGS are passed through to the running java application
43+
Given s2i build https://github.com/jboss-container-images/openjdk-test-applications from undertow-servlet
44+
| variable | value |
45+
| JAVA_ARGS | Hello from CTF test |
46+
Then container log should contain /deployments/undertow-servlet.jar Hello from CTF test
47+
48+
Scenario: Ensure diagnostic options work correctly
49+
Given s2i build https://github.com/jboss-container-images/openjdk-test-applications from undertow-servlet
50+
| variable | value |
51+
| JAVA_ARGS | Hello from CTF test |
52+
| JAVA_DIAGNOSTICS | true |
53+
Then container log should contain /deployments/undertow-servlet.jar Hello from CTF test
54+
And container log should contain -XX:NativeMemoryTracking=summary
55+
56+
@ubi8
57+
Scenario: OPENJDK-474 to ensure JAVA_ARGS is not duplicated in the java command line
58+
Given container is started with env
59+
| variable | value |
60+
| JAVA_ARGS | unique |
61+
Then container log should not contain unique unique
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
@ubi8/openjdk-8
2+
@ubi8/openjdk-11
3+
@ubi8/openjdk-17
4+
@ubi8/openjdk-21
5+
Feature: OpenJDK JAVA s2i Runtime tests
6+
7+
Scenario: JAVA_OPTIONS sets JAVA_OPTS and overrides defaults (OPENJDK-2009)
8+
Given container is started with env
9+
| variable | value |
10+
| JAVA_OPTIONS | --show-version |
11+
Then container log should not contain -XX:MaxRAMPercentage
12+
And container log should contain --show-version

0 commit comments

Comments
 (0)