Adding apiVersion guidance to the linting

Signed-off-by: Matt Farina <matt@mattfarina.com>
pull/5730/head
Matt Farina 5 years ago
parent 069eec9e42
commit 50e06b1447
No known key found for this signature in database
GPG Key ID: 9436E80BFBA46909

@ -63,7 +63,7 @@ func TestBadChart(t *testing.T) {
e3 = true e3 = true
} }
if strings.Contains(msg.Err.Error(), "apiVersion is required") { if strings.Contains(msg.Err.Error(), "apiVersion is required. The value must be either \"v1\" or \"v2\"") {
e4 = true e4 = true
} }
} }

@ -89,7 +89,7 @@ func validateChartNameDirMatch(chartDir string, cf *chart.Metadata) error {
func validateChartAPIVersion(cf *chart.Metadata) error { func validateChartAPIVersion(cf *chart.Metadata) error {
if cf.APIVersion == "" { if cf.APIVersion == "" {
return errors.New("apiVersion is required") return errors.New("apiVersion is required. The value must be either \"v1\" or \"v2\"")
} }
if cf.APIVersion != "v1" && cf.APIVersion != "v2" { if cf.APIVersion != "v1" && cf.APIVersion != "v2" {

@ -221,7 +221,7 @@ func TestChartfile(t *testing.T) {
t.Errorf("Unexpected message 1: %s", msgs[1].Err) t.Errorf("Unexpected message 1: %s", msgs[1].Err)
} }
if !strings.Contains(msgs[2].Err.Error(), "apiVersion is required") { if !strings.Contains(msgs[2].Err.Error(), "apiVersion is required. The value must be either \"v1\" or \"v2\"") {
t.Errorf("Unexpected message 2: %s", msgs[2].Err) t.Errorf("Unexpected message 2: %s", msgs[2].Err)
} }

Loading…
Cancel
Save