move Describer from factory

This commit is contained in:
juanvallejo
2018-05-23 17:43:04 -04:00
parent b143093a62
commit cf29a30258
5 changed files with 63 additions and 48 deletions

View File

@@ -271,10 +271,17 @@ func NewTestFactory() *TestFactory {
WithClientConfig(clientConfig).
WithRESTMapper(testRESTMapper())
restConfig, err := clientConfig.ClientConfig()
if err != nil {
panic(fmt.Sprintf("unable to create a fake restclient config: %v", err))
}
return &TestFactory{
Factory: cmdutil.NewFactory(configFlags),
FakeDynamicClient: fakedynamic.NewSimpleDynamicClient(legacyscheme.Scheme),
tempConfigFile: tmpFile,
ClientConfigVal: restConfig,
}
}