|
|
|
@ -104,7 +104,6 @@ func TestV3Fail(t *testing.T) {
|
|
|
|
|
t.Errorf("Unexpected error: %s", res[2].Err)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
<<<<<<< HEAD
|
|
|
|
|
|
|
|
|
|
func TestValidateMetadataName(t *testing.T) {
|
|
|
|
|
names := map[string]bool{
|
|
|
|
@ -134,8 +133,6 @@ func TestValidateMetadataName(t *testing.T) {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
||||||| merged common ancestors
|
|
|
|
|
=======
|
|
|
|
|
|
|
|
|
|
func TestDeprecatedAPIFails(t *testing.T) {
|
|
|
|
|
mychart := chart.Chart{
|
|
|
|
@ -148,11 +145,11 @@ func TestDeprecatedAPIFails(t *testing.T) {
|
|
|
|
|
Templates: []*chart.File{
|
|
|
|
|
{
|
|
|
|
|
Name: "templates/baddeployment.yaml",
|
|
|
|
|
Data: []byte("apiVersion: apps/v1beta1\nkind: Deployment"),
|
|
|
|
|
Data: []byte("apiVersion: apps/v1beta1\nkind: Deployment\nmetadata:\n name: baddep"),
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
Name: "templates/goodsecret.yaml",
|
|
|
|
|
Data: []byte("apiVersion: v1\nkind: Secret"),
|
|
|
|
|
Data: []byte("apiVersion: v1\nkind: Secret\nmetadata:\n name: goodsecret"),
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
@ -166,7 +163,10 @@ func TestDeprecatedAPIFails(t *testing.T) {
|
|
|
|
|
linter := support.Linter{ChartDir: filepath.Join(tmpdir, mychart.Name())}
|
|
|
|
|
Templates(&linter, values, namespace, strict)
|
|
|
|
|
if l := len(linter.Messages); l != 1 {
|
|
|
|
|
t.Errorf("Expected 1 lint error, got %d", l)
|
|
|
|
|
for i, msg := range linter.Messages {
|
|
|
|
|
t.Logf("Message %d: %s", i, msg)
|
|
|
|
|
}
|
|
|
|
|
t.Fatalf("Expected 1 lint error, got %d", l)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
err := linter.Messages[0].Err.(deprecatedAPIError)
|
|
|
|
@ -174,4 +174,3 @@ func TestDeprecatedAPIFails(t *testing.T) {
|
|
|
|
|
t.Errorf("Surprised to learn that %q is deprecated", err.Deprecated)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
>>>>>>> feat: implement deprecation warnings in helm lint
|
|
|
|
|