From 4afc8e6c81f762cf9b6a1cfb541e63a6ef0b3b34 Mon Sep 17 00:00:00 2001 From: Jurrie Overgoor <1213142+Jurrie@users.noreply.github.com> Date: Thu, 22 Feb 2024 16:14:42 +0100 Subject: [PATCH] Use legal Helm chart names in the test cases Signed-off-by: Jurrie Overgoor --- .../springboot/helmconfig/HelmConfigITCase.java | 14 ++++++-------- .../maven/spring/helm-config/pom.xml | 2 +- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/it/src/test/java/org/eclipse/jkube/integrationtests/springboot/helmconfig/HelmConfigITCase.java b/it/src/test/java/org/eclipse/jkube/integrationtests/springboot/helmconfig/HelmConfigITCase.java index b5ba330a..11fd69dd 100644 --- a/it/src/test/java/org/eclipse/jkube/integrationtests/springboot/helmconfig/HelmConfigITCase.java +++ b/it/src/test/java/org/eclipse/jkube/integrationtests/springboot/helmconfig/HelmConfigITCase.java @@ -100,14 +100,14 @@ void k8sHelm() throws Exception { final InvocationResult invocationResult = maven("k8s:helm"); // Then assertInvocation(invocationResult); - assertThat(new File(String.format("../%s/target/jkube/helm/This is the chart name/kubernetes/This is the chart name-1.0-KUBERNETES.tar", getProject())) + assertThat(new File(String.format("../%s/target/jkube/helm/the-chart-name/kubernetes/the-chart-name-1.0-KUBERNETES.tar", getProject())) .exists(), equalTo(true)); final File helmDirectory = new File( - String.format("../%s/target/jkube/helm/This is the chart name/kubernetes", getProject())); + String.format("../%s/target/jkube/helm/the-chart-name/kubernetes", getProject())); assertThat(new File(helmDirectory, "Chart.yaml"), yaml(allOf( aMapWithSize(10), hasEntry("apiVersion", "v1"), - hasEntry("name", "This is the chart name"), + hasEntry("name", "the-chart-name"), hasEntry("version", "1.0-KUBERNETES"), hasEntry("description", "Description different to that in the pom.xml"), hasEntry("home", "https://www.home.example.com"), @@ -173,7 +173,6 @@ void ocHelm() throws Exception { void k8sHelmPush() throws Exception { // Given final Properties properties = properties( - "jkube.helm.chart", "the-chart-name", "jkube.helm.stableRepository.type", "OCI", "jkube.helm.stableRepository.name", "docker", "jkube.helm.stableRepository.url", "oci://" + registry, @@ -196,8 +195,7 @@ void k8sHelmPush() throws Exception { void ocHelmPush() throws Exception { // Given final Properties properties = properties( - "jkube.helm.chart", "the-chart-name", - "jkube.helm.stableRepository.type", "OCI", + "jkube.helm.stableRepository.type", "OCI", "jkube.helm.stableRepository.name", "docker", "jkube.helm.stableRepository.url", "oci://" + registry, "jkube.helm.stableRepository.username", "ignored", @@ -207,7 +205,7 @@ void ocHelmPush() throws Exception { final InvocationResult invocationResult = maven("oc:helm-push", properties); // Then assertInvocation(invocationResult); - assertThat(httpGet("http://" + registry + "/v2/the-chart-name/tags/list").body(), - containsString("{\"name\":\"the-chart-name\",\"tags\":[\"0.1-OC\"]}")); + assertThat(httpGet("http://" + registry + "/v2/different-name-for-oc/tags/list").body(), + containsString("{\"name\":\"different-name-for-oc\",\"tags\":[\"0.1-OC\"]}")); } } diff --git a/projects-to-be-tested/maven/spring/helm-config/pom.xml b/projects-to-be-tested/maven/spring/helm-config/pom.xml index f554afa0..9817628d 100644 --- a/projects-to-be-tested/maven/spring/helm-config/pom.xml +++ b/projects-to-be-tested/maven/spring/helm-config/pom.xml @@ -65,7 +65,7 @@ kubernetes-maven-plugin - This is the chart name + the-chart-name tar 1.0-KUBERNETES Description different to that in the pom.xml