mirror of
https://github.com/kubernetes/client-go.git
synced 2025-09-17 07:38:22 +00:00
Implement a FakeClient interface
Kubernetes-commit: cf26825e3d9b89526e13bb53f74354593477205c
This commit is contained in:
committed by
Kubernetes Publisher
parent
2ed8b30810
commit
3579fb3012
@@ -115,12 +115,15 @@ type dynamicResourceClient struct {
|
||||
listKind string
|
||||
}
|
||||
|
||||
var (
|
||||
_ dynamic.Interface = &FakeDynamicClient{}
|
||||
_ testing.FakeClient = &FakeDynamicClient{}
|
||||
)
|
||||
|
||||
func (c *FakeDynamicClient) Tracker() testing.ObjectTracker {
|
||||
return c.tracker
|
||||
}
|
||||
|
||||
var _ dynamic.Interface = &FakeDynamicClient{}
|
||||
|
||||
func (c *FakeDynamicClient) Resource(resource schema.GroupVersionResource) dynamic.NamespaceableResourceInterface {
|
||||
return &dynamicResourceClient{client: c, resource: resource, listKind: c.gvrToListKind[resource]}
|
||||
}
|
||||
|
Reference in New Issue
Block a user