From 54cfd62bcd20060a93e29060401c544d22d46889 Mon Sep 17 00:00:00 2001 From: Mike Graves Date: Fri, 13 Dec 2024 11:38:13 -0500 Subject: [PATCH] Fix helm tests Some of the charts we've used for testing are no longer available at the old helm repository urls, as they've been moved to oci registries. This updates those charts. --- tests/integration/targets/helm/tasks/main.yml | 2 +- .../targets/helm/tasks/test_helm_reuse_values.yml | 6 ++---- tests/integration/targets/helm/tasks/tests_chart.yml | 6 +++--- tests/integration/targets/helm_pull/tasks/main.yml | 3 +-- tests/integration/targets/helm_set_values/tasks/main.yml | 9 +++------ tests/integration/targets/install_helm/defaults/main.yml | 2 +- 6 files changed, 11 insertions(+), 17 deletions(-) diff --git a/tests/integration/targets/helm/tasks/main.yml b/tests/integration/targets/helm/tasks/main.yml index 9d8dda3e7b..79c2832031 100644 --- a/tests/integration/targets/helm/tasks/main.yml +++ b/tests/integration/targets/helm/tasks/main.yml @@ -4,4 +4,4 @@ loop_control: loop_var: helm_version with_items: - - "v3.7.0" + - "v3.8.0" diff --git a/tests/integration/targets/helm/tasks/test_helm_reuse_values.yml b/tests/integration/targets/helm/tasks/test_helm_reuse_values.yml index 9384fd4f4f..7801b485ea 100644 --- a/tests/integration/targets/helm/tasks/test_helm_reuse_values.yml +++ b/tests/integration/targets/helm/tasks/test_helm_reuse_values.yml @@ -17,8 +17,7 @@ - name: Initial chart installation helm: binary_path: "{{ helm_binary }}" - chart_ref: redis - chart_repo_url: https://charts.bitnami.com/bitnami + chart_ref: oci://registry-1.docker.io/bitnamicharts/redis release_name: test-redis release_namespace: "{{ helm_namespace }}" create_namespace: true @@ -42,8 +41,7 @@ - name: Upgrade chart using reuse_values=true helm: binary_path: "{{ helm_binary }}" - chart_ref: redis - chart_repo_url: https://charts.bitnami.com/bitnami + chart_ref: oci://registry-1.docker.io/bitnamicharts/redis release_name: test-redis release_namespace: "{{ helm_namespace }}" reuse_values: true diff --git a/tests/integration/targets/helm/tasks/tests_chart.yml b/tests/integration/targets/helm/tasks/tests_chart.yml index ff1c427a86..fda5bf85c2 100644 --- a/tests/integration/targets/helm/tasks/tests_chart.yml +++ b/tests/integration/targets/helm/tasks/tests_chart.yml @@ -374,8 +374,8 @@ chart_ref: "{{ chart_source }}" chart_version: "{{ chart_source_version | default(omit) }}" disable_hook: True - release_name: "MyRelease" - release_namespace: "MyReleaseNamespace" + release_name: "myrelease" + release_namespace: "myreleasenamespace" show_only: - "templates/configmap.yaml" release_values: @@ -388,7 +388,7 @@ - result is changed - result is not failed - result.rc == 0 - - result.command is match(helm_binary+" template MyRelease "+chart_source) + - result.command is match(helm_binary+" template myrelease "+chart_source) - result.stdout is search("ThisValue") when: chart_source is search("test-chart") # limit assertion of test result to controlled (local) chart_source diff --git a/tests/integration/targets/helm_pull/tasks/main.yml b/tests/integration/targets/helm_pull/tasks/main.yml index 3705c5cb1c..1faf2be35c 100644 --- a/tests/integration/targets/helm_pull/tasks/main.yml +++ b/tests/integration/targets/helm_pull/tasks/main.yml @@ -203,9 +203,8 @@ - name: Download chart using untar_chart helm_pull: binary_path: "{{ helm_path }}" - chart_ref: redis + chart_ref: "oci://registry-1.docker.io/bitnamicharts/redis" destination: "{{ destination }}" - repo_url: "https://charts.bitnami.com/bitnami" untar_chart: true register: _result diff --git a/tests/integration/targets/helm_set_values/tasks/main.yml b/tests/integration/targets/helm_set_values/tasks/main.yml index 7ce5125f8d..f18428180e 100644 --- a/tests/integration/targets/helm_set_values/tasks/main.yml +++ b/tests/integration/targets/helm_set_values/tasks/main.yml @@ -1,8 +1,7 @@ - name: Install helm using set_values parameters helm: binary_path: "{{ helm_binary }}" - chart_ref: mariadb - chart_repo_url: https://charts.bitnami.com/bitnami + chart_ref: oci://registry-1.docker.io/bitnamicharts/mariadb release_name: test-mariadb release_namespace: "{{ helm_namespace }}" create_namespace: true @@ -36,8 +35,7 @@ - name: Install helm using set_values parameters helm: binary_path: "{{ helm_binary }}" - chart_ref: apache - chart_repo_url: https://charts.bitnami.com/bitnami + chart_ref: oci://registry-1.docker.io/bitnamicharts/apache release_name: test-apache release_namespace: "{{ helm_namespace }}" create_namespace: true @@ -79,8 +77,7 @@ - name: Install helm using set_values parameters helm: binary_path: "{{ helm_binary }}" - chart_ref: minio - chart_repo_url: https://charts.bitnami.com/bitnami + chart_ref: oci://registry-1.docker.io/bitnamicharts/minio release_name: test-minio release_namespace: "{{ helm_namespace }}" create_namespace: true diff --git a/tests/integration/targets/install_helm/defaults/main.yml b/tests/integration/targets/install_helm/defaults/main.yml index 0f8c952f49..6161efb680 100644 --- a/tests/integration/targets/install_helm/defaults/main.yml +++ b/tests/integration/targets/install_helm/defaults/main.yml @@ -1,4 +1,4 @@ --- -helm_version: v3.7.0 +helm_version: v3.8.0 helm_install_path: /tmp/helm helm_default_archive_name: "helm-{{ helm_version }}-{{ ansible_system | lower }}-amd64.tar.gz"