diff --git a/test/integration/test-cases/chart-needs.sh b/test/integration/test-cases/chart-needs.sh index 2ce8e63d..28c921d1 100644 --- a/test/integration/test-cases/chart-needs.sh +++ b/test/integration/test-cases/chart-needs.sh @@ -34,7 +34,8 @@ done for i in $(seq 10); do info "Comparing diff/chart-needs #$i" - ${helmfile} -f ${chart_need_case_input_dir}/${config_file} diff --include-needs | grep -Ev "Comparing release=azuredisk-csi-storageclass, chart=/tmp/.*/azuredisk-csi-storageclass" > ${chart_needs_diff_reverse} || fail "\"helmfile diff\" shouldn't fail" + ${helmfile} -f ${chart_need_case_input_dir}/${config_file} diff --include-needs | grep -Ev "Comparing release=azuredisk-csi-storageclass, chart=/tmp/.*/azuredisk-csi-storageclass" > ${chart_needs_diff_reverse}.tmp || fail "\"helmfile diff\" shouldn't fail" + cat ${chart_needs_diff_reverse}.tmp | sed -E '/\*{20}/,/\*{20}/d' > ${chart_needs_diff_reverse} diff -u ${diff_out_file} ${chart_needs_diff_reverse} || fail "\"helmfile diff\" should be consistent" echo code=$? done diff --git a/test/integration/test-cases/chart-needs/output/diff b/test/integration/test-cases/chart-needs/output/diff index eee980cf..18000beb 100644 --- a/test/integration/test-cases/chart-needs/output/diff +++ b/test/integration/test-cases/chart-needs/output/diff @@ -1,8 +1,3 @@ -******************** - - Release was not present in Helm. Diff will show entire contents as new. - -******************** helmfile-tests, managed-csi, StorageClass (storage.k8s.io) has been added: - + # Source: azuredisk-csi-storageclass/templates/azuredisk-csi-storageclass.yaml @@ -20,11 +15,6 @@ helmfile-tests, managed-csi, StorageClass (storage.k8s.io) has been added: + allowVolumeExpansion: true Comparing release=azuredisk-csi-driver, chart=azuredisk-csi-driver/azuredisk-csi-driver, namespace=helmfile-tests -******************** - - Release was not present in Helm. Diff will show entire contents as new. - -******************** helmfile-tests, azuredisk-csi-attacher-binding, ClusterRoleBinding (rbac.authorization.k8s.io) has been added: - + # Source: azuredisk-csi-driver/templates/rbac-csi-azuredisk-controller.yaml diff --git a/test/integration/test-cases/chart-needs/output/diff-live b/test/integration/test-cases/chart-needs/output/diff-live index 17a91c52..e954a28a 100644 --- a/test/integration/test-cases/chart-needs/output/diff-live +++ b/test/integration/test-cases/chart-needs/output/diff-live @@ -1,14 +1,4 @@ "azuredisk-csi-driver" has been added to your repositories -******************** - - Release was not present in Helm. Diff will show entire contents as new. - -******************** -******************** - - Release was not present in Helm. Diff will show entire contents as new. - -******************** helmfile-tests, managed-csi, StorageClass (storage.k8s.io) has been added: - + # Source: azuredisk-csi-storageclass/templates/azuredisk-csi-storageclass.yaml 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 3f5935da..0e43fe2a 100644 --- a/test/integration/test-cases/chartify-with-non-chart-dir.sh +++ b/test/integration/test-cases/chartify-with-non-chart-dir.sh @@ -13,16 +13,12 @@ if [[ $EXTRA_HELMFILE_FLAGS == *--enable-live-output* ]]; then diff_out_file=${chartify_with_non_chart_dirt_output_dir}/diff-result-live fi - -if [[ $(semver compare $HELM_DIFF_VERSION "3.11.0") == "1" ]]; then - diff_out_file=${diff_out_file}-after-helm-diff-3.11.0 -fi - 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 | 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 | grep -v "^Comparing release" > ${chartify_with_non_chart_dirt_reverse}.tmp || fail "\"helmfile diff\" shouldn't fail" + cat ${chartify_with_non_chart_dirt_reverse}.tmp | sed -E '/\*{20}/,/\*{20}/d' > ${chartify_with_non_chart_dirt_reverse} 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 b/test/integration/test-cases/chartify-with-non-chart-dir/output/diff-result index 1830d9fa..f3244520 100644 --- a/test/integration/test-cases/chartify-with-non-chart-dir/output/diff-result +++ b/test/integration/test-cases/chartify-with-non-chart-dir/output/diff-result @@ -1,8 +1,3 @@ -******************** - - Release was not present in Helm. Diff will show entire contents as new. - -******************** helmfile-tests, configmap, ConfigMap (v1) has been added: - + # Source: manifests/templates/configmap.yaml 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 deleted file mode 100644 index f3244520..00000000 --- a/test/integration/test-cases/chartify-with-non-chart-dir/output/diff-result-after-helm-diff-3.11.0 +++ /dev/null @@ -1,13 +0,0 @@ -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 b/test/integration/test-cases/chartify-with-non-chart-dir/output/diff-result-live index 36739a12..70f24f55 100644 --- a/test/integration/test-cases/chartify-with-non-chart-dir/output/diff-result-live +++ b/test/integration/test-cases/chartify-with-non-chart-dir/output/diff-result-live @@ -1,8 +1,3 @@ -******************** - - Release was not present in Helm. Diff will show entire contents as new. - -******************** helmfile-tests, configmap, ConfigMap (v1) has been added: - + # Source: manifests/templates/configmap.yaml 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 deleted file mode 100644 index 70f24f55..00000000 --- a/test/integration/test-cases/chartify-with-non-chart-dir/output/diff-result-live-after-helm-diff-3.11.0 +++ /dev/null @@ -1,12 +0,0 @@ -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/diff-args.sh b/test/integration/test-cases/diff-args.sh index a0189898..88b1d75e 100644 --- a/test/integration/test-cases/diff-args.sh +++ b/test/integration/test-cases/diff-args.sh @@ -22,7 +22,8 @@ info "Comparing ${case_title} diff for output ${diff_args_reverse} with ${diff_o info "Comparing ${case_title} diff for output ${diff_args_reverse_stderr} with ${diff_out_stderr_file}" for i in $(seq 10); do info "Comparing diff-args diff log #$i" - ${helmfile} -f ${diff_args_input_dir}/helmfile.yaml diff 1> ${diff_args_reverse} 2> ${diff_args_reverse_stderr} || fail "\"helmfile diff\" shouldn't fail" + ${helmfile} -f ${diff_args_input_dir}/helmfile.yaml diff 1> ${diff_args_reverse}.tmp 2> ${diff_args_reverse_stderr} || fail "\"helmfile diff\" shouldn't fail" + cat ${diff_args_reverse}.tmp | sed -E '/\*{20}/,/\*{20}/d' > ${diff_args_reverse} diff -u ${diff_out_file} ${diff_args_reverse} || fail "\"helmfile diff\" should be consistent" diff -u ${diff_out_stderr_file} ${diff_args_reverse_stderr} || fail "\"helmfile diff\" should be consistent (stderr)" echo code=$? diff --git a/test/integration/test-cases/diff-args/output/diff b/test/integration/test-cases/diff-args/output/diff index ad082025..e326cb93 100644 --- a/test/integration/test-cases/diff-args/output/diff +++ b/test/integration/test-cases/diff-args/output/diff @@ -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 diff --git a/test/integration/test-cases/diff-args/output/diff-live b/test/integration/test-cases/diff-args/output/diff-live index 9e029b1a..eaf2d4ea 100644 --- a/test/integration/test-cases/diff-args/output/diff-live +++ b/test/integration/test-cases/diff-args/output/diff-live @@ -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 diff --git a/test/integration/test-cases/postrender.sh b/test/integration/test-cases/postrender.sh index dfeab508..9ac4da32 100644 --- a/test/integration/test-cases/postrender.sh +++ b/test/integration/test-cases/postrender.sh @@ -20,7 +20,8 @@ test_start "postrender diff" info "Comparing postrender diff output ${postrender_diff_reverse} with ${postrender_case_output_dir}/result.yaml" for i in $(seq 10); do info "Comparing build/postrender-diff #$i" - ${helmfile} -f ${postrender_case_input_dir}/${config_file} diff --concurrency 1 --post-renderer ./add-cm.bash --post-renderer-args cm1 &> ${postrender_diff_reverse} || fail "\"helmfile diff\" shouldn't fail" + ${helmfile} -f ${postrender_case_input_dir}/${config_file} diff --concurrency 1 --post-renderer ./add-cm.bash --post-renderer-args cm1 &> ${postrender_diff_reverse}.tmp || fail "\"helmfile diff\" shouldn't fail" + cat ${postrender_diff_reverse}.tmp | sed -E '/\*{20}/,/\*{20}/d' > ${postrender_diff_reverse} diff -u ${postrender_diff_out_file} ${postrender_diff_reverse} || fail "\"helmfile diff\" should be consistent" echo code=$? done diff --git a/test/integration/test-cases/postrender/output/diff-result b/test/integration/test-cases/postrender/output/diff-result index 590434ba..1d63c3dd 100644 --- a/test/integration/test-cases/postrender/output/diff-result +++ b/test/integration/test-cases/postrender/output/diff-result @@ -1,11 +1,6 @@ Building dependency release=foo, chart=../../../charts/raw Building dependency release=baz, chart=../../../charts/raw Comparing release=foo, chart=../../../charts/raw, namespace=helmfile-tests -******************** - - Release was not present in Helm. Diff will show entire contents as new. - -******************** helmfile-tests, cm2, ConfigMap (v1) has been added: - + apiVersion: v1 @@ -26,11 +21,6 @@ helmfile-tests, foo-1, ConfigMap (v1) has been added: + foo: FOO Comparing release=baz, chart=../../../charts/raw, namespace=helmfile-tests -******************** - - Release was not present in Helm. Diff will show entire contents as new. - -******************** helmfile-tests, baz-3, ConfigMap (v1) has been added: - + # Source: raw/templates/resources.yaml diff --git a/test/integration/test-cases/skip-diff-output.sh b/test/integration/test-cases/skip-diff-output.sh index 79d335b0..ba125aad 100644 --- a/test/integration/test-cases/skip-diff-output.sh +++ b/test/integration/test-cases/skip-diff-output.sh @@ -17,7 +17,8 @@ test_start "$case_title" info "Comparing ${case_title} diff for output ${skip_diff_output_reverse} with ${diff_out_file}" for i in $(seq 10); do info "Comparing skip-diff-output diff log #$i" - ${helmfile} -f ${skip_diff_output_input_dir}/helmfile.yaml.gotmpl diff > ${skip_diff_output_reverse} || fail "\"helmfile diff\" shouldn't fail" + ${helmfile} -f ${skip_diff_output_input_dir}/helmfile.yaml.gotmpl diff > ${skip_diff_output_reverse}.tmp || fail "\"helmfile diff\" shouldn't fail" + cat ${skip_diff_output_reverse}.tmp | sed -E '/\*{20}/,/\*{20}/d' > ${skip_diff_output_reverse} diff -u ${diff_out_file} ${skip_diff_output_reverse} || fail "\"helmfile diff\" should be consistent" echo code=$? done diff --git a/test/integration/test-cases/skip-diff-output/output/diff-result b/test/integration/test-cases/skip-diff-output/output/diff-result index e245ea80..40cebff0 100644 --- a/test/integration/test-cases/skip-diff-output/output/diff-result +++ b/test/integration/test-cases/skip-diff-output/output/diff-result @@ -1,9 +1,4 @@ Comparing release=baz, chart=../../../charts/raw, namespace=helmfile-tests -******************** - - Release was not present in Helm. Diff will show entire contents as new. - -******************** helmfile-tests, baz-2, ConfigMap (v1) has been added: - + # Source: raw/templates/resources.yaml diff --git a/test/integration/test-cases/skip-diff-output/output/diff-result-live b/test/integration/test-cases/skip-diff-output/output/diff-result-live index 1497e030..3d6fec57 100644 --- a/test/integration/test-cases/skip-diff-output/output/diff-result-live +++ b/test/integration/test-cases/skip-diff-output/output/diff-result-live @@ -1,8 +1,3 @@ -******************** - - Release was not present in Helm. Diff will show entire contents as new. - -******************** helmfile-tests, baz-2, ConfigMap (v1) has been added: - + # Source: raw/templates/resources.yaml