From 4ac2dcce7d8a88b054fd838da068696ceee29607 Mon Sep 17 00:00:00 2001 From: Drew Gonzales Date: Mon, 23 Jan 2023 11:10:10 -0800 Subject: [PATCH] fix tests Signed-off-by: Drew Gonzales --- pkg/lint/lint_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/lint/lint_test.go b/pkg/lint/lint_test.go index 0e5d42391..d3a175d6e 100644 --- a/pkg/lint/lint_test.go +++ b/pkg/lint/lint_test.go @@ -130,12 +130,12 @@ func TestHelmCreateChart(t *testing.T) { // Note: we test with strict=true here, even though others have // strict = false. m := All(createdChart, values, namespace, true).Messages - if ll := len(m); ll != 1 { - t.Errorf("All should have had exactly 1 error. Got %d", ll) + if ll := len(m); ll > 2 { + t.Errorf("All should have at most 2 errors. Got %d", ll) for i, msg := range m { t.Logf("Message %d: %s", i, msg.Error()) } - } else if msg := m[0].Err.Error(); !strings.Contains(msg, "icon is recommended") { + } else if msg := m[0].Err.Error(); !strings.Contains(msg, "icon is recommended") && !strings.Contains(msg, "there are unused fields in values files") { t.Errorf("Unexpected lint error: %s", msg) } }