fix: oci pull directory conflict when download twice (#914)

* fix: oci pull directory conflict when download twice

Signed-off-by: yxxhero <aiopsclub@163.com>

* add test cases
This commit is contained in:
yxxhero
2023-07-23 21:10:03 +08:00
committed by GitHub
parent d44b94cd68
commit 67ab08ab5e
6 changed files with 40 additions and 15 deletions
+1
View File
@@ -76,6 +76,7 @@ ${kubectl} create namespace ${test_ns} || fail "Could not create namespace ${tes
# TEST CASES----------------------------------------------------------------------------------------------------------
. ${dir}/test-cases/helmfile-double-fetch.sh
. ${dir}/test-cases/v1-subhelmfile-multi-bases-with-array-values.sh
. ${dir}/test-cases/kustomized-fetch.sh
. ${dir}/test-cases/happypath.sh
@@ -0,0 +1,13 @@
helmfile_double_fetch_case_input_dir="${cases_dir}/helmfile-double-fetch/input"
config_file="helmfile.yaml"
test_start "helmfile fetch with helmfile_double_fetch"
info "Comparing fetch/helmfile_double_fetch_first"
${helmfile} -f ${helmfile_double_fetch_case_input_dir}/${config_file} fetch --output-dir /tmp/chartdir || fail "\"helmfile fetch\" shouldn't fail"
info "Comparing template/helmfile_double_fetch_second"
${helmfile} -f ${helmfile_double_fetch_case_input_dir}/${config_file} fetch --output-dir /tmp/chartdir || fail "\"helmfile fetch\" shouldn't fail"
test_pass "helmfile fetch with helmfile_double_fetch"
@@ -0,0 +1,8 @@
repositories:
- name: docker
url: registry-1.docker.io
oci: true
releases:
- name: docker/bitnamicharts/matomo
chart: docker/bitnamicharts/matomo
version: "1.1.2"