Documentation ¶
Index ¶
- type FooCacheMock
- func (mock *FooCacheMock) AddIndexer(indexName string, indexer v1.FooIndexer)
- func (mock *FooCacheMock) AddIndexerCalls() []struct{ ... }
- func (mock *FooCacheMock) Get(namespace string, name string) (*v1a.Foo, error)
- func (mock *FooCacheMock) GetByIndex(indexName string, key string) ([]*v1a.Foo, error)
- func (mock *FooCacheMock) GetByIndexCalls() []struct{ ... }
- func (mock *FooCacheMock) GetCalls() []struct{ ... }
- func (mock *FooCacheMock) List(namespace string, selector labels.Selector) ([]*v1a.Foo, error)
- func (mock *FooCacheMock) ListCalls() []struct{ ... }
- type FooClientMock
- func (mock *FooClientMock) Create(in1 *v1a.Foo) (*v1a.Foo, error)
- func (mock *FooClientMock) CreateCalls() []struct{ ... }
- func (mock *FooClientMock) Delete(namespace string, name string, options *v1b.DeleteOptions) error
- func (mock *FooClientMock) DeleteCalls() []struct{ ... }
- func (mock *FooClientMock) Get(namespace string, name string, options v1b.GetOptions) (*v1a.Foo, error)
- func (mock *FooClientMock) GetCalls() []struct{ ... }
- func (mock *FooClientMock) List(namespace string, opts v1b.ListOptions) (*v1a.FooList, error)
- func (mock *FooClientMock) ListCalls() []struct{ ... }
- func (mock *FooClientMock) Patch(namespace string, name string, pt types.PatchType, data []byte, ...) (*v1a.Foo, error)
- func (mock *FooClientMock) PatchCalls() []struct{ ... }
- func (mock *FooClientMock) Update(in1 *v1a.Foo) (*v1a.Foo, error)
- func (mock *FooClientMock) UpdateCalls() []struct{ ... }
- func (mock *FooClientMock) Watch(namespace string, opts v1b.ListOptions) (watch.Interface, error)
- func (mock *FooClientMock) WatchCalls() []struct{ ... }
- type FooControllerMock
- func (mock *FooControllerMock) AddGenericHandler(ctx context.Context, name string, handler generic.Handler)
- func (mock *FooControllerMock) AddGenericHandlerCalls() []struct{ ... }
- func (mock *FooControllerMock) AddGenericRemoveHandler(ctx context.Context, name string, handler generic.Handler)
- func (mock *FooControllerMock) AddGenericRemoveHandlerCalls() []struct{ ... }
- func (mock *FooControllerMock) Cache() v1.FooCache
- func (mock *FooControllerMock) CacheCalls() []struct{}
- func (mock *FooControllerMock) Create(in1 *v1a.Foo) (*v1a.Foo, error)
- func (mock *FooControllerMock) CreateCalls() []struct{ ... }
- func (mock *FooControllerMock) Delete(namespace string, name string, options *v1b.DeleteOptions) error
- func (mock *FooControllerMock) DeleteCalls() []struct{ ... }
- func (mock *FooControllerMock) Enqueue(namespace string, name string)
- func (mock *FooControllerMock) EnqueueCalls() []struct{ ... }
- func (mock *FooControllerMock) Get(namespace string, name string, options v1b.GetOptions) (*v1a.Foo, error)
- func (mock *FooControllerMock) GetCalls() []struct{ ... }
- func (mock *FooControllerMock) GroupVersionKind() schema.GroupVersionKind
- func (mock *FooControllerMock) GroupVersionKindCalls() []struct{}
- func (mock *FooControllerMock) Informer() cache.SharedIndexInformer
- func (mock *FooControllerMock) InformerCalls() []struct{}
- func (mock *FooControllerMock) List(namespace string, opts v1b.ListOptions) (*v1a.FooList, error)
- func (mock *FooControllerMock) ListCalls() []struct{ ... }
- func (mock *FooControllerMock) OnChange(ctx context.Context, name string, sync v1.FooHandler)
- func (mock *FooControllerMock) OnChangeCalls() []struct{ ... }
- func (mock *FooControllerMock) OnRemove(ctx context.Context, name string, sync v1.FooHandler)
- func (mock *FooControllerMock) OnRemoveCalls() []struct{ ... }
- func (mock *FooControllerMock) Patch(namespace string, name string, pt types.PatchType, data []byte, ...) (*v1a.Foo, error)
- func (mock *FooControllerMock) PatchCalls() []struct{ ... }
- func (mock *FooControllerMock) Update(in1 *v1a.Foo) (*v1a.Foo, error)
- func (mock *FooControllerMock) UpdateCalls() []struct{ ... }
- func (mock *FooControllerMock) Updater() generic.Updater
- func (mock *FooControllerMock) UpdaterCalls() []struct{}
- func (mock *FooControllerMock) Watch(namespace string, opts v1b.ListOptions) (watch.Interface, error)
- func (mock *FooControllerMock) WatchCalls() []struct{ ... }
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FooCacheMock ¶
type FooCacheMock struct { // AddIndexerFunc mocks the AddIndexer method. AddIndexerFunc func(indexName string, indexer v1.FooIndexer) // GetFunc mocks the Get method. GetFunc func(namespace string, name string) (*v1a.Foo, error) // GetByIndexFunc mocks the GetByIndex method. GetByIndexFunc func(indexName string, key string) ([]*v1a.Foo, error) // ListFunc mocks the List method. ListFunc func(namespace string, selector labels.Selector) ([]*v1a.Foo, error) // contains filtered or unexported fields }
FooCacheMock is a mock implementation of FooCache.
func TestSomethingThatUsesFooCache(t *testing.T) { // make and configure a mocked FooCache mockedFooCache := &FooCacheMock{ AddIndexerFunc: func(indexName string, indexer v1.FooIndexer) { panic("mock out the AddIndexer method") }, GetFunc: func(namespace string, name string) (*v1a.Foo, error) { panic("mock out the Get method") }, GetByIndexFunc: func(indexName string, key string) ([]*v1a.Foo, error) { panic("mock out the GetByIndex method") }, ListFunc: func(namespace string, selector labels.Selector) ([]*v1a.Foo, error) { panic("mock out the List method") }, } // use mockedFooCache in code that requires FooCache // and then make assertions. }
func (*FooCacheMock) AddIndexer ¶
func (mock *FooCacheMock) AddIndexer(indexName string, indexer v1.FooIndexer)
AddIndexer calls AddIndexerFunc.
func (*FooCacheMock) AddIndexerCalls ¶
func (mock *FooCacheMock) AddIndexerCalls() []struct { IndexName string Indexer v1.FooIndexer }
AddIndexerCalls gets all the calls that were made to AddIndexer. Check the length with:
len(mockedFooCache.AddIndexerCalls())
func (*FooCacheMock) GetByIndex ¶
GetByIndex calls GetByIndexFunc.
func (*FooCacheMock) GetByIndexCalls ¶
func (mock *FooCacheMock) GetByIndexCalls() []struct { IndexName string Key string }
GetByIndexCalls gets all the calls that were made to GetByIndex. Check the length with:
len(mockedFooCache.GetByIndexCalls())
func (*FooCacheMock) GetCalls ¶
func (mock *FooCacheMock) GetCalls() []struct { Namespace string Name string }
GetCalls gets all the calls that were made to Get. Check the length with:
len(mockedFooCache.GetCalls())
type FooClientMock ¶
type FooClientMock struct { // CreateFunc mocks the Create method. CreateFunc func(in1 *v1a.Foo) (*v1a.Foo, error) // DeleteFunc mocks the Delete method. DeleteFunc func(namespace string, name string, options *v1b.DeleteOptions) error // GetFunc mocks the Get method. GetFunc func(namespace string, name string, options v1b.GetOptions) (*v1a.Foo, error) // ListFunc mocks the List method. ListFunc func(namespace string, opts v1b.ListOptions) (*v1a.FooList, error) // PatchFunc mocks the Patch method. PatchFunc func(namespace string, name string, pt types.PatchType, data []byte, subresources ...string) (*v1a.Foo, error) // UpdateFunc mocks the Update method. UpdateFunc func(in1 *v1a.Foo) (*v1a.Foo, error) // WatchFunc mocks the Watch method. WatchFunc func(namespace string, opts v1b.ListOptions) (watch.Interface, error) // contains filtered or unexported fields }
FooClientMock is a mock implementation of FooClient.
func TestSomethingThatUsesFooClient(t *testing.T) { // make and configure a mocked FooClient mockedFooClient := &FooClientMock{ CreateFunc: func(in1 *v1a.Foo) (*v1a.Foo, error) { panic("mock out the Create method") }, DeleteFunc: func(namespace string, name string, options *v1b.DeleteOptions) error { panic("mock out the Delete method") }, GetFunc: func(namespace string, name string, options v1b.GetOptions) (*v1a.Foo, error) { panic("mock out the Get method") }, ListFunc: func(namespace string, opts v1b.ListOptions) (*v1a.FooList, error) { panic("mock out the List method") }, PatchFunc: func(namespace string, name string, pt types.PatchType, data []byte, subresources ...string) (*v1a.Foo, error) { panic("mock out the Patch method") }, UpdateFunc: func(in1 *v1a.Foo) (*v1a.Foo, error) { panic("mock out the Update method") }, WatchFunc: func(namespace string, opts v1b.ListOptions) (watch.Interface, error) { panic("mock out the Watch method") }, } // use mockedFooClient in code that requires FooClient // and then make assertions. }
func (*FooClientMock) CreateCalls ¶
func (mock *FooClientMock) CreateCalls() []struct { In1 *v1a.Foo }
CreateCalls gets all the calls that were made to Create. Check the length with:
len(mockedFooClient.CreateCalls())
func (*FooClientMock) Delete ¶
func (mock *FooClientMock) Delete(namespace string, name string, options *v1b.DeleteOptions) error
Delete calls DeleteFunc.
func (*FooClientMock) DeleteCalls ¶
func (mock *FooClientMock) DeleteCalls() []struct { Namespace string Name string Options *v1b.DeleteOptions }
DeleteCalls gets all the calls that were made to Delete. Check the length with:
len(mockedFooClient.DeleteCalls())
func (*FooClientMock) Get ¶
func (mock *FooClientMock) Get(namespace string, name string, options v1b.GetOptions) (*v1a.Foo, error)
Get calls GetFunc.
func (*FooClientMock) GetCalls ¶
func (mock *FooClientMock) GetCalls() []struct { Namespace string Name string Options v1b.GetOptions }
GetCalls gets all the calls that were made to Get. Check the length with:
len(mockedFooClient.GetCalls())
func (*FooClientMock) List ¶
func (mock *FooClientMock) List(namespace string, opts v1b.ListOptions) (*v1a.FooList, error)
List calls ListFunc.
func (*FooClientMock) ListCalls ¶
func (mock *FooClientMock) ListCalls() []struct { Namespace string Opts v1b.ListOptions }
ListCalls gets all the calls that were made to List. Check the length with:
len(mockedFooClient.ListCalls())
func (*FooClientMock) Patch ¶
func (mock *FooClientMock) Patch(namespace string, name string, pt types.PatchType, data []byte, subresources ...string) (*v1a.Foo, error)
Patch calls PatchFunc.
func (*FooClientMock) PatchCalls ¶
func (mock *FooClientMock) PatchCalls() []struct { Namespace string Name string Pt types.PatchType Data []byte Subresources []string }
PatchCalls gets all the calls that were made to Patch. Check the length with:
len(mockedFooClient.PatchCalls())
func (*FooClientMock) UpdateCalls ¶
func (mock *FooClientMock) UpdateCalls() []struct { In1 *v1a.Foo }
UpdateCalls gets all the calls that were made to Update. Check the length with:
len(mockedFooClient.UpdateCalls())
func (*FooClientMock) Watch ¶
func (mock *FooClientMock) Watch(namespace string, opts v1b.ListOptions) (watch.Interface, error)
Watch calls WatchFunc.
func (*FooClientMock) WatchCalls ¶
func (mock *FooClientMock) WatchCalls() []struct { Namespace string Opts v1b.ListOptions }
WatchCalls gets all the calls that were made to Watch. Check the length with:
len(mockedFooClient.WatchCalls())
type FooControllerMock ¶
type FooControllerMock struct { // AddGenericHandlerFunc mocks the AddGenericHandler method. AddGenericHandlerFunc func(ctx context.Context, name string, handler generic.Handler) // AddGenericRemoveHandlerFunc mocks the AddGenericRemoveHandler method. AddGenericRemoveHandlerFunc func(ctx context.Context, name string, handler generic.Handler) // CacheFunc mocks the Cache method. CacheFunc func() v1.FooCache // CreateFunc mocks the Create method. CreateFunc func(in1 *v1a.Foo) (*v1a.Foo, error) // DeleteFunc mocks the Delete method. DeleteFunc func(namespace string, name string, options *v1b.DeleteOptions) error // EnqueueFunc mocks the Enqueue method. EnqueueFunc func(namespace string, name string) // GetFunc mocks the Get method. GetFunc func(namespace string, name string, options v1b.GetOptions) (*v1a.Foo, error) // GroupVersionKindFunc mocks the GroupVersionKind method. GroupVersionKindFunc func() schema.GroupVersionKind // InformerFunc mocks the Informer method. InformerFunc func() cache.SharedIndexInformer // ListFunc mocks the List method. ListFunc func(namespace string, opts v1b.ListOptions) (*v1a.FooList, error) // OnChangeFunc mocks the OnChange method. OnChangeFunc func(ctx context.Context, name string, sync v1.FooHandler) // OnRemoveFunc mocks the OnRemove method. OnRemoveFunc func(ctx context.Context, name string, sync v1.FooHandler) // PatchFunc mocks the Patch method. PatchFunc func(namespace string, name string, pt types.PatchType, data []byte, subresources ...string) (*v1a.Foo, error) // UpdateFunc mocks the Update method. UpdateFunc func(in1 *v1a.Foo) (*v1a.Foo, error) // UpdaterFunc mocks the Updater method. UpdaterFunc func() generic.Updater // WatchFunc mocks the Watch method. WatchFunc func(namespace string, opts v1b.ListOptions) (watch.Interface, error) // contains filtered or unexported fields }
FooControllerMock is a mock implementation of FooController.
func TestSomethingThatUsesFooController(t *testing.T) { // make and configure a mocked FooController mockedFooController := &FooControllerMock{ AddGenericHandlerFunc: func(ctx context.Context, name string, handler generic.Handler) { panic("mock out the AddGenericHandler method") }, AddGenericRemoveHandlerFunc: func(ctx context.Context, name string, handler generic.Handler) { panic("mock out the AddGenericRemoveHandler method") }, CacheFunc: func() v1.FooCache { panic("mock out the Cache method") }, CreateFunc: func(in1 *v1a.Foo) (*v1a.Foo, error) { panic("mock out the Create method") }, DeleteFunc: func(namespace string, name string, options *v1b.DeleteOptions) error { panic("mock out the Delete method") }, EnqueueFunc: func(namespace string, name string) { panic("mock out the Enqueue method") }, GetFunc: func(namespace string, name string, options v1b.GetOptions) (*v1a.Foo, error) { panic("mock out the Get method") }, GroupVersionKindFunc: func() schema.GroupVersionKind { panic("mock out the GroupVersionKind method") }, InformerFunc: func() cache.SharedIndexInformer { panic("mock out the Informer method") }, ListFunc: func(namespace string, opts v1b.ListOptions) (*v1a.FooList, error) { panic("mock out the List method") }, OnChangeFunc: func(ctx context.Context, name string, sync v1.FooHandler) { panic("mock out the OnChange method") }, OnRemoveFunc: func(ctx context.Context, name string, sync v1.FooHandler) { panic("mock out the OnRemove method") }, PatchFunc: func(namespace string, name string, pt types.PatchType, data []byte, subresources ...string) (*v1a.Foo, error) { panic("mock out the Patch method") }, UpdateFunc: func(in1 *v1a.Foo) (*v1a.Foo, error) { panic("mock out the Update method") }, UpdaterFunc: func() generic.Updater { panic("mock out the Updater method") }, WatchFunc: func(namespace string, opts v1b.ListOptions) (watch.Interface, error) { panic("mock out the Watch method") }, } // use mockedFooController in code that requires FooController // and then make assertions. }
func (*FooControllerMock) AddGenericHandler ¶
func (mock *FooControllerMock) AddGenericHandler(ctx context.Context, name string, handler generic.Handler)
AddGenericHandler calls AddGenericHandlerFunc.
func (*FooControllerMock) AddGenericHandlerCalls ¶
func (mock *FooControllerMock) AddGenericHandlerCalls() []struct { Ctx context.Context Name string Handler generic.Handler }
AddGenericHandlerCalls gets all the calls that were made to AddGenericHandler. Check the length with:
len(mockedFooController.AddGenericHandlerCalls())
func (*FooControllerMock) AddGenericRemoveHandler ¶
func (mock *FooControllerMock) AddGenericRemoveHandler(ctx context.Context, name string, handler generic.Handler)
AddGenericRemoveHandler calls AddGenericRemoveHandlerFunc.
func (*FooControllerMock) AddGenericRemoveHandlerCalls ¶
func (mock *FooControllerMock) AddGenericRemoveHandlerCalls() []struct { Ctx context.Context Name string Handler generic.Handler }
AddGenericRemoveHandlerCalls gets all the calls that were made to AddGenericRemoveHandler. Check the length with:
len(mockedFooController.AddGenericRemoveHandlerCalls())
func (*FooControllerMock) Cache ¶
func (mock *FooControllerMock) Cache() v1.FooCache
Cache calls CacheFunc.
func (*FooControllerMock) CacheCalls ¶
func (mock *FooControllerMock) CacheCalls() []struct { }
CacheCalls gets all the calls that were made to Cache. Check the length with:
len(mockedFooController.CacheCalls())
func (*FooControllerMock) CreateCalls ¶
func (mock *FooControllerMock) CreateCalls() []struct { In1 *v1a.Foo }
CreateCalls gets all the calls that were made to Create. Check the length with:
len(mockedFooController.CreateCalls())
func (*FooControllerMock) Delete ¶
func (mock *FooControllerMock) Delete(namespace string, name string, options *v1b.DeleteOptions) error
Delete calls DeleteFunc.
func (*FooControllerMock) DeleteCalls ¶
func (mock *FooControllerMock) DeleteCalls() []struct { Namespace string Name string Options *v1b.DeleteOptions }
DeleteCalls gets all the calls that were made to Delete. Check the length with:
len(mockedFooController.DeleteCalls())
func (*FooControllerMock) Enqueue ¶
func (mock *FooControllerMock) Enqueue(namespace string, name string)
Enqueue calls EnqueueFunc.
func (*FooControllerMock) EnqueueCalls ¶
func (mock *FooControllerMock) EnqueueCalls() []struct { Namespace string Name string }
EnqueueCalls gets all the calls that were made to Enqueue. Check the length with:
len(mockedFooController.EnqueueCalls())
func (*FooControllerMock) Get ¶
func (mock *FooControllerMock) Get(namespace string, name string, options v1b.GetOptions) (*v1a.Foo, error)
Get calls GetFunc.
func (*FooControllerMock) GetCalls ¶
func (mock *FooControllerMock) GetCalls() []struct { Namespace string Name string Options v1b.GetOptions }
GetCalls gets all the calls that were made to Get. Check the length with:
len(mockedFooController.GetCalls())
func (*FooControllerMock) GroupVersionKind ¶
func (mock *FooControllerMock) GroupVersionKind() schema.GroupVersionKind
GroupVersionKind calls GroupVersionKindFunc.
func (*FooControllerMock) GroupVersionKindCalls ¶
func (mock *FooControllerMock) GroupVersionKindCalls() []struct { }
GroupVersionKindCalls gets all the calls that were made to GroupVersionKind. Check the length with:
len(mockedFooController.GroupVersionKindCalls())
func (*FooControllerMock) Informer ¶
func (mock *FooControllerMock) Informer() cache.SharedIndexInformer
Informer calls InformerFunc.
func (*FooControllerMock) InformerCalls ¶
func (mock *FooControllerMock) InformerCalls() []struct { }
InformerCalls gets all the calls that were made to Informer. Check the length with:
len(mockedFooController.InformerCalls())
func (*FooControllerMock) List ¶
func (mock *FooControllerMock) List(namespace string, opts v1b.ListOptions) (*v1a.FooList, error)
List calls ListFunc.
func (*FooControllerMock) ListCalls ¶
func (mock *FooControllerMock) ListCalls() []struct { Namespace string Opts v1b.ListOptions }
ListCalls gets all the calls that were made to List. Check the length with:
len(mockedFooController.ListCalls())
func (*FooControllerMock) OnChange ¶
func (mock *FooControllerMock) OnChange(ctx context.Context, name string, sync v1.FooHandler)
OnChange calls OnChangeFunc.
func (*FooControllerMock) OnChangeCalls ¶
func (mock *FooControllerMock) OnChangeCalls() []struct { Ctx context.Context Name string Sync v1.FooHandler }
OnChangeCalls gets all the calls that were made to OnChange. Check the length with:
len(mockedFooController.OnChangeCalls())
func (*FooControllerMock) OnRemove ¶
func (mock *FooControllerMock) OnRemove(ctx context.Context, name string, sync v1.FooHandler)
OnRemove calls OnRemoveFunc.
func (*FooControllerMock) OnRemoveCalls ¶
func (mock *FooControllerMock) OnRemoveCalls() []struct { Ctx context.Context Name string Sync v1.FooHandler }
OnRemoveCalls gets all the calls that were made to OnRemove. Check the length with:
len(mockedFooController.OnRemoveCalls())
func (*FooControllerMock) Patch ¶
func (mock *FooControllerMock) Patch(namespace string, name string, pt types.PatchType, data []byte, subresources ...string) (*v1a.Foo, error)
Patch calls PatchFunc.
func (*FooControllerMock) PatchCalls ¶
func (mock *FooControllerMock) PatchCalls() []struct { Namespace string Name string Pt types.PatchType Data []byte Subresources []string }
PatchCalls gets all the calls that were made to Patch. Check the length with:
len(mockedFooController.PatchCalls())
func (*FooControllerMock) UpdateCalls ¶
func (mock *FooControllerMock) UpdateCalls() []struct { In1 *v1a.Foo }
UpdateCalls gets all the calls that were made to Update. Check the length with:
len(mockedFooController.UpdateCalls())
func (*FooControllerMock) Updater ¶
func (mock *FooControllerMock) Updater() generic.Updater
Updater calls UpdaterFunc.
func (*FooControllerMock) UpdaterCalls ¶
func (mock *FooControllerMock) UpdaterCalls() []struct { }
UpdaterCalls gets all the calls that were made to Updater. Check the length with:
len(mockedFooController.UpdaterCalls())
func (*FooControllerMock) Watch ¶
func (mock *FooControllerMock) Watch(namespace string, opts v1b.ListOptions) (watch.Interface, error)
Watch calls WatchFunc.
func (*FooControllerMock) WatchCalls ¶
func (mock *FooControllerMock) WatchCalls() []struct { Namespace string Opts v1b.ListOptions }
WatchCalls gets all the calls that were made to Watch. Check the length with:
len(mockedFooController.WatchCalls())