mirror of
https://github.com/helm/helm.git
synced 2026-05-04 17:26:40 -04:00
This adds a lint command that just checks to see if the chart is parseable and if the templates are paresable.
20 lines
359 B
Go
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])
|
|
}
|
|
}
|