fix tests

Signed-off-by: yxxhero <aiopsclub@163.com>
This commit is contained in:
yxxhero 2025-05-30 07:10:17 +08:00
parent ba47827cd9
commit 3aa6721e23
3 changed files with 26 additions and 7 deletions

View File

@ -17,13 +17,7 @@ test_start "$case_title"
info "Comparing ${case_title} diff for output ${chartify_with_non_chart_dirt_reverse} with ${diff_out_file}" info "Comparing ${case_title} diff for output ${chartify_with_non_chart_dirt_reverse} with ${diff_out_file}"
for i in $(seq 10); do for i in $(seq 10); do
info "Comparing chartify-with-non-chart-dir diff log #$i" info "Comparing chartify-with-non-chart-dir diff log #$i"
${helmfile} -f ${chartify_with_non_chart_dirt_input_dir}/helmfiles/helmfile.yaml diff ${helmfile} -f ${chartify_with_non_chart_dirt_input_dir}/helmfiles/helmfile.yaml diff | grep -v "^Comparing release" > ${chartify_with_non_chart_dirt_reverse} || fail "\"helmfile diff\" shouldn't fail"
${helmfile} -f ${chartify_with_non_chart_dirt_input_dir}/helmfiles/helmfile.yaml diff &> ${chartify_with_non_chart_dirt_reverse}.tmp || fail "\"helmfile diff\" shouldn't fail"
cat ${chartify_with_non_chart_dirt_reverse}.tmp | grep -vE "^(Comparing release|Building dependency release)" > ${chartify_with_non_chart_dirt_reverse}
cat ${diff_out_file}
cat ${chartify_with_non_chart_dirt_reverse}
diff -u ${diff_out_file} ${chartify_with_non_chart_dirt_reverse} || fail "\"helmfile diff\" should be consistent" diff -u ${diff_out_file} ${chartify_with_non_chart_dirt_reverse} || fail "\"helmfile diff\" should be consistent"
echo code=$? echo code=$?
done done

View File

@ -0,0 +1,13 @@
helmfile-tests, configmap, ConfigMap (v1) has been added:
-
+ # Source: manifests/templates/configmap.yaml
+ # Source: manifests/templates/configmap.yaml
+ apiVersion: v1
+ kind: ConfigMap
+ metadata:
+ name: configmap
+ namespace: helmfile-tests
+ data:
+ foo: "bar"
+ bar: "baz"

View File

@ -0,0 +1,12 @@
helmfile-tests, configmap, ConfigMap (v1) has been added:
-
+ # Source: manifests/templates/configmap.yaml
+ # Source: manifests/templates/configmap.yaml
+ apiVersion: v1
+ kind: ConfigMap
+ metadata:
+ name: configmap
+ namespace: helmfile-tests
+ data:
+ foo: "bar"
+ bar: "baz"