Consolidate transformer config creation to factory.

This commit is contained in:
Jeffrey Regan
2018-10-10 11:03:18 -07:00
parent bb9435a604
commit 2283c06971
13 changed files with 207 additions and 159 deletions

View File

@@ -177,7 +177,8 @@ func TestRegisterCRD(t *testing.T) {
NameReference: refpathconfigs,
}
pathconfig, _ := registerCRD(makeLoader(t), "/testpath/crd.json")
pathconfig, _ := RegisterCRDs(
transformerconfig.NewFactory(makeLoader(t)), []string{"/testpath/crd.json"})
if !reflect.DeepEqual(pathconfig, expected) {
t.Fatalf("expected\n %v\n but got\n %v\n", expected, pathconfig)