From a6872c124ac1c89b740f81200fb4bf9e2c71b34c Mon Sep 17 00:00:00 2001 From: Maxim Ivanov Date: Thu, 28 Sep 2017 13:54:40 +0100 Subject: [PATCH] Avoid panics if test is failing --- pkg/lint/lint_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/lint/lint_test.go b/pkg/lint/lint_test.go index 1162ee972..02040f079 100644 --- a/pkg/lint/lint_test.go +++ b/pkg/lint/lint_test.go @@ -68,7 +68,7 @@ func TestBadChart(t *testing.T) { func TestInvalidYaml(t *testing.T) { m := All(badYamlFileDir).Messages if len(m) != 1 { - t.Errorf("All didn't fail with expected errors, got %#v", m) + t.Fatalf("All didn't fail with expected errors, got %#v", m) } if !strings.Contains(m[0].Err.Error(), "deliberateSyntaxError") { t.Errorf("All didn't have the error for deliberateSyntaxError") @@ -78,7 +78,7 @@ func TestInvalidYaml(t *testing.T) { func TestBadValues(t *testing.T) { m := All(badValuesFileDir).Messages if len(m) != 1 { - t.Errorf("All didn't fail with expected errors, got %#v", m) + t.Fatalf("All didn't fail with expected errors, got %#v", m) } if !strings.Contains(m[0].Err.Error(), "cannot unmarshal") { t.Errorf("All didn't have the error for invalid key format: %s", m[0].Err)