use dyff as yamldiff tool (#542)

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

Signed-off-by: yxxhero <aiopsclub@163.com>
This commit is contained in:
yxxhero
2022-11-27 09:47:09 +09:00
committed by GitHub
parent 60621ff318
commit 211852cd38
8 changed files with 13 additions and 159 deletions
+1 -1
View File
@@ -21,7 +21,7 @@ if [[ helm_major_version -eq 3 ]]; then
for i in $(seq 10); do
info "Comparing template/chart-needs #$i"
${helmfile} -f ${chart_need_case_input_dir}/helmfile.yaml template --include-needs > ${chart_needs_template_reverse} || fail "\"helmfile template\" shouldn't fail"
./yamldiff ${chart_need_case_output_dir}/template ${chart_needs_template_reverse} || fail "\"helmfile template\" should be consistent"
./dyff between -bs ${chart_need_case_output_dir}/template ${chart_needs_template_reverse} || fail "\"helmfile template\" should be consistent"
echo code=$?
done
@@ -419,7 +419,7 @@ spec:
- "--drivername=disk.csi.azure.com"
- "--volume-attach-limit=-1"
- "--cloud-config-secret-name=azure-cloud-provider"
- "--cloud-config-secret-namespace=helmfile-tests"
- "--cloud-config-secret-namespace=kube-system"
- "--custom-user-agent="
- "--user-agent-suffix=OSS-helm"
- "--allow-empty-cloud-config=true"
@@ -624,7 +624,7 @@ spec:
- "--drivername=disk.csi.azure.com"
- "--volume-attach-limit=-1"
- "--cloud-config-secret-name=azure-cloud-provider"
- "--cloud-config-secret-namespace=helmfile-tests"
- "--cloud-config-secret-namespace=kube-system"
- "--custom-user-agent="
- "--user-agent-suffix=OSS-helm"
- "--allow-empty-cloud-config=true"
@@ -866,7 +866,7 @@ spec:
- "--vm-type="
- "--drivername=disk.csi.azure.com"
- "--cloud-config-secret-name=azure-cloud-provider"
- "--cloud-config-secret-namespace=helmfile-tests"
- "--cloud-config-secret-namespace=kube-system"
- "--custom-user-agent="
- "--user-agent-suffix=OSS-helm"
- "--allow-empty-cloud-config=false"
+2 -2
View File
@@ -47,7 +47,7 @@ if [[ helm_major_version -eq 3 ]]; then
for i in $(seq 10); do
info "Comparing build/direct #$i"
${helmfile} -f ${secretssops_case_input_dir}/secretssops.yaml -e direct template --skip-deps > ${direct} || fail "\"helmfile template\" shouldn't fail"
./yamldiff ${secretssops_case_output_dir}/direct.build.yaml ${direct} || fail "\"helmfile template\" should be consistent"
./dyff between -bs ${secretssops_case_output_dir}/direct.build.yaml ${direct} || fail "\"helmfile template\" should be consistent"
echo code=$?
done
@@ -55,7 +55,7 @@ if [[ helm_major_version -eq 3 ]]; then
for i in $(seq 10); do
info "Comparing build/reverse #$i"
${helmfile} -f ${secretssops_case_input_dir}/secretssops.yaml -e reverse template --skip-deps > ${reverse} || fail "\"helmfile template\" shouldn't fail"
./yamldiff ${secretssops_case_output_dir}/reverse.build.yaml ${reverse} || fail "\"helmfile template\" should be consistent"
./dyff between -bs ${secretssops_case_output_dir}/reverse.build.yaml ${reverse} || fail "\"helmfile template\" should be consistent"
echo code=$?
done
@@ -10,7 +10,7 @@ if [[ helm_major_version -eq 3 ]]; then
for i in $(seq 10); do
info "Comparing build/yaml-overwrite #$i"
${helmfile} -f ${yaml_overwrite_case_input_dir}/issue.657.yaml template --skip-deps > ${yaml_overwrite_reverse} || fail "\"helmfile template\" shouldn't fail"
./yamldiff ${yaml_overwrite_case_output_dir}/overwritten.yaml ${yaml_overwrite_reverse} || fail "\"helmfile template\" should be consistent"
./dyff between -bs ${yaml_overwrite_case_output_dir}/overwritten.yaml ${yaml_overwrite_reverse} || fail "\"helmfile template\" should be consistent"
echo code=$?
done
test_pass "yaml overwrite feature"