From d6e6035a6269204edbe8c52c07ac2dafa0714cf3 Mon Sep 17 00:00:00 2001 From: yxxhero Date: Mon, 3 Feb 2025 18:12:34 +0800 Subject: [PATCH] fix tests Signed-off-by: yxxhero --- pkg/app/app_apply_nokubectx_test.go | 4 ++-- pkg/app/app_apply_test.go | 12 ++++++------ pkg/app/app_sync_test.go | 14 +++++++------- pkg/app/app_test.go | 6 +++--- pkg/app/diff_nokubectx_test.go | 6 +++--- pkg/app/diff_test.go | 6 +++--- 6 files changed, 24 insertions(+), 24 deletions(-) diff --git a/pkg/app/app_apply_nokubectx_test.go b/pkg/app/app_apply_nokubectx_test.go index 437a467c..fa50819a 100644 --- a/pkg/app/app_apply_nokubectx_test.go +++ b/pkg/app/app_apply_nokubectx_test.go @@ -415,7 +415,7 @@ my-release 4 Fri Nov 1 08:40:07 2019 DEPLOYED raw-3.1.0 3.1.0 def }, error: ``, files: map[string]string{ - "/path/to/helmfile.yaml": ` + "/path/to/helmfile.yaml.gotmpl": ` {{ $mark := "a" }} releases: @@ -464,7 +464,7 @@ my-release 4 Fri Nov 1 08:40:07 2019 DEPLOYED raw-3.1.0 3.1.0 def t.Run("bad --selector", func(t *testing.T) { check(t, testcase{ files: map[string]string{ - "/path/to/helmfile.yaml": ` + "/path/to/helmfile.yaml.gotmpl": ` {{ $mark := "a" }} releases: diff --git a/pkg/app/app_apply_test.go b/pkg/app/app_apply_test.go index 392b8c78..fa510fc1 100644 --- a/pkg/app/app_apply_test.go +++ b/pkg/app/app_apply_test.go @@ -146,7 +146,7 @@ func TestApply_2(t *testing.T) { skipNeeds: true, }, files: map[string]string{ - "/path/to/helmfile.yaml": ` + "/path/to/helmfile.yaml.gotmpl": ` {{ $mark := "a" }} releases: @@ -199,7 +199,7 @@ my-release 4 Fri Nov 1 08:40:07 2019 DEPLOYED raw-3.1.0 3.1.0 def skipNeeds: true, }, files: map[string]string{ - "/path/to/helmfile.yaml": ` + "/path/to/helmfile.yaml.gotmpl": ` {{ $mark := "a" }} releases: @@ -250,7 +250,7 @@ releases: }, error: ``, files: map[string]string{ - "/path/to/helmfile.yaml": ` + "/path/to/helmfile.yaml.gotmpl": ` {{ $mark := "a" }} releases: @@ -306,7 +306,7 @@ my-release 4 Fri Nov 1 08:40:07 2019 DEPLOYED raw-3.1.0 3.1.0 def }, error: ``, files: map[string]string{ - "/path/to/helmfile.yaml": ` + "/path/to/helmfile.yaml.gotmpl": ` {{ $mark := "a" }} releases: @@ -359,7 +359,7 @@ my-release 4 Fri Nov 1 08:40:07 2019 DEPLOYED raw-3.1.0 3.1.0 def }, error: ``, files: map[string]string{ - "/path/to/helmfile.yaml": ` + "/path/to/helmfile.yaml.gotmpl": ` {{ $mark := "a" }} releases: @@ -415,7 +415,7 @@ my-release 4 Fri Nov 1 08:40:07 2019 DEPLOYED raw-3.1.0 3.1.0 def }, error: ``, files: map[string]string{ - "/path/to/helmfile.yaml": ` + "/path/to/helmfile.yaml.gotmpl": ` {{ $mark := "a" }} releases: diff --git a/pkg/app/app_sync_test.go b/pkg/app/app_sync_test.go index b138f2fb..5115db1c 100644 --- a/pkg/app/app_sync_test.go +++ b/pkg/app/app_sync_test.go @@ -142,7 +142,7 @@ func TestSync(t *testing.T) { skipNeeds: true, }, files: map[string]string{ - "/path/to/helmfile.yaml": ` + "/path/to/helmfile.yaml.gotmpl": ` {{ $mark := "a" }} releases: @@ -191,7 +191,7 @@ my-release 4 Fri Nov 1 08:40:07 2019 DEPLOYED raw-3.1.0 3.1.0 def skipNeeds: true, }, files: map[string]string{ - "/path/to/helmfile.yaml": ` + "/path/to/helmfile.yaml.gotmpl": ` {{ $mark := "a" }} releases: @@ -249,7 +249,7 @@ my-release 4 Fri Nov 1 08:40:07 2019 DEPLOYED raw-3.1.0 3.1.0 def }, error: ``, files: map[string]string{ - "/path/to/helmfile.yaml": ` + "/path/to/helmfile.yaml.gotmpl": ` {{ $mark := "a" }} releases: @@ -300,7 +300,7 @@ my-release 4 Fri Nov 1 08:40:07 2019 DEPLOYED raw-3.1.0 3.1.0 def }, error: ``, files: map[string]string{ - "/path/to/helmfile.yaml": ` + "/path/to/helmfile.yaml.gotmpl": ` {{ $mark := "a" }} releases: @@ -348,7 +348,7 @@ serviceA 4 Fri Nov 1 08:40:07 2019 DEPLOYED chart-3.1.0 3.1.0 def }, error: ``, files: map[string]string{ - "/path/to/helmfile.yaml": ` + "/path/to/helmfile.yaml.gotmpl": ` {{ $mark := "a" }} releases: @@ -401,7 +401,7 @@ my-release 4 Fri Nov 1 08:40:07 2019 DEPLOYED raw-3.1.0 3.1.0 def }, error: ``, files: map[string]string{ - "/path/to/helmfile.yaml": ` + "/path/to/helmfile.yaml.gotmpl": ` {{ $mark := "a" }} releases: @@ -447,7 +447,7 @@ my-release 4 Fri Nov 1 08:40:07 2019 DEPLOYED raw-3.1.0 3.1.0 def t.Run("bad --selector", func(t *testing.T) { check(t, testcase{ files: map[string]string{ - "/path/to/helmfile.yaml": ` + "/path/to/helmfile.yaml.gotmpl": ` {{ $mark := "a" }} releases: diff --git a/pkg/app/app_test.go b/pkg/app/app_test.go index d3dc6cf9..b5a7a955 100644 --- a/pkg/app/app_test.go +++ b/pkg/app/app_test.go @@ -3421,7 +3421,7 @@ bar 4 Fri Nov 1 08:40:07 2019 DEPLOYED mychart2-3.1.0 3.1.0 defau skipNeeds: true, }, files: map[string]string{ - "/path/to/helmfile.yaml": ` + "/path/to/helmfile.yaml.gotmpl": ` {{ $mark := "a" }} releases: @@ -3476,7 +3476,7 @@ my-release 4 Fri Nov 1 08:40:07 2019 DEPLOYED raw-3.1.0 3.1.0 def }, error: `in ./helmfile.yaml: release "default/default/external-secrets" depends on "default/kube-system/kubernetes-external-secrets" which does not match the selectors. Please add a selector like "--selector name=kubernetes-external-secrets", or indicate whether to skip (--skip-needs) or include (--include-needs) these dependencies`, files: map[string]string{ - "/path/to/helmfile.yaml": ` + "/path/to/helmfile.yaml.gotmpl": ` {{ $mark := "a" }} releases: @@ -3515,7 +3515,7 @@ releases: name: "upgrades with bad selector", loc: location(), files: map[string]string{ - "/path/to/helmfile.yaml": ` + "/path/to/helmfile.yaml.gotmpl": ` {{ $mark := "a" }} releases: diff --git a/pkg/app/diff_nokubectx_test.go b/pkg/app/diff_nokubectx_test.go index cd0239ad..648498f6 100644 --- a/pkg/app/diff_nokubectx_test.go +++ b/pkg/app/diff_nokubectx_test.go @@ -636,7 +636,7 @@ bar 4 Fri Nov 1 08:40:07 2019 DEPLOYED mychart2-3.1.0 3.1.0 defau loc: location(), flags: flags{skipNeeds: true}, files: map[string]string{ - "/path/to/helmfile.yaml": ` + "/path/to/helmfile.yaml.gotmpl": ` {{ $mark := "a" }} releases: @@ -677,7 +677,7 @@ releases: loc: location(), flags: flags{skipNeeds: false}, files: map[string]string{ - "/path/to/helmfile.yaml": ` + "/path/to/helmfile.yaml.gotmpl": ` {{ $mark := "a" }} releases: @@ -785,7 +785,7 @@ changing working directory back to "/path/to" name: "upgrades with bad selector", loc: location(), files: map[string]string{ - "/path/to/helmfile.yaml": ` + "/path/to/helmfile.yaml.gotmpl": ` {{ $mark := "a" }} releases: diff --git a/pkg/app/diff_test.go b/pkg/app/diff_test.go index f1987143..8ed72f04 100644 --- a/pkg/app/diff_test.go +++ b/pkg/app/diff_test.go @@ -931,7 +931,7 @@ bar 4 Fri Nov 1 08:40:07 2019 DEPLOYED mychart2-3.1.0 3.1.0 defau loc: location(), flags: flags{skipNeeds: true}, files: map[string]string{ - "/path/to/helmfile.yaml": ` + "/path/to/helmfile.yaml.gotmpl": ` {{ $mark := "a" }} releases: @@ -972,7 +972,7 @@ releases: loc: location(), flags: flags{skipNeeds: false}, files: map[string]string{ - "/path/to/helmfile.yaml": ` + "/path/to/helmfile.yaml.gotmpl": ` {{ $mark := "a" }} releases: @@ -1080,7 +1080,7 @@ changing working directory back to "/path/to" name: "upgrades with bad selector", loc: location(), files: map[string]string{ - "/path/to/helmfile.yaml": ` + "/path/to/helmfile.yaml.gotmpl": ` {{ $mark := "a" }} releases: