Aligned the function definiton to its signature
* The function definition for WithToDiscoveryClientByError and WithDynamicClientByError seems to be swapped by mistake. * So aligned the function definiton to its signature Change-Id: I7e293b148765f460d007aa4a6dc931defeb879b5
This commit is contained in:
parent
e9f8ac3ac3
commit
bc5dbed20f
@ -76,8 +76,9 @@ func (f *MockKubectlFactory) ClientForMapping(*meta.RESTMapping) (resource.RESTC
|
|||||||
return f.MockClientForMapping()
|
return f.MockClientForMapping()
|
||||||
}
|
}
|
||||||
|
|
||||||
func (f *MockKubectlFactory) WithToDiscoveryClientByError(d dynamic.Interface, err error) *MockKubectlFactory {
|
func (f *MockKubectlFactory) WithToDiscoveryClientByError(d discovery.CachedDiscoveryInterface,
|
||||||
f.MockDynamicClient = func() (dynamic.Interface, error) { return d, err }
|
err error) *MockKubectlFactory {
|
||||||
|
f.MockToDiscoveryClient = func() (discovery.CachedDiscoveryInterface, error) { return d, err }
|
||||||
return f
|
return f
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -86,9 +87,8 @@ func (f *MockKubectlFactory) WithOpenAPISchemaByError(r openapi.Resources, err e
|
|||||||
return f
|
return f
|
||||||
}
|
}
|
||||||
|
|
||||||
func (f *MockKubectlFactory) WithDynamicClientByError(d discovery.CachedDiscoveryInterface,
|
func (f *MockKubectlFactory) WithDynamicClientByError(d dynamic.Interface, err error) *MockKubectlFactory {
|
||||||
err error) *MockKubectlFactory {
|
f.MockDynamicClient = func() (dynamic.Interface, error) { return d, err }
|
||||||
f.MockToDiscoveryClient = func() (discovery.CachedDiscoveryInterface, error) { return d, err }
|
|
||||||
return f
|
return f
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user