From 15130357186df030ddea3e9e4153b4ed35ac3890 Mon Sep 17 00:00:00 2001 From: yxxhero Date: Fri, 4 Nov 2022 20:33:57 +0800 Subject: [PATCH] test: add template anchors merge e2e test Signed-off-by: yxxhero --- .../config.yaml | 4 ++++ .../input.yaml | 21 +++++++++++++++++++ .../output.yaml | 3 +++ 3 files changed, 28 insertions(+) create mode 100644 test/e2e/template/helmfile/testdata/snapshot/issue_493_template_yaml_anchors_merge/config.yaml create mode 100644 test/e2e/template/helmfile/testdata/snapshot/issue_493_template_yaml_anchors_merge/input.yaml create mode 100644 test/e2e/template/helmfile/testdata/snapshot/issue_493_template_yaml_anchors_merge/output.yaml diff --git a/test/e2e/template/helmfile/testdata/snapshot/issue_493_template_yaml_anchors_merge/config.yaml b/test/e2e/template/helmfile/testdata/snapshot/issue_493_template_yaml_anchors_merge/config.yaml new file mode 100644 index 00000000..4156199d --- /dev/null +++ b/test/e2e/template/helmfile/testdata/snapshot/issue_493_template_yaml_anchors_merge/config.yaml @@ -0,0 +1,4 @@ +chartifyTempDir: template_anchors_merge_temp +helmfileArgs: +- list +- --skip-charts diff --git a/test/e2e/template/helmfile/testdata/snapshot/issue_493_template_yaml_anchors_merge/input.yaml b/test/e2e/template/helmfile/testdata/snapshot/issue_493_template_yaml_anchors_merge/input.yaml new file mode 100644 index 00000000..75329467 --- /dev/null +++ b/test/e2e/template/helmfile/testdata/snapshot/issue_493_template_yaml_anchors_merge/input.yaml @@ -0,0 +1,21 @@ +templates: + default_release: &default_release + namespace: "myNamespace" + default_labels: + labels: &default_labels + project: "myProject" + group: "myGroup" + +releases: + - name: "release1" + << : *default_release + labels: + <<: *default_labels + app: "myapp" + chart: "test" + - name: "release2" + << : *default_release + labels: + <<: *default_labels + app: "myapp" + chart: "test" \ No newline at end of file diff --git a/test/e2e/template/helmfile/testdata/snapshot/issue_493_template_yaml_anchors_merge/output.yaml b/test/e2e/template/helmfile/testdata/snapshot/issue_493_template_yaml_anchors_merge/output.yaml new file mode 100644 index 00000000..d799a9aa --- /dev/null +++ b/test/e2e/template/helmfile/testdata/snapshot/issue_493_template_yaml_anchors_merge/output.yaml @@ -0,0 +1,3 @@ +NAME NAMESPACE ENABLED INSTALLED LABELS CHART VERSION +release1 myNamespace true true app:myapp,group:myGroup,project:myProject test +release2 myNamespace true true app:myapp,group:myGroup,project:myProject test