Skip to content

Commit c8a33c7

Browse files
authored
Fix helm tests (#827)
SUMMARY 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. In the longer term, we should find a better way to handle these kinds of test fixtures, probably by switching to local charts as much as possible. ISSUE TYPE Bugfix Pull Request Docs Pull Request Feature Pull Request New Module Pull Request COMPONENT NAME ADDITIONAL INFORMATION Reviewed-by: Helen Bailey <[email protected]> Reviewed-by: Yuriy Novostavskiy
1 parent 52f2cb5 commit c8a33c7

File tree

6 files changed

+11
-17
lines changed

6 files changed

+11
-17
lines changed

tests/integration/targets/helm/tasks/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44
loop_control:
55
loop_var: helm_version
66
with_items:
7-
- "v3.7.0"
7+
- "v3.8.0"

tests/integration/targets/helm/tasks/test_helm_reuse_values.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@
1717
- name: Initial chart installation
1818
helm:
1919
binary_path: "{{ helm_binary }}"
20-
chart_ref: redis
21-
chart_repo_url: https://charts.bitnami.com/bitnami
20+
chart_ref: oci://registry-1.docker.io/bitnamicharts/redis
2221
release_name: test-redis
2322
release_namespace: "{{ helm_namespace }}"
2423
create_namespace: true
@@ -42,8 +41,7 @@
4241
- name: Upgrade chart using reuse_values=true
4342
helm:
4443
binary_path: "{{ helm_binary }}"
45-
chart_ref: redis
46-
chart_repo_url: https://charts.bitnami.com/bitnami
44+
chart_ref: oci://registry-1.docker.io/bitnamicharts/redis
4745
release_name: test-redis
4846
release_namespace: "{{ helm_namespace }}"
4947
reuse_values: true

tests/integration/targets/helm/tasks/tests_chart.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -374,8 +374,8 @@
374374
chart_ref: "{{ chart_source }}"
375375
chart_version: "{{ chart_source_version | default(omit) }}"
376376
disable_hook: True
377-
release_name: "MyRelease"
378-
release_namespace: "MyReleaseNamespace"
377+
release_name: "myrelease"
378+
release_namespace: "myreleasenamespace"
379379
show_only:
380380
- "templates/configmap.yaml"
381381
release_values:
@@ -388,7 +388,7 @@
388388
- result is changed
389389
- result is not failed
390390
- result.rc == 0
391-
- result.command is match(helm_binary+" template MyRelease "+chart_source)
391+
- result.command is match(helm_binary+" template myrelease "+chart_source)
392392
- result.stdout is search("ThisValue")
393393
when: chart_source is search("test-chart")
394394
# limit assertion of test result to controlled (local) chart_source

tests/integration/targets/helm_pull/tasks/main.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -203,9 +203,8 @@
203203
- name: Download chart using untar_chart
204204
helm_pull:
205205
binary_path: "{{ helm_path }}"
206-
chart_ref: redis
206+
chart_ref: "oci://registry-1.docker.io/bitnamicharts/redis"
207207
destination: "{{ destination }}"
208-
repo_url: "https://charts.bitnami.com/bitnami"
209208
untar_chart: true
210209
register: _result
211210

tests/integration/targets/helm_set_values/tasks/main.yml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
- name: Install helm using set_values parameters
22
helm:
33
binary_path: "{{ helm_binary }}"
4-
chart_ref: mariadb
5-
chart_repo_url: https://charts.bitnami.com/bitnami
4+
chart_ref: oci://registry-1.docker.io/bitnamicharts/mariadb
65
release_name: test-mariadb
76
release_namespace: "{{ helm_namespace }}"
87
create_namespace: true
@@ -36,8 +35,7 @@
3635
- name: Install helm using set_values parameters
3736
helm:
3837
binary_path: "{{ helm_binary }}"
39-
chart_ref: apache
40-
chart_repo_url: https://charts.bitnami.com/bitnami
38+
chart_ref: oci://registry-1.docker.io/bitnamicharts/apache
4139
release_name: test-apache
4240
release_namespace: "{{ helm_namespace }}"
4341
create_namespace: true
@@ -79,8 +77,7 @@
7977
- name: Install helm using set_values parameters
8078
helm:
8179
binary_path: "{{ helm_binary }}"
82-
chart_ref: minio
83-
chart_repo_url: https://charts.bitnami.com/bitnami
80+
chart_ref: oci://registry-1.docker.io/bitnamicharts/minio
8481
release_name: test-minio
8582
release_namespace: "{{ helm_namespace }}"
8683
create_namespace: true
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
---
2-
helm_version: v3.7.0
2+
helm_version: v3.8.0
33
helm_install_path: /tmp/helm
44
helm_default_archive_name: "helm-{{ helm_version }}-{{ ansible_system | lower }}-amd64.tar.gz"

0 commit comments

Comments
 (0)