mirror of https://github.com/helm/helm
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.
24 lines
463 B
24 lines
463 B
9 years ago
|
package rules
|
||
9 years ago
|
|
||
|
import (
|
||
9 years ago
|
"k8s.io/helm/pkg/lint/support"
|
||
9 years ago
|
"strings"
|
||
|
"testing"
|
||
|
)
|
||
|
|
||
|
const templateTestBasedir = "./testdata/albatross"
|
||
|
|
||
|
func TestTemplate(t *testing.T) {
|
||
9 years ago
|
linter := support.Linter{ChartDir: templateTestBasedir}
|
||
|
Templates(&linter)
|
||
|
res := linter.Messages
|
||
9 years ago
|
|
||
|
if len(res) != 1 {
|
||
9 years ago
|
t.Fatalf("Expected one error, got %d, %v", len(res), res)
|
||
9 years ago
|
}
|
||
|
|
||
|
if !strings.Contains(res[0].Text, "deliberateSyntaxError") {
|
||
|
t.Errorf("Unexpected error: %s", res[0])
|
||
|
}
|
||
|
}
|