From 3c7ad8a370d272b001f8f810deb2e0617b359e21 Mon Sep 17 00:00:00 2001 From: Marc Nuri Date: Mon, 9 Dec 2024 10:04:13 +0100 Subject: [PATCH] fix: don't run helm native goals in unsupported OS --- .github/workflows/e2e-tests.yml | 2 +- .../springboot/helmconfig/HelmConfigK8sITCase.java | 4 ++++ .../springboot/helmconfig/HelmConfigOcITCase.java | 5 +++++ 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/e2e-tests.yml b/.github/workflows/e2e-tests.yml index f2f7fabf..0e0f2dd5 100644 --- a/.github/workflows/e2e-tests.yml +++ b/.github/workflows/e2e-tests.yml @@ -112,7 +112,7 @@ jobs: path: ./it/target/jkube-test-report.txt minikube-legacy: - name: K8S + name: K8S (Minikube Legacy) needs: build-jkube runs-on: ubuntu-20.04 strategy: diff --git a/it/src/test/java/org/eclipse/jkube/integrationtests/springboot/helmconfig/HelmConfigK8sITCase.java b/it/src/test/java/org/eclipse/jkube/integrationtests/springboot/helmconfig/HelmConfigK8sITCase.java index c5872482..16318279 100644 --- a/it/src/test/java/org/eclipse/jkube/integrationtests/springboot/helmconfig/HelmConfigK8sITCase.java +++ b/it/src/test/java/org/eclipse/jkube/integrationtests/springboot/helmconfig/HelmConfigK8sITCase.java @@ -22,6 +22,7 @@ import org.junit.jupiter.api.Tag; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.TestMethodOrder; +import org.junit.jupiter.api.condition.DisabledIfEnvironmentVariable; import java.io.ByteArrayOutputStream; import java.io.File; @@ -118,6 +119,7 @@ void k8sHelmPush() throws Exception { @Test @DisplayName("k8s:helm-uninstall, no release present, display error message") + @DisabledIfEnvironmentVariable(named = "ImageOS", matches = "ubuntu20") void k8sHelmUninstall_whenNoReleasePresent_thenErrorMessageDisplayed() throws Exception { // Given ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(); @@ -133,6 +135,7 @@ void k8sHelmUninstall_whenNoReleasePresent_thenErrorMessageDisplayed() throws Ex @Test @Order(4) @DisplayName("k8s:helm-install, should install the charts") + @DisabledIfEnvironmentVariable(named = "ImageOS", matches = "ubuntu20") void k8sHelmInstall() throws Exception { // Given ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(); @@ -150,6 +153,7 @@ void k8sHelmInstall() throws Exception { @Test @Order(5) @DisplayName("k8s:helm-uninstall, should uninstall the charts") + @DisabledIfEnvironmentVariable(named = "ImageOS", matches = "ubuntu20") void k8sHelmUninstall() throws Exception { // Given ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(); diff --git a/it/src/test/java/org/eclipse/jkube/integrationtests/springboot/helmconfig/HelmConfigOcITCase.java b/it/src/test/java/org/eclipse/jkube/integrationtests/springboot/helmconfig/HelmConfigOcITCase.java index 61cd2be0..51fdf1ea 100644 --- a/it/src/test/java/org/eclipse/jkube/integrationtests/springboot/helmconfig/HelmConfigOcITCase.java +++ b/it/src/test/java/org/eclipse/jkube/integrationtests/springboot/helmconfig/HelmConfigOcITCase.java @@ -23,6 +23,7 @@ import org.junit.jupiter.api.Tag; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.TestMethodOrder; +import org.junit.jupiter.api.condition.DisabledIfEnvironmentVariable; import java.io.ByteArrayOutputStream; import java.io.File; @@ -101,6 +102,7 @@ void ocHelm() throws Exception { @Test @Order(3) @DisplayName("oc:helm-push, should push the charts") + @DisabledIfEnvironmentVariable(named = "ImageOS", matches = "ubuntu20") void ocHelmPush() throws Exception { // Given final Properties properties = properties( @@ -120,6 +122,7 @@ void ocHelmPush() throws Exception { @Test @DisplayName("oc:helm-uninstall, no release present, display error message") + @DisabledIfEnvironmentVariable(named = "ImageOS", matches = "ubuntu20") void ocHelmUninstall_whenNoReleasePresent_thenErrorMessageDisplayed() throws Exception { // Given ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(); @@ -135,6 +138,7 @@ void ocHelmUninstall_whenNoReleasePresent_thenErrorMessageDisplayed() throws Exc @Test @Order(4) @DisplayName("oc:helm-install, should install the charts") + @DisabledIfEnvironmentVariable(named = "ImageOS", matches = "ubuntu20") void ocHelmInstall() throws Exception { // Given ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(); @@ -152,6 +156,7 @@ void ocHelmInstall() throws Exception { @Test @Order(5) @DisplayName("oc:helm-uninstall, should uninstall the charts") + @DisabledIfEnvironmentVariable(named = "ImageOS", matches = "ubuntu20") void ocHelmUninstall() throws Exception { // Given ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();