Refactor crd package to depend on transformerconfig

This commit is contained in:
Jingfang Liu
2018-09-27 10:39:29 -07:00
parent 20fa90a137
commit 7ab710889c
20 changed files with 204 additions and 217 deletions

View File

@@ -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"
)
@@ -92,19 +91,3 @@ func TestPrefixNameRun(t *testing.T) {
t.Fatalf("actual doesn't match expected: %v", err)
}
}
func TestAddPrefixPathConfigs(t *testing.T) {
expected := len(defaultNamePrefixPathConfigs) + 1
pathConfigs := []PathConfig{
{
GroupVersionKind: &gvk.Gvk{Group: "GroupA", Kind: "KindB"},
Path: []string{"path", "to", "a", "field"},
CreateIfNotPresent: true,
},
}
AddPrefixPathConfigs(pathConfigs...)
if len(defaultNamePrefixPathConfigs) != expected {
t.Fatalf("actual %v doesn't match expected: %v", len(defaultNamePrefixPathConfigs), expected)
}
}