From 8fe8959cb69c86ebb5df5e923859ba2ecb909f99 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonio=20Mu=C3=B1iz?= Date: Wed, 15 Dec 2021 18:12:13 +0100 Subject: [PATCH] More test fixes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Antonio Muñiz --- pkg/lint/lint_test.go | 2 +- pkg/lint/rules/template_test.go | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/pkg/lint/lint_test.go b/pkg/lint/lint_test.go index 59e1688ef..9b5980e91 100644 --- a/pkg/lint/lint_test.go +++ b/pkg/lint/lint_test.go @@ -38,7 +38,7 @@ const goodChartDir = "rules/testdata/goodone" const subChartValuesDir = "rules/testdata/withsubchart" func TestBadChart(t *testing.T) { - m := All(badChartDir, values, namespace, strict).Messages + m := All(badChartDir, values, namespace, strict, nil).Messages if len(m) != 8 { t.Errorf("Number of errors %v", len(m)) t.Errorf("All didn't fail with expected errors, got %#v", m) diff --git a/pkg/lint/rules/template_test.go b/pkg/lint/rules/template_test.go index f3aa641f2..0ef31c6b0 100644 --- a/pkg/lint/rules/template_test.go +++ b/pkg/lint/rules/template_test.go @@ -55,7 +55,7 @@ const strict = false func TestTemplateParsing(t *testing.T) { linter := support.Linter{ChartDir: templateTestBasedir} - Templates(&linter, values, namespace, strict) + Templates(&linter, values, namespace, strict, nil) res := linter.Messages if len(res) != 1 { @@ -78,7 +78,7 @@ func TestTemplateIntegrationHappyPath(t *testing.T) { defer os.Rename(ignoredTemplatePath, wrongTemplatePath) linter := support.Linter{ChartDir: templateTestBasedir} - Templates(&linter, values, namespace, strict) + Templates(&linter, values, namespace, strict, nil) res := linter.Messages if len(res) != 0 { @@ -88,7 +88,7 @@ func TestTemplateIntegrationHappyPath(t *testing.T) { func TestV3Fail(t *testing.T) { linter := support.Linter{ChartDir: "./testdata/v3-fail"} - Templates(&linter, values, namespace, strict) + Templates(&linter, values, namespace, strict, nil) res := linter.Messages if len(res) != 3 { @@ -108,7 +108,7 @@ func TestV3Fail(t *testing.T) { func TestMultiTemplateFail(t *testing.T) { linter := support.Linter{ChartDir: "./testdata/multi-template-fail"} - Templates(&linter, values, namespace, strict) + Templates(&linter, values, namespace, strict, nil) res := linter.Messages if len(res) != 1 { @@ -229,7 +229,7 @@ func TestDeprecatedAPIFails(t *testing.T) { } linter := support.Linter{ChartDir: filepath.Join(tmpdir, mychart.Name())} - Templates(&linter, values, namespace, strict) + Templates(&linter, values, namespace, strict, nil) if l := len(linter.Messages); l != 1 { for i, msg := range linter.Messages { t.Logf("Message %d: %s", i, msg) @@ -286,7 +286,7 @@ func TestStrictTemplateParsingMapError(t *testing.T) { linter := &support.Linter{ ChartDir: filepath.Join(dir, ch.Metadata.Name), } - Templates(linter, ch.Values, namespace, strict) + Templates(linter, ch.Values, namespace, strict, nil) if len(linter.Messages) != 0 { t.Errorf("expected zero messages, got %d", len(linter.Messages)) for i, msg := range linter.Messages { @@ -416,7 +416,7 @@ func TestEmptyWithCommentsManifests(t *testing.T) { } linter := support.Linter{ChartDir: filepath.Join(tmpdir, mychart.Name())} - Templates(&linter, values, namespace, strict) + Templates(&linter, values, namespace, strict, nil) if l := len(linter.Messages); l > 0 { for i, msg := range linter.Messages { t.Logf("Message %d: %s", i, msg)