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/chartfile_test.go

23 lines
487 B

package lint
import (
"testing"
)
const badchartfile = "testdata/badchartfile"
func TestChartfile(t *testing.T) {
msgs := Chartfile(badchartfile)
if len(msgs) != 2 {
t.Errorf("Expected 2 errors, got %d", len(msgs))
}
if msgs[0].Text != "Chart.yaml: 'name' is required" {
t.Errorf("Unexpected message 0: %s", msgs[0].Text)
}
if msgs[1].Text != "Chart.yaml: 'version' is required, and must be greater than 0.0.0" {
t.Errorf("Unexpected message 1: %s", msgs[1].Text)
}
}