mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-04 23:17:50 +00:00
move Describer from factory
This commit is contained in:
@@ -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,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user