diff --git a/changelogs/fragments/522-fix-helm-tests.yml b/changelogs/fragments/522-fix-helm-tests.yml new file mode 100644 index 0000000000..808509a6ca --- /dev/null +++ b/changelogs/fragments/522-fix-helm-tests.yml @@ -0,0 +1,3 @@ +--- +trivial: + - fix helm test suite (https://github.com/ansible-collections/kubernetes.core/pull/522). diff --git a/tests/integration/targets/helm/defaults/main.yml b/tests/integration/targets/helm/defaults/main.yml index 60a68664bd..a29cd26011 100644 --- a/tests/integration/targets/helm/defaults/main.yml +++ b/tests/integration/targets/helm/defaults/main.yml @@ -4,9 +4,9 @@ helm_binary: "/tmp/helm/{{ ansible_system | lower }}-amd64/helm" chart_test: "ingress-nginx" chart_test_local_path: "nginx-ingress" -chart_test_version: 3.8.0 +chart_test_version: 4.2.4 chart_test_version_local_path: 1.32.0 -chart_test_version_upgrade: 3.9.0 +chart_test_version_upgrade: 4.2.5 chart_test_version_upgrade_local_path: 1.33.0 chart_test_repo: "https://kubernetes.github.io/ingress-nginx" chart_test_git_repo: "http://github.com/helm/charts.git" diff --git a/tests/integration/targets/helm/tasks/main.yml b/tests/integration/targets/helm/tasks/main.yml index e86d33df22..9d8dda3e7b 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.2.4" + - "v3.7.0" diff --git a/tests/integration/targets/helm/tasks/tests_chart.yml b/tests/integration/targets/helm/tasks/tests_chart.yml index cd0d6b224a..a0227215b0 100644 --- a/tests/integration/targets/helm/tasks/tests_chart.yml +++ b/tests/integration/targets/helm/tasks/tests_chart.yml @@ -335,6 +335,13 @@ that: - not (install is changed) + - name: "Remove {{ chart_release_name }} release" + helm: + binary_path: "{{ helm_binary }}" + name: "{{ chart_release_name }}" + namespace: "{{ helm_namespace }}" + state: absent + - name: Render templates helm_template: binary_path: "{{ helm_binary }}" diff --git a/tests/integration/targets/helm/tasks/tests_chart/from_repository.yml b/tests/integration/targets/helm/tasks/tests_chart/from_repository.yml index 7187bf2872..d00599a664 100644 --- a/tests/integration/targets/helm/tasks/tests_chart/from_repository.yml +++ b/tests/integration/targets/helm/tasks/tests_chart/from_repository.yml @@ -14,7 +14,7 @@ chart_source_version_upgrade: "{{ chart_test_version_upgrade }}" helm_namespace: "{{ test_namespace[6] }}" -- name: Add chart repo +- name: Remove chart repo helm_repository: binary_path: "{{ helm_binary }}" name: test_helm diff --git a/tests/integration/targets/helm/tasks/tests_chart/from_url.yml b/tests/integration/targets/helm/tasks/tests_chart/from_url.yml index 1286b401df..0d4922ebb4 100644 --- a/tests/integration/targets/helm/tasks/tests_chart/from_url.yml +++ b/tests/integration/targets/helm/tasks/tests_chart/from_url.yml @@ -3,6 +3,6 @@ include_tasks: "../tests_chart.yml" vars: source: url - chart_source: "https://github.com/kubernetes/ingress-nginx/releases/download/{{ chart_test }}-{{ chart_test_version }}/{{ chart_test }}-{{ chart_test_version }}.tgz" - chart_source_upgrade: "https://github.com/kubernetes/ingress-nginx/releases/download/{{ chart_test }}-{{ chart_test_version_upgrade }}/{{ chart_test }}-{{ chart_test_version_upgrade }}.tgz" + chart_source: "https://github.com/kubernetes/ingress-nginx/releases/download/helm-chart-{{ chart_test_version }}/{{ chart_test }}-{{ chart_test_version }}.tgz" + chart_source_upgrade: "https://github.com/kubernetes/ingress-nginx/releases/download/helm-chart-{{ chart_test_version_upgrade }}/{{ chart_test }}-{{ chart_test_version_upgrade }}.tgz" helm_namespace: "{{ test_namespace[5] }}"