You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
helm/pkg/lint/rules/template_test.go

24 lines
463 B

package rules
import (
"k8s.io/helm/pkg/lint/support"
"strings"
"testing"
)
const templateTestBasedir = "./testdata/albatross"
func TestTemplate(t *testing.T) {
linter := support.Linter{ChartDir: templateTestBasedir}
Templates(&linter)
res := linter.Messages
if len(res) != 1 {
t.Fatalf("Expected one error, got %d, %v", len(res), res)
}
if !strings.Contains(res[0].Text, "deliberateSyntaxError") {
t.Errorf("Unexpected error: %s", res[0])
}
}