fix tests

Signed-off-by: yxxhero <aiopsclub@163.com>
This commit is contained in:
yxxhero 2025-05-30 09:04:12 +08:00
parent d713a93079
commit d0c9f61181
3 changed files with 2 additions and 11 deletions

View File

@ -30,7 +30,8 @@ for i in $(seq 10); do
done
info "Comparing ${case_title} apply for output ${diff_args_reverse} with ${apply_out_file}"
info "Comparing ${case_title} apply for stdout ${diff_args_reverse_stderr} with ${apply_out_stderr_file}"
${helmfile} -f ${diff_args_input_dir}/helmfile.yaml apply 1> ${diff_args_reverse} 2> ${diff_args_reverse_stderr} || fail "\"helmfile apply\" shouldn't fail"
${helmfile} -f ${diff_args_input_dir}/helmfile.yaml apply 1> ${diff_args_reverse}.tmp 2> ${diff_args_reverse_stderr} || fail "\"helmfile apply\" shouldn't fail"
cat ${diff_args_reverse}.tmp | sed -E '/\*{20}/,/\*{20}/d' > ${diff_args_reverse}
diff -u ${apply_out_file} <(grep -vE "^(LAST DEPLOYED|installed)" ${diff_args_reverse}) || fail "\"helmfile apply\" should be consistent"
diff -u ${apply_out_stderr_file} <(grep -vE "^(LAST DEPLOYED|installed)" ${diff_args_reverse_stderr}) || fail "\"helmfile apply\" should be consistent (stderr)"
echo "clean up diff args resources"

View File

@ -1,9 +1,4 @@
Comparing release=installed, chart=../../../charts/httpbin, namespace=helmfile-tests
********************
Release was not present in Helm. Diff will show entire contents as new.
********************
helmfile-tests, installed-httpbin, Deployment (apps) has been added:
-
+ apiVersion: apps/v1

View File

@ -1,8 +1,3 @@
********************
Release was not present in Helm. Diff will show entire contents as new.
********************
helmfile-tests, installed-httpbin, Deployment (apps) has been added:
-
+ apiVersion: apps/v1