From 3aa6721e23d5a1805e240d24bc3c9dfb8b7d8f1a Mon Sep 17 00:00:00 2001 From: yxxhero Date: Fri, 30 May 2025 07:10:17 +0800 Subject: [PATCH] fix tests Signed-off-by: yxxhero --- .../test-cases/chartify-with-non-chart-dir.sh | 8 +------- .../output/diff-result-after-helm-diff-3.11.0 | 13 +++++++++++++ .../output/diff-result-live-after-helm-diff-3.11.0 | 12 ++++++++++++ 3 files changed, 26 insertions(+), 7 deletions(-) create mode 100644 test/integration/test-cases/chartify-with-non-chart-dir/output/diff-result-after-helm-diff-3.11.0 create mode 100644 test/integration/test-cases/chartify-with-non-chart-dir/output/diff-result-live-after-helm-diff-3.11.0 diff --git a/test/integration/test-cases/chartify-with-non-chart-dir.sh b/test/integration/test-cases/chartify-with-non-chart-dir.sh index 49ccc689..7bdefed6 100644 --- a/test/integration/test-cases/chartify-with-non-chart-dir.sh +++ b/test/integration/test-cases/chartify-with-non-chart-dir.sh @@ -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}" for i in $(seq 10); do 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 &> ${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} - + ${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" diff -u ${diff_out_file} ${chartify_with_non_chart_dirt_reverse} || fail "\"helmfile diff\" should be consistent" echo code=$? done diff --git a/test/integration/test-cases/chartify-with-non-chart-dir/output/diff-result-after-helm-diff-3.11.0 b/test/integration/test-cases/chartify-with-non-chart-dir/output/diff-result-after-helm-diff-3.11.0 new file mode 100644 index 00000000..f3244520 --- /dev/null +++ b/test/integration/test-cases/chartify-with-non-chart-dir/output/diff-result-after-helm-diff-3.11.0 @@ -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" + diff --git a/test/integration/test-cases/chartify-with-non-chart-dir/output/diff-result-live-after-helm-diff-3.11.0 b/test/integration/test-cases/chartify-with-non-chart-dir/output/diff-result-live-after-helm-diff-3.11.0 new file mode 100644 index 00000000..70f24f55 --- /dev/null +++ b/test/integration/test-cases/chartify-with-non-chart-dir/output/diff-result-live-after-helm-diff-3.11.0 @@ -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"