mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-06-30 09:51:23 +00:00
Refactor crd package to depend on transformerconfig
This commit is contained in:
@@ -20,7 +20,6 @@ import (
|
||||
"reflect"
|
||||
"testing"
|
||||
|
||||
"sigs.k8s.io/kustomize/pkg/gvk"
|
||||
"sigs.k8s.io/kustomize/pkg/resmap"
|
||||
"sigs.k8s.io/kustomize/pkg/resource"
|
||||
)
|
||||
@@ -336,29 +335,3 @@ func TestNameReferenceRun(t *testing.T) {
|
||||
t.Fatalf("actual doesn't match expected: %v", err)
|
||||
}
|
||||
}
|
||||
|
||||
func TestAddNameReferencePathConfigs(t *testing.T) {
|
||||
expected := len(defaultNameReferencePathConfigs) + 1
|
||||
|
||||
pathConfigs := []ReferencePathConfig{
|
||||
{
|
||||
referencedGVK: gvk.Gvk{
|
||||
Kind: "KindA",
|
||||
},
|
||||
pathConfigs: []PathConfig{
|
||||
{
|
||||
GroupVersionKind: &gvk.Gvk{
|
||||
Kind: "KindB",
|
||||
},
|
||||
Path: []string{"path", "to", "a", "field"},
|
||||
CreateIfNotPresent: false,
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
AddNameReferencePathConfigs(pathConfigs)
|
||||
if len(defaultNameReferencePathConfigs) != expected {
|
||||
t.Fatalf("actual %v doesn't match expected: %v", len(defaultAnnotationsPathConfigs), expected)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user