From a8def027d915239ba691fb157a1be78bf29d7b6a Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Tue, 23 Feb 2021 13:13:33 -0500 Subject: [PATCH] chore(test): Use fs.RenameWithFallback Signed-off-by: Josh Soref --- pkg/lint/rules/template_test.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkg/lint/rules/template_test.go b/pkg/lint/rules/template_test.go index eb076a1bf..8fa5fccc0 100644 --- a/pkg/lint/rules/template_test.go +++ b/pkg/lint/rules/template_test.go @@ -25,6 +25,7 @@ import ( "github.com/Masterminds/goutils" "helm.sh/helm/v3/internal/test/ensure" + "helm.sh/helm/v3/internal/third_party/dep/fs" "helm.sh/helm/v3/pkg/chart" "helm.sh/helm/v3/pkg/chartutil" "helm.sh/helm/v3/pkg/lint/support" @@ -75,8 +76,8 @@ var ignoredTemplatePath = filepath.Join(templateTestBasedir, "fail.yaml.ignored" // namespaces, partial templates func TestTemplateIntegrationHappyPath(t *testing.T) { // Rename file so it gets ignored by the linter - os.Rename(wrongTemplatePath, ignoredTemplatePath) - defer os.Rename(ignoredTemplatePath, wrongTemplatePath) + fs.RenameWithFallback(wrongTemplatePath, ignoredTemplatePath) + defer fs.RenameWithFallback(ignoredTemplatePath, wrongTemplatePath) linter := support.Linter{ChartDir: templateTestBasedir} Templates(&linter, values, namespace, strict)