From 10e700d7b8e93ef7166fbcda70944ecaaca2733e Mon Sep 17 00:00:00 2001 From: Antonio Vieiro Date: Wed, 13 Nov 2024 17:40:50 +0100 Subject: [PATCH] [OPENJDK-3426] Adjust Behave test tagging for new container names Signed-off-by: Antonio Vieiro --- .github/workflows/image-workflow-template.yml | 8 ++++---- .github/workflows/ubi9-openjdk-17-runtime.yml | 10 ---------- .github/workflows/ubi9-openjdk-17.yml | 10 ---------- .github/workflows/ubi9-openjdk-21-runtime.yml | 10 ---------- .github/workflows/ubi9-openjdk-21.yml | 10 ---------- modules/jdk/tests/features/openjdk.feature | 16 ++++++++-------- modules/jvm/tests/features/gc.feature | 2 +- modules/jvm/tests/features/memory.feature | 12 ++++++------ modules/jvm/tests/features/runtime.feature | 18 +++++++++--------- .../maven/s2i/tests/features/java_s2i.feature | 2 +- .../run/tests/features/java.runtime.feature | 2 +- modules/run/tests/features/run.feature | 2 +- .../tests/features/java_s2i_quarkus.feature | 2 +- .../s2i/core/tests/features/s2i-core.feature | 2 +- modules/user/tests/features/general.feature | 2 +- tests/features/imagebasic.feature | 4 ++-- tests/features/java/ports.feature | 2 +- 17 files changed, 37 insertions(+), 77 deletions(-) delete mode 100644 .github/workflows/ubi9-openjdk-17-runtime.yml delete mode 100644 .github/workflows/ubi9-openjdk-17.yml delete mode 100644 .github/workflows/ubi9-openjdk-21-runtime.yml delete mode 100644 .github/workflows/ubi9-openjdk-21.yml diff --git a/.github/workflows/image-workflow-template.yml b/.github/workflows/image-workflow-template.yml index 4d2c3f7f..0a23e8ac 100644 --- a/.github/workflows/image-workflow-template.yml +++ b/.github/workflows/image-workflow-template.yml @@ -39,7 +39,7 @@ jobs: - name: clear docker credentials run: docker logout -# - name: Behave Tests -# run: | -# echo /home/runner/work/_temp/openshift-bin >> $GITHUB_PATH -# cekit -v --descriptor ${{ inputs.image }}.yaml test behave --steps-url https://github.com/jmtd/behave-test-steps + - name: Behave Tests + run: | + echo /home/runner/work/_temp/openshift-bin >> $GITHUB_PATH + cekit -v --descriptor ${{ inputs.image }}.yaml test behave --steps-url https://github.com/jmtd/behave-test-steps diff --git a/.github/workflows/ubi9-openjdk-17-runtime.yml b/.github/workflows/ubi9-openjdk-17-runtime.yml deleted file mode 100644 index d83d0222..00000000 --- a/.github/workflows/ubi9-openjdk-17-runtime.yml +++ /dev/null @@ -1,10 +0,0 @@ -name: UBI9 OpenJDK 17 Runtime S2I Image CI -on: [push, pull_request] -env: - LANG: en_US.UTF-8 - IMAGE: ubi9-openjdk-17-runtime -jobs: - call-openjdkci: - uses: ./.github/workflows/image-workflow-template.yml - with: - image: ubi9-openjdk-17-runtime diff --git a/.github/workflows/ubi9-openjdk-17.yml b/.github/workflows/ubi9-openjdk-17.yml deleted file mode 100644 index b5dc14eb..00000000 --- a/.github/workflows/ubi9-openjdk-17.yml +++ /dev/null @@ -1,10 +0,0 @@ -name: UBI9 OpenJDK 17 S2I Image CI -on: [push, pull_request] -env: - LANG: en_US.UTF-8 - IMAGE: ubi9-openjdk-17 -jobs: - call-openjdkci: - uses: ./.github/workflows/image-workflow-template.yml - with: - image: ubi9-openjdk-17 diff --git a/.github/workflows/ubi9-openjdk-21-runtime.yml b/.github/workflows/ubi9-openjdk-21-runtime.yml deleted file mode 100644 index 1c8c5d36..00000000 --- a/.github/workflows/ubi9-openjdk-21-runtime.yml +++ /dev/null @@ -1,10 +0,0 @@ -name: UBI9 OpenJDK 21 Runtime S2I Image CI -on: [push, pull_request] -env: - LANG: en_US.UTF-8 - IMAGE: ubi9-openjdk-21-runtime -jobs: - call-openjdkci: - uses: ./.github/workflows/image-workflow-template.yml - with: - image: ubi9-openjdk-21-runtime diff --git a/.github/workflows/ubi9-openjdk-21.yml b/.github/workflows/ubi9-openjdk-21.yml deleted file mode 100644 index 3b23687e..00000000 --- a/.github/workflows/ubi9-openjdk-21.yml +++ /dev/null @@ -1,10 +0,0 @@ -name: UBI9 OpenJDK 21 S2I Image CI -on: [push, pull_request] -env: - LANG: en_US.UTF-8 - IMAGE: ubi9-openjdk-21 -jobs: - call-openjdkci: - uses: ./.github/workflows/image-workflow-template.yml - with: - image: ubi9-openjdk-21 diff --git a/modules/jdk/tests/features/openjdk.feature b/modules/jdk/tests/features/openjdk.feature index 1bace562..b033a223 100644 --- a/modules/jdk/tests/features/openjdk.feature +++ b/modules/jdk/tests/features/openjdk.feature @@ -1,7 +1,7 @@ Feature: Miscellaneous OpenJDK-related unit tests - @ubi9/openjdk-11 - @ubi9/openjdk-11-runtime + @openjdk-els/openjdk-11-rhel9 + @openjdk-els/openjdk-11-runtime-rhel9 Scenario: Check that only OpenJDK 11 is installed When container is started with args | arg | value | @@ -37,7 +37,7 @@ Feature: Miscellaneous OpenJDK-related unit tests | command | bash -c "$JAVA_HOME/bin/java -version" | Then available container log should contain OpenJDK Runtime Environment - @ubi9 + @openjdk-els Scenario: Check that certain non-UBI packages are not installed When container is started with args | arg | value | @@ -46,8 +46,8 @@ Feature: Miscellaneous OpenJDK-related unit tests Then available container log should not contain os-prober Then available container log should not contain rpm-plugin-systemd-inhibit - @ubi9/openjdk-11 - @ubi9/openjdk-11-runtime + @openjdk-els/openjdk-11-rhel9 + @openjdk-els/openjdk-11-runtime-rhel9 Scenario: Check that directories from other JDKs are not present (JDK11) When container is started with args | arg | value | @@ -76,21 +76,21 @@ Feature: Miscellaneous OpenJDK-related unit tests Then available container log should not contain java-11 Then available container log should not contain java-17 - @ubi9 + @openjdk-els Scenario: Ensure LANG is defined and contains UTF-8 When container is started with args | arg | value | | command | bash -c "$JAVA_HOME/bin/java -XshowSettings:properties -version" | Then available container log should contain file.encoding = UTF-8 - @ubi9 + @openjdk-els Scenario: Ensure tar is installed (OPENJDK-1165) When container is started with args | arg | value | | command | tar | Then available container log should not contain command not found - @ubi9 + @openjdk-els Scenario: Ensure tzdata RPM is properly installed (OPENJDK-2519) When container is started with args | arg | value | diff --git a/modules/jvm/tests/features/gc.feature b/modules/jvm/tests/features/gc.feature index 1118081e..08bde2d9 100644 --- a/modules/jvm/tests/features/gc.feature +++ b/modules/jvm/tests/features/gc.feature @@ -1,4 +1,4 @@ -@ubi9 +@openjdk-els Feature: Openshift OpenJDK GC tests Scenario: Check default GC configuration diff --git a/modules/jvm/tests/features/memory.feature b/modules/jvm/tests/features/memory.feature index 64ca3858..7c540204 100644 --- a/modules/jvm/tests/features/memory.feature +++ b/modules/jvm/tests/features/memory.feature @@ -1,39 +1,39 @@ Feature: OPENJDK-559 JVM Memory tests - @ubi9 + @openjdk-els Scenario: Check default JVM max heap configuration Given container is started as uid 1000 Then container log should contain -XX:MaxRAMPercentage=80.0 - @ubi9 + @openjdk-els Scenario: Check configured JVM max heap configuration and ensure JAVA_MAX_MEM_RATIO accepts floats but only takes whole number part Given container is started with env | variable | value | | JAVA_MAX_MEM_RATIO | 90.4 | Then container log should contain -XX:MaxRAMPercentage=90.0 - @ubi9 + @openjdk-els Scenario: Ensure JAVA_MAX_MEM_RATIO accepts Integers Given container is started with env | variable | value | | JAVA_MAX_MEM_RATIO | 90 | Then container log should contain -XX:MaxRAMPercentage=90.0 - @ubi9 + @openjdk-els Scenario: Ensure JAVA_MAX_MEM_RATIO=0 disables parameter Given container is started with env | variable | value | | JAVA_MAX_MEM_RATIO | 0 | Then container log should not contain -XX:MaxRAMPercentage - @ubi9 + @openjdk-els Scenario: Check default JVM initial heap configuration is unspecified Given container is started as uid 1000 Then container log should not contain -XX:InitialRAMPercentage And container log should not contain -Xms # Not the runtime images - @ubi9/openjdk-11 + @openjdk-els/openjdk-11-rhel9 @ubi9/openjdk-17 @ubi9/openjdk-21 Scenario: Ensure Maven doesn't use MaxRAMPercentage=80 diff --git a/modules/jvm/tests/features/runtime.feature b/modules/jvm/tests/features/runtime.feature index 4104541a..1781da9e 100644 --- a/modules/jvm/tests/features/runtime.feature +++ b/modules/jvm/tests/features/runtime.feature @@ -1,23 +1,23 @@ -@ubi9/openjdk-11 +@openjdk-els/openjdk-11-rhel9 @ubi9/openjdk-17 @ubi9/openjdk-21 Feature: Openshift OpenJDK Runtime tests - @ubi9 + @openjdk-els Scenario: Check JAVA_OPTS overrides defaults Given container is started with env | variable | value | | JAVA_OPTS | --show-version | Then container log should not contain -XX:MaxRAMPercentage - @ubi9 + @openjdk-els Scenario: Check empty JAVA_OPTS overrides defaults Given container is started with env | variable | value | | JAVA_OPTS | | Then container log should not contain -XX:MaxRAMPercentage - @ubi9 + @openjdk-els Scenario: Check JAVA_OPTS overrides JAVA_OPTS_APPEND Given container is started with env | variable | value | @@ -26,33 +26,33 @@ Feature: Openshift OpenJDK Runtime tests Then container log should contain -verbose:gc And container log should not contain -Xint - @ubi9 + @openjdk-els Scenario: Check JAVA_APP_NAME can contain spaces (OPENJDK-1551) Given container is started with env | variable | value | | JAVA_APP_NAME | foo bar | Then container log should not contain exec: bar': not found - @ubi9 + @openjdk-els Scenario: Check default JAVA_APP_DIR (OPENJDK-2034) When container is ready Then available container log should contain INFO running in /deployments - @ubi9 + @openjdk-els Scenario: Check custom JAVA_APP_DIR (OPENJDK-2034) Given container is started with env | variable | value | | JAVA_APP_DIR | /home/default | Then available container log should contain INFO running in /home/default - @ubi9 + @openjdk-els Scenario: Check relative path JAVA_APP_DIR (OPENJDK-2034) Given container is started with env | variable | value | | JAVA_APP_DIR | . | Then available container log should contain INFO running in /home/default - @ubi9 + @openjdk-els Scenario: Check non-existent path JAVA_APP_DIR (OPENJDK-2034) Given container is started with env | variable | value | diff --git a/modules/maven/s2i/tests/features/java_s2i.feature b/modules/maven/s2i/tests/features/java_s2i.feature index 616b57b5..29df7ea0 100644 --- a/modules/maven/s2i/tests/features/java_s2i.feature +++ b/modules/maven/s2i/tests/features/java_s2i.feature @@ -1,6 +1,6 @@ # temporarily marking 'ignore' so these tests are skipped on GHA @ignore -@ubi9/openjdk-11 +@openjdk-els/openjdk-11-rhel9 @ubi9/openjdk-17 @ubi9/openjdk-21 Feature: Openshift OpenJDK S2I tests diff --git a/modules/run/tests/features/java.runtime.feature b/modules/run/tests/features/java.runtime.feature index bfb54ea1..a1da6f14 100644 --- a/modules/run/tests/features/java.runtime.feature +++ b/modules/run/tests/features/java.runtime.feature @@ -1,4 +1,4 @@ -@ubi9/openjdk-11 +@openjdk-els/openjdk-11-rhel9 @ubi9/openjdk-17 @ubi9/openjdk-21 Feature: Openshift OpenJDK Runtime tests (OPENJDK-474) diff --git a/modules/run/tests/features/run.feature b/modules/run/tests/features/run.feature index ad8bf8cf..354c2979 100644 --- a/modules/run/tests/features/run.feature +++ b/modules/run/tests/features/run.feature @@ -1,4 +1,4 @@ -@ubi9 +@openjdk-els Feature: OpenJDK run script tests Scenario: Ensure command-line options containing 'password' are masked in logs Given container is started with env diff --git a/modules/s2i/core/tests/features/java_s2i_quarkus.feature b/modules/s2i/core/tests/features/java_s2i_quarkus.feature index b0dbf46f..4470b30c 100644 --- a/modules/s2i/core/tests/features/java_s2i_quarkus.feature +++ b/modules/s2i/core/tests/features/java_s2i_quarkus.feature @@ -1,5 +1,5 @@ # builder only -@ubi9/openjdk-11 +@openjdk-els/openjdk-11-rhel9 @ubi9/openjdk-17 @ubi9/openjdk-21 Feature: Openshift OpenJDK S2I tests (Quarkus-based) diff --git a/modules/s2i/core/tests/features/s2i-core.feature b/modules/s2i/core/tests/features/s2i-core.feature index 9d5eb115..c294cba4 100644 --- a/modules/s2i/core/tests/features/s2i-core.feature +++ b/modules/s2i/core/tests/features/s2i-core.feature @@ -1,4 +1,4 @@ -@ubi9/openjdk-11 +@openjdk-els/openjdk-11-rhel9 @ubi9/openjdk-17 @ubi9/openjdk-21 Feature: Openshift S2I tests diff --git a/modules/user/tests/features/general.feature b/modules/user/tests/features/general.feature index d8f85341..371cb665 100644 --- a/modules/user/tests/features/general.feature +++ b/modules/user/tests/features/general.feature @@ -1,6 +1,6 @@ Feature: Miscellaneous general settings unit tests - @ubi9 + @openjdk-els Scenario: Check the attributes of /home/default using stat When container is started with args | arg | value | diff --git a/tests/features/imagebasic.feature b/tests/features/imagebasic.feature index ceb6be8d..c345c8ea 100644 --- a/tests/features/imagebasic.feature +++ b/tests/features/imagebasic.feature @@ -1,6 +1,6 @@ Feature: Tests for all openshift images - @ubi9 + @openjdk-els Scenario: Check that common labels are correctly set Given image is built # UBI base image versions are the RHEL version, e.g. "9.2", whereas all of @@ -9,7 +9,7 @@ Feature: Tests for all openshift images And the image should contain label name containing value openjdk # builder-only test - @ubi9/openjdk-11 + @openjdk-els/openjdk-11-rhel9 @ubi9/openjdk-17 @ubi9/openjdk-21 Scenario: Check that builder labels are correctly set diff --git a/tests/features/java/ports.feature b/tests/features/java/ports.feature index 6542c246..cc7dffe3 100644 --- a/tests/features/java/ports.feature +++ b/tests/features/java/ports.feature @@ -1,4 +1,4 @@ -@ubi9/openjdk-11 +@openjdk-els/openjdk-11-rhel9 @ubi9/openjdk-17 @ubi9/openjdk-21 Feature: Openshift OpenJDK port tests