mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-06-13 01:50:55 +00:00
Refactor crd package to depend on transformerconfig
This commit is contained in:
@@ -562,23 +562,3 @@ func TestAnnotationsRun(t *testing.T) {
|
||||
t.Fatalf("actual doesn't match expected: %v", err)
|
||||
}
|
||||
}
|
||||
|
||||
func TestAddPathConfigs(t *testing.T) {
|
||||
aexpected := len(defaultAnnotationsPathConfigs) + 1
|
||||
lexpected := len(defaultLabelsPathConfigs) + 1
|
||||
pathConfigs := []PathConfig{
|
||||
{
|
||||
GroupVersionKind: &gvk.Gvk{Group: "GroupA", Kind: "KindB"},
|
||||
Path: []string{"path", "to", "a", "field"},
|
||||
CreateIfNotPresent: true,
|
||||
},
|
||||
}
|
||||
AddLabelsPathConfigs(pathConfigs...)
|
||||
AddAnnotationsPathConfigs(pathConfigs[0])
|
||||
if len(defaultAnnotationsPathConfigs) != aexpected {
|
||||
t.Fatalf("actual %v doesn't match expected: %v", len(defaultAnnotationsPathConfigs), aexpected)
|
||||
}
|
||||
if len(defaultLabelsPathConfigs) != lexpected {
|
||||
t.Fatalf("actual %v doesn't match expected: %v", len(defaultLabelsPathConfigs), lexpected)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user