More test fixes

Signed-off-by: Antonio Muñiz <amunizmartin@gmail.com>
pull/10463/head
Antonio Muñiz 4 years ago
parent 71bb781f2e
commit 8fe8959cb6
No known key found for this signature in database
GPG Key ID: 0CDAE283EF4E7A5F

@ -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)

@ -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)

Loading…
Cancel
Save