helm/pkg/lint/template_test.go
Matt Butcher cf9c8ebe3c feat(helm): add a very basic lint command
This adds a lint command that just checks to see if the chart is
parseable and if the templates are paresable.
2016-04-26 17:20:37 -06:00

20 lines
359 B
Go

package lint
import (
"strings"
"testing"
)
const templateTestBasedir = "./testdata/albatross"
func TestTemplate(t *testing.T) {
res := Templates(templateTestBasedir)
if len(res) != 1 {
t.Fatalf("Expected one error, got %d", len(res))
}
if !strings.Contains(res[0].Text, "deliberateSyntaxError") {
t.Errorf("Unexpected error: %s", res[0])
}
}