mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-07-17 17:52:12 +00:00
Delete kustomizationerror.
Do a longstanding TODO to remove kustomizationerror. It wasn't used much, and it wasn't used consistently, because it's complicated to decided when it's worth proceeding to accumulate errors when one already knows that one has a fatal error in the kustomization. Its use was blocking refactoring for simplicity and making tests harder to write. Removing it lets us reinstate the cyclomatic complexity check in KustTarget. Also added more info to the affected error messages.
This commit is contained in:
@@ -32,7 +32,7 @@ import (
|
||||
"sigs.k8s.io/kustomize/pkg/types"
|
||||
)
|
||||
|
||||
func TestFromFiles(t *testing.T) {
|
||||
func TestFromFile(t *testing.T) {
|
||||
|
||||
resourceStr := `apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
@@ -85,12 +85,10 @@ metadata:
|
||||
}),
|
||||
}
|
||||
|
||||
m, _ := rmF.FromFiles(
|
||||
l, []string{"deployment.yaml"})
|
||||
m, _ := rmF.FromFile(l, "deployment.yaml")
|
||||
if len(m) != 3 {
|
||||
t.Fatalf("%#v should contain 3 appResource, but got %d", m, len(m))
|
||||
}
|
||||
|
||||
if err := expected.ErrorIfNotEqual(m); err != nil {
|
||||
t.Fatalf("actual doesn't match expected: %v", err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user