|
|
@ -21,7 +21,6 @@ import (
|
|
|
|
"testing"
|
|
|
|
"testing"
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
var linter = Linter{}
|
|
|
|
|
|
|
|
var errLint = errors.New("lint failed")
|
|
|
|
var errLint = errors.New("lint failed")
|
|
|
|
|
|
|
|
|
|
|
|
func TestRunLinterRule(t *testing.T) {
|
|
|
|
func TestRunLinterRule(t *testing.T) {
|
|
|
@ -45,6 +44,7 @@ func TestRunLinterRule(t *testing.T) {
|
|
|
|
{-1, errLint, 4, false, ErrorSev},
|
|
|
|
{-1, errLint, 4, false, ErrorSev},
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
linter := Linter{}
|
|
|
|
for _, test := range tests {
|
|
|
|
for _, test := range tests {
|
|
|
|
isValid := linter.RunLinterRule(test.Severity, "chart", test.LintError)
|
|
|
|
isValid := linter.RunLinterRule(test.Severity, "chart", test.LintError)
|
|
|
|
if len(linter.Messages) != test.ExpectedMessages {
|
|
|
|
if len(linter.Messages) != test.ExpectedMessages {
|
|
|
|