From 2842ed44ec721c471d136bb3411f44c7b9dd41cf Mon Sep 17 00:00:00 2001 From: Jayashree Huttanagoudar Date: Sat, 16 Mar 2024 00:38:54 +0530 Subject: [PATCH] Split the tests inside tests/features/java/runtime.feature to couple them with appropriate modules Signed-off-by: Jayashree Huttanagoudar --- .../jvm/api/tests/features}/runtime.feature | 26 +---------------- .../run/tests/features/java.runtime.feature | 29 +++++++++++++++++++ 2 files changed, 30 insertions(+), 25 deletions(-) rename {tests/features/java => modules/jvm/api/tests/features}/runtime.feature (59%) create mode 100644 modules/run/tests/features/java.runtime.feature diff --git a/tests/features/java/runtime.feature b/modules/jvm/api/tests/features/runtime.feature similarity index 59% rename from tests/features/java/runtime.feature rename to modules/jvm/api/tests/features/runtime.feature index 1a4c279b..bba9619f 100644 --- a/tests/features/java/runtime.feature +++ b/modules/jvm/api/tests/features/runtime.feature @@ -2,31 +2,7 @@ @ubi8/openjdk-11 @ubi8/openjdk-17 @ubi8/openjdk-21 -Feature: Openshift OpenJDK Runtime tests - 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 - - Scenario: Ensure JAVA_ARGS are passed through to the running java application - Given s2i build https://github.com/jboss-container-images/openjdk-test-applications from undertow-servlet - | variable | value | - | JAVA_ARGS | Hello from CTF test | - Then container log should contain /deployments/undertow-servlet.jar Hello from CTF test - - Scenario: Ensure diagnostic options work correctly - Given s2i build https://github.com/jboss-container-images/openjdk-test-applications from undertow-servlet - | variable | value | - | JAVA_ARGS | Hello from CTF test | - | JAVA_DIAGNOSTICS | true | - Then container log should contain /deployments/undertow-servlet.jar Hello from CTF test - And container log should contain -XX:NativeMemoryTracking=summary - - @ubi8 - Scenario: OPENJDK-474 to ensure JAVA_ARGS is not duplicated in the java command line - Given container is started with env - | variable | value | - | JAVA_ARGS | unique | - Then container log should not contain unique unique +Feature: OpenJDK Runtime tests @ubi8 Scenario: Check JAVA_APP_NAME can contain spaces (OPENJDK-104) diff --git a/modules/run/tests/features/java.runtime.feature b/modules/run/tests/features/java.runtime.feature new file mode 100644 index 00000000..ce3ca1d5 --- /dev/null +++ b/modules/run/tests/features/java.runtime.feature @@ -0,0 +1,29 @@ +@ubi8/openjdk-8 +@ubi8/openjdk-11 +@ubi8/openjdk-17 +@ubi8/openjdk-21 +Feature: Openshift OpenJDK Runtime tests + 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 + + Scenario: Ensure JAVA_ARGS are passed through to the running java application + Given s2i build https://github.com/jboss-container-images/openjdk-test-applications from undertow-servlet + | variable | value | + | JAVA_ARGS | Hello from CTF test | + Then container log should contain /deployments/undertow-servlet.jar Hello from CTF test + + Scenario: Ensure diagnostic options work correctly + Given s2i build https://github.com/jboss-container-images/openjdk-test-applications from undertow-servlet + | variable | value | + | JAVA_ARGS | Hello from CTF test | + | JAVA_DIAGNOSTICS | true | + Then container log should contain /deployments/undertow-servlet.jar Hello from CTF test + And container log should contain -XX:NativeMemoryTracking=summary + + @ubi8 + Scenario: OPENJDK-474 to ensure JAVA_ARGS is not duplicated in the java command line + Given container is started with env + | variable | value | + | JAVA_ARGS | unique | + Then container log should not contain unique unique