Skip to content

Commit

Permalink
test tagging for jdk21
Browse files Browse the repository at this point in the history
Signed-off-by: Jonathan Dowland <[email protected]>
  • Loading branch information
jmtd committed Nov 6, 2023
1 parent 050b38c commit 3c92326
Show file tree
Hide file tree
Showing 10 changed files with 37 additions and 16 deletions.
1 change: 1 addition & 0 deletions tests/features/java.security.feature
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
@ubi8/openjdk-8
@ubi8/openjdk-11
@ubi8/openjdk-17
@ubi8/openjdk-21
Feature: Openshift S2I tests
Scenario: Check networkaddress.cache.negative.ttl has been set correctly
Given s2i build https://github.com/jboss-openshift/openshift-examples/ from binary-cli-security-property
Expand Down
1 change: 1 addition & 0 deletions tests/features/java/java_s2i.feature
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
@ubi8/openjdk-8
@ubi8/openjdk-11
@ubi8/openjdk-17
@ubi8/openjdk-21
Feature: Openshift OpenJDK S2I tests
# NOTE: these tests should be usable with the other images once we have refactored the JDK scripts.
# These builds do not actually run maven. This is important, because the proxy
Expand Down
1 change: 1 addition & 0 deletions tests/features/java/java_s2i_inc.feature
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
@ubi8/openjdk-8
@ubi8/openjdk-11
@ubi8/openjdk-17
@ubi8/openjdk-21
Feature: Openshift OpenJDK S2I tests

# test incremental builds
Expand Down
1 change: 1 addition & 0 deletions tests/features/java/memory.feature
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ Feature: OPENJDK-559 JVM Memory tests
@ubi8/openjdk-8
@ubi8/openjdk-11
@ubi8/openjdk-17
@ubi8/openjdk-21
Scenario: Ensure Maven doesn't use MaxRAMPercentage=80
Given s2i build https://github.com/jboss-openshift/openshift-examples from spring-boot-sample-simple
Then s2i build log should match regex INFO Using MAVEN_OPTS.*-XX:MaxRAMPercentage=25.0$
24 changes: 24 additions & 0 deletions tests/features/java/openjdk.feature
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ Feature: Miscellaneous OpenJDK-related unit tests
| command | rpm -qa |
Then available container log should not contain java-1.8.0
Then available container log should not contain java-17
Then available container log should not contain java-21

@ubi8/openjdk-17
Scenario: Check that only OpenJDK 17 is installed
Expand All @@ -27,6 +28,17 @@ Feature: Miscellaneous OpenJDK-related unit tests
| command | rpm -qa |
Then available container log should not contain java-1.8.0
Then available container log should not contain java-11
Then available container log should not contain java-21

@ubi8/openjdk-21
@ubi8/openjdk-21-runtime
Scenario: Check that only OpenJDK 21 is installed
When container is started with args
| arg | value |
| command | rpm -qa |
Then available container log should not contain java-1.8.0
Then available container log should not contain java-11
Then available container log should not contain java-17

@ubi8
Scenario: Ensure JAVA_HOME is defined and contains Java
Expand Down Expand Up @@ -59,6 +71,7 @@ Feature: Miscellaneous OpenJDK-related unit tests
| command | ls -1 /usr/lib/jvm |
Then available container log should not contain java-1.8.0
Then available container log should not contain java-17
Then available container log should not contain java-21

@ubi8/openjdk-17
Scenario: Check that directories from other JDKs are not present (JDK17)
Expand All @@ -67,6 +80,17 @@ Feature: Miscellaneous OpenJDK-related unit tests
| command | ls -1 /usr/lib/jvm |
Then available container log should not contain java-1.8.0
Then available container log should not contain java-11
Then available container log should not contain java-21

@ubi8/openjdk-21
@ubi8/openjdk-21-runtime
Scenario: Check that directories from other JDKs are not present (JDK21)
When container is started with args
| arg | value |
| command | ls -1 /usr/lib/jvm |
Then available container log should not contain java-1.8.0
Then available container log should not contain java-11
Then available container log should not contain java-17

@ubi8/openjdk-8
@ubi8/openjdk-8-runtime
Expand Down
1 change: 1 addition & 0 deletions tests/features/java/openjdk_s2i.feature
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# builder only
@ubi8/openjdk-11
@ubi8/openjdk-17
@ubi8/openjdk-21
Feature: Openshift OpenJDK-only S2I tests

@ubi8/openjdk-8
Expand Down
1 change: 1 addition & 0 deletions tests/features/java/ports.feature
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
@ubi8/openjdk-8
@ubi8/openjdk-11
@ubi8/openjdk-17
@ubi8/openjdk-21
Feature: Openshift OpenJDK port tests

Scenario: Check ports are available
Expand Down
21 changes: 5 additions & 16 deletions tests/features/java/runtime.feature
Original file line number Diff line number Diff line change
@@ -1,24 +1,19 @@
@ubi8/openjdk-8
@ubi8/openjdk-11
@ubi8/openjdk-17
@ubi8/openjdk-21
Feature: Openshift OpenJDK Runtime tests

@ubi8/openjdk-8
@ubi8/openjdk-11
@ubi8/openjdk-17
Scenario: Ensure JVM_ARGS is no longer present in the run script
Given s2i build https://github.com/jboss-openshift/openshift-quickstarts from undertow-servlet
Then file /usr/local/s2i/run should not contain JVM_ARGS

@ubi8/openjdk-8
@ubi8/openjdk-11
@ubi8/openjdk-17
Scenario: Ensure JAVA_ARGS are passed through to the running java application
Given s2i build https://github.com/jboss-openshift/openshift-quickstarts from undertow-servlet
| variable | value |
| JAVA_ARGS | Hello from CTF test |
Then container log should contain /deployments/undertow-servlet.jar Hello from CTF test

@ubi8/openjdk-8
@ubi8/openjdk-11
@ubi8/openjdk-17
Scenario: Ensure diagnostic options work correctly
Given s2i build https://github.com/jboss-openshift/openshift-quickstarts from undertow-servlet
| variable | value |
Expand All @@ -27,9 +22,7 @@ Feature: Openshift OpenJDK Runtime tests
Then container log should contain /deployments/undertow-servlet.jar Hello from CTF test
And container log should contain -XX:NativeMemoryTracking=summary

@ubi8/openjdk-8
@ubi8/openjdk-11
@ubi8/openjdk-17
@ubi8
Scenario: OPENJDK-474 to ensure JAVA_ARGS is not duplicated in the java command line
Given container is started with env
| variable | value |
Expand Down Expand Up @@ -57,10 +50,6 @@ Feature: Openshift OpenJDK Runtime tests
| JAVA_OPTS | |
Then container log should not contain -XX:MaxRAMPercentage

# builder images only
@ubi8/openjdk-8
@ubi8/openjdk-11
@ubi8/openjdk-17
Scenario: JAVA_OPTIONS sets JAVA_OPTS and overrides defaults (OPENJDK-2009)
Given container is started with env
| variable | value |
Expand Down
1 change: 1 addition & 0 deletions tests/features/openshift.feature
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ Feature: Tests for all openshift images
@ubi8/openjdk-8
@ubi8/openjdk-11
@ubi8/openjdk-17
@ubi8/openjdk-21
Scenario: Check that builder labels are correctly set
Given image is built
Then the image should contain label io.openshift.s2i.scripts-url with value image:///usr/local/s2i
1 change: 1 addition & 0 deletions tests/features/s2i-core.feature
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
@ubi8/openjdk-8
@ubi8/openjdk-11
@ubi8/openjdk-17
@ubi8/openjdk-21
Feature: Openshift S2I tests
# OPENJDK-84 - /tmp/src should not be present after build
Scenario: run an s2i build and check that /tmp/src has been removed afterwards
Expand Down

0 comments on commit 3c92326

Please sign in to comment.