From 9baeab716d222bcf3cb69a5ac2ba98c67d00f497 Mon Sep 17 00:00:00 2001 From: Jonathan Dowland Date: Thu, 25 Apr 2024 12:14:05 +0100 Subject: [PATCH 1/2] [OPENJDK-2993] re-tag jolokia Feature Ensure the first of the three Scenarios is covered by tags. https://issues.redhat.com/browse/OPENJDK-2993 Signed-off-by: Jonathan Dowland --- modules/jolokia/8.2/tests/features/jolokia.feature | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/modules/jolokia/8.2/tests/features/jolokia.feature b/modules/jolokia/8.2/tests/features/jolokia.feature index 79802646..94bcdebb 100644 --- a/modules/jolokia/8.2/tests/features/jolokia.feature +++ b/modules/jolokia/8.2/tests/features/jolokia.feature @@ -1,3 +1,5 @@ +@ubi8/openjdk-8 +@ubi8/openjdk-11 # Tests for jboss/container/jolokia Feature: Openshift OpenJDK Jolokia tests @@ -5,8 +7,6 @@ Feature: Openshift OpenJDK Jolokia tests Given s2i build https://github.com/jboss-container-images/openjdk-test-applications from undertow-servlet Then run sh -c 'unzip -q -p /usr/share/java/jolokia-jvm-agent/jolokia-jvm.jar META-INF/maven/org.jolokia/jolokia-jvm/pom.properties | grep -F ${JOLOKIA_VERSION}' in container and check its output for version= - @ubi8/openjdk-8 - @ubi8/openjdk-11 Scenario: Check jolokia port is available Given s2i build https://github.com/jboss-container-images/openjdk-test-applications from undertow-servlet Then check that port 8778 is open @@ -14,8 +14,6 @@ Feature: Openshift OpenJDK Jolokia tests | path | value | | /Config/ExposedPorts | 8778/tcp | - @ubi8/openjdk-8 - @ubi8/openjdk-11 Scenario: Ensure Jolokia diagnostic options work correctly Given s2i build https://github.com/jboss-container-images/openjdk-test-applications from undertow-servlet | variable | value | From cea171476947bbd822b0efb26c23792d0a1ae57c Mon Sep 17 00:00:00 2001 From: Jonathan Dowland Date: Fri, 26 Apr 2024 14:26:50 +0100 Subject: [PATCH 2/2] [OPENJDK-2993] Fix jolokia test that used 'unzip' We dropped unzip from the images as nothing else was using it. Rework the jolokia test that used unzip to use jar instead. Adjust the test to not require s2i so it executes much faster and retitle it to be clearer as to what it is testing. Signed-off-by: Jonathan Dowland --- modules/jolokia/8.2/tests/features/jolokia.feature | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/jolokia/8.2/tests/features/jolokia.feature b/modules/jolokia/8.2/tests/features/jolokia.feature index 94bcdebb..076f8c66 100644 --- a/modules/jolokia/8.2/tests/features/jolokia.feature +++ b/modules/jolokia/8.2/tests/features/jolokia.feature @@ -3,9 +3,9 @@ # Tests for jboss/container/jolokia Feature: Openshift OpenJDK Jolokia tests - Scenario: Check Environment variable is correct - Given s2i build https://github.com/jboss-container-images/openjdk-test-applications from undertow-servlet - Then run sh -c 'unzip -q -p /usr/share/java/jolokia-jvm-agent/jolokia-jvm.jar META-INF/maven/org.jolokia/jolokia-jvm/pom.properties | grep -F ${JOLOKIA_VERSION}' in container and check its output for version= + Scenario: Ensure JOLOKIA_VERSION variable aligns with JAR + When container is started with command sh + Then run sh -c 'jar xf /usr/share/java/jolokia-jvm-agent/jolokia-jvm.jar META-INF/maven/org.jolokia/jolokia-jvm/pom.properties && grep ${JOLOKIA_VERSION} META-INF/maven/org.jolokia/jolokia-jvm/pom.properties' in container and check its output for version= Scenario: Check jolokia port is available Given s2i build https://github.com/jboss-container-images/openjdk-test-applications from undertow-servlet