fakes

package
v0.1.0-rc3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 14, 2019 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GitModuleCacheMock

type GitModuleCacheMock struct {
	// AddIndexerFunc mocks the AddIndexer method.
	AddIndexerFunc func(indexName string, indexer v1.GitModuleIndexer)

	// GetFunc mocks the Get method.
	GetFunc func(namespace string, name string) (*v1a.GitModule, error)

	// GetByIndexFunc mocks the GetByIndex method.
	GetByIndexFunc func(indexName string, key string) ([]*v1a.GitModule, error)

	// ListFunc mocks the List method.
	ListFunc func(namespace string, selector labels.Selector) ([]*v1a.GitModule, error)
	// contains filtered or unexported fields
}

GitModuleCacheMock is a mock implementation of GitModuleCache.

    func TestSomethingThatUsesGitModuleCache(t *testing.T) {

        // make and configure a mocked GitModuleCache
        mockedGitModuleCache := &GitModuleCacheMock{
            AddIndexerFunc: func(indexName string, indexer v1.GitModuleIndexer)  {
	               panic("mock out the AddIndexer method")
            },
            GetFunc: func(namespace string, name string) (*v1a.GitModule, error) {
	               panic("mock out the Get method")
            },
            GetByIndexFunc: func(indexName string, key string) ([]*v1a.GitModule, error) {
	               panic("mock out the GetByIndex method")
            },
            ListFunc: func(namespace string, selector labels.Selector) ([]*v1a.GitModule, error) {
	               panic("mock out the List method")
            },
        }

        // use mockedGitModuleCache in code that requires GitModuleCache
        // and then make assertions.

    }

func (*GitModuleCacheMock) AddIndexer

func (mock *GitModuleCacheMock) AddIndexer(indexName string, indexer v1.GitModuleIndexer)

AddIndexer calls AddIndexerFunc.

func (*GitModuleCacheMock) AddIndexerCalls

func (mock *GitModuleCacheMock) AddIndexerCalls() []struct {
	IndexName string
	Indexer   v1.GitModuleIndexer
}

AddIndexerCalls gets all the calls that were made to AddIndexer. Check the length with:

len(mockedGitModuleCache.AddIndexerCalls())

func (*GitModuleCacheMock) Get

func (mock *GitModuleCacheMock) Get(namespace string, name string) (*v1a.GitModule, error)

Get calls GetFunc.

func (*GitModuleCacheMock) GetByIndex

func (mock *GitModuleCacheMock) GetByIndex(indexName string, key string) ([]*v1a.GitModule, error)

GetByIndex calls GetByIndexFunc.

func (*GitModuleCacheMock) GetByIndexCalls

func (mock *GitModuleCacheMock) GetByIndexCalls() []struct {
	IndexName string
	Key       string
}

GetByIndexCalls gets all the calls that were made to GetByIndex. Check the length with:

len(mockedGitModuleCache.GetByIndexCalls())

func (*GitModuleCacheMock) GetCalls

func (mock *GitModuleCacheMock) GetCalls() []struct {
	Namespace string
	Name      string
}

GetCalls gets all the calls that were made to Get. Check the length with:

len(mockedGitModuleCache.GetCalls())

func (*GitModuleCacheMock) List

func (mock *GitModuleCacheMock) List(namespace string, selector labels.Selector) ([]*v1a.GitModule, error)

List calls ListFunc.

func (*GitModuleCacheMock) ListCalls

func (mock *GitModuleCacheMock) ListCalls() []struct {
	Namespace string
	Selector  labels.Selector
}

ListCalls gets all the calls that were made to List. Check the length with:

len(mockedGitModuleCache.ListCalls())

type GitModuleClientMock

type GitModuleClientMock struct {
	// CreateFunc mocks the Create method.
	CreateFunc func(in1 *v1a.GitModule) (*v1a.GitModule, 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.GitModule, error)

	// ListFunc mocks the List method.
	ListFunc func(namespace string, opts v1b.ListOptions) (*v1a.GitModuleList, error)

	// PatchFunc mocks the Patch method.
	PatchFunc func(namespace string, name string, pt types.PatchType, data []byte, subresources ...string) (*v1a.GitModule, error)

	// UpdateFunc mocks the Update method.
	UpdateFunc func(in1 *v1a.GitModule) (*v1a.GitModule, error)

	// UpdateStatusFunc mocks the UpdateStatus method.
	UpdateStatusFunc func(in1 *v1a.GitModule) (*v1a.GitModule, error)

	// WatchFunc mocks the Watch method.
	WatchFunc func(namespace string, opts v1b.ListOptions) (watch.Interface, error)
	// contains filtered or unexported fields
}

GitModuleClientMock is a mock implementation of GitModuleClient.

    func TestSomethingThatUsesGitModuleClient(t *testing.T) {

        // make and configure a mocked GitModuleClient
        mockedGitModuleClient := &GitModuleClientMock{
            CreateFunc: func(in1 *v1a.GitModule) (*v1a.GitModule, 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.GitModule, error) {
	               panic("mock out the Get method")
            },
            ListFunc: func(namespace string, opts v1b.ListOptions) (*v1a.GitModuleList, error) {
	               panic("mock out the List method")
            },
            PatchFunc: func(namespace string, name string, pt types.PatchType, data []byte, subresources ...string) (*v1a.GitModule, error) {
	               panic("mock out the Patch method")
            },
            UpdateFunc: func(in1 *v1a.GitModule) (*v1a.GitModule, error) {
	               panic("mock out the Update method")
            },
            UpdateStatusFunc: func(in1 *v1a.GitModule) (*v1a.GitModule, error) {
	               panic("mock out the UpdateStatus method")
            },
            WatchFunc: func(namespace string, opts v1b.ListOptions) (watch.Interface, error) {
	               panic("mock out the Watch method")
            },
        }

        // use mockedGitModuleClient in code that requires GitModuleClient
        // and then make assertions.

    }

func (*GitModuleClientMock) Create

func (mock *GitModuleClientMock) Create(in1 *v1a.GitModule) (*v1a.GitModule, error)

Create calls CreateFunc.

func (*GitModuleClientMock) CreateCalls

func (mock *GitModuleClientMock) CreateCalls() []struct {
	In1 *v1a.GitModule
}

CreateCalls gets all the calls that were made to Create. Check the length with:

len(mockedGitModuleClient.CreateCalls())

func (*GitModuleClientMock) Delete

func (mock *GitModuleClientMock) Delete(namespace string, name string, options *v1b.DeleteOptions) error

Delete calls DeleteFunc.

func (*GitModuleClientMock) DeleteCalls

func (mock *GitModuleClientMock) DeleteCalls() []struct {
	Namespace string
	Name      string
	Options   *v1b.DeleteOptions
}

DeleteCalls gets all the calls that were made to Delete. Check the length with:

len(mockedGitModuleClient.DeleteCalls())

func (*GitModuleClientMock) Get

func (mock *GitModuleClientMock) Get(namespace string, name string, options v1b.GetOptions) (*v1a.GitModule, error)

Get calls GetFunc.

func (*GitModuleClientMock) GetCalls

func (mock *GitModuleClientMock) GetCalls() []struct {
	Namespace string
	Name      string
	Options   v1b.GetOptions
}

GetCalls gets all the calls that were made to Get. Check the length with:

len(mockedGitModuleClient.GetCalls())

func (*GitModuleClientMock) List

func (mock *GitModuleClientMock) List(namespace string, opts v1b.ListOptions) (*v1a.GitModuleList, error)

List calls ListFunc.

func (*GitModuleClientMock) ListCalls

func (mock *GitModuleClientMock) ListCalls() []struct {
	Namespace string
	Opts      v1b.ListOptions
}

ListCalls gets all the calls that were made to List. Check the length with:

len(mockedGitModuleClient.ListCalls())

func (*GitModuleClientMock) Patch

func (mock *GitModuleClientMock) Patch(namespace string, name string, pt types.PatchType, data []byte, subresources ...string) (*v1a.GitModule, error)

Patch calls PatchFunc.

func (*GitModuleClientMock) PatchCalls

func (mock *GitModuleClientMock) 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(mockedGitModuleClient.PatchCalls())

func (*GitModuleClientMock) Update

func (mock *GitModuleClientMock) Update(in1 *v1a.GitModule) (*v1a.GitModule, error)

Update calls UpdateFunc.

func (*GitModuleClientMock) UpdateCalls

func (mock *GitModuleClientMock) UpdateCalls() []struct {
	In1 *v1a.GitModule
}

UpdateCalls gets all the calls that were made to Update. Check the length with:

len(mockedGitModuleClient.UpdateCalls())

func (*GitModuleClientMock) UpdateStatus

func (mock *GitModuleClientMock) UpdateStatus(in1 *v1a.GitModule) (*v1a.GitModule, error)

UpdateStatus calls UpdateStatusFunc.

func (*GitModuleClientMock) UpdateStatusCalls

func (mock *GitModuleClientMock) UpdateStatusCalls() []struct {
	In1 *v1a.GitModule
}

UpdateStatusCalls gets all the calls that were made to UpdateStatus. Check the length with:

len(mockedGitModuleClient.UpdateStatusCalls())

func (*GitModuleClientMock) Watch

func (mock *GitModuleClientMock) Watch(namespace string, opts v1b.ListOptions) (watch.Interface, error)

Watch calls WatchFunc.

func (*GitModuleClientMock) WatchCalls

func (mock *GitModuleClientMock) WatchCalls() []struct {
	Namespace string
	Opts      v1b.ListOptions
}

WatchCalls gets all the calls that were made to Watch. Check the length with:

len(mockedGitModuleClient.WatchCalls())

type GitModuleControllerMock

type GitModuleControllerMock 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.GitModuleCache

	// CreateFunc mocks the Create method.
	CreateFunc func(in1 *v1a.GitModule) (*v1a.GitModule, 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.GitModule, 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.GitModuleList, error)

	// OnChangeFunc mocks the OnChange method.
	OnChangeFunc func(ctx context.Context, name string, sync v1.GitModuleHandler)

	// OnRemoveFunc mocks the OnRemove method.
	OnRemoveFunc func(ctx context.Context, name string, sync v1.GitModuleHandler)

	// PatchFunc mocks the Patch method.
	PatchFunc func(namespace string, name string, pt types.PatchType, data []byte, subresources ...string) (*v1a.GitModule, error)

	// UpdateFunc mocks the Update method.
	UpdateFunc func(in1 *v1a.GitModule) (*v1a.GitModule, error)

	// UpdateStatusFunc mocks the UpdateStatus method.
	UpdateStatusFunc func(in1 *v1a.GitModule) (*v1a.GitModule, 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
}

GitModuleControllerMock is a mock implementation of GitModuleController.

    func TestSomethingThatUsesGitModuleController(t *testing.T) {

        // make and configure a mocked GitModuleController
        mockedGitModuleController := &GitModuleControllerMock{
            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.GitModuleCache {
	               panic("mock out the Cache method")
            },
            CreateFunc: func(in1 *v1a.GitModule) (*v1a.GitModule, 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.GitModule, 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.GitModuleList, error) {
	               panic("mock out the List method")
            },
            OnChangeFunc: func(ctx context.Context, name string, sync v1.GitModuleHandler)  {
	               panic("mock out the OnChange method")
            },
            OnRemoveFunc: func(ctx context.Context, name string, sync v1.GitModuleHandler)  {
	               panic("mock out the OnRemove method")
            },
            PatchFunc: func(namespace string, name string, pt types.PatchType, data []byte, subresources ...string) (*v1a.GitModule, error) {
	               panic("mock out the Patch method")
            },
            UpdateFunc: func(in1 *v1a.GitModule) (*v1a.GitModule, error) {
	               panic("mock out the Update method")
            },
            UpdateStatusFunc: func(in1 *v1a.GitModule) (*v1a.GitModule, error) {
	               panic("mock out the UpdateStatus 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 mockedGitModuleController in code that requires GitModuleController
        // and then make assertions.

    }

func (*GitModuleControllerMock) AddGenericHandler

func (mock *GitModuleControllerMock) AddGenericHandler(ctx context.Context, name string, handler generic.Handler)

AddGenericHandler calls AddGenericHandlerFunc.

func (*GitModuleControllerMock) AddGenericHandlerCalls

func (mock *GitModuleControllerMock) 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(mockedGitModuleController.AddGenericHandlerCalls())

func (*GitModuleControllerMock) AddGenericRemoveHandler

func (mock *GitModuleControllerMock) AddGenericRemoveHandler(ctx context.Context, name string, handler generic.Handler)

AddGenericRemoveHandler calls AddGenericRemoveHandlerFunc.

func (*GitModuleControllerMock) AddGenericRemoveHandlerCalls

func (mock *GitModuleControllerMock) 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(mockedGitModuleController.AddGenericRemoveHandlerCalls())

func (*GitModuleControllerMock) Cache

Cache calls CacheFunc.

func (*GitModuleControllerMock) CacheCalls

func (mock *GitModuleControllerMock) CacheCalls() []struct {
}

CacheCalls gets all the calls that were made to Cache. Check the length with:

len(mockedGitModuleController.CacheCalls())

func (*GitModuleControllerMock) Create

func (mock *GitModuleControllerMock) Create(in1 *v1a.GitModule) (*v1a.GitModule, error)

Create calls CreateFunc.

func (*GitModuleControllerMock) CreateCalls

func (mock *GitModuleControllerMock) CreateCalls() []struct {
	In1 *v1a.GitModule
}

CreateCalls gets all the calls that were made to Create. Check the length with:

len(mockedGitModuleController.CreateCalls())

func (*GitModuleControllerMock) Delete

func (mock *GitModuleControllerMock) Delete(namespace string, name string, options *v1b.DeleteOptions) error

Delete calls DeleteFunc.

func (*GitModuleControllerMock) DeleteCalls

func (mock *GitModuleControllerMock) DeleteCalls() []struct {
	Namespace string
	Name      string
	Options   *v1b.DeleteOptions
}

DeleteCalls gets all the calls that were made to Delete. Check the length with:

len(mockedGitModuleController.DeleteCalls())

func (*GitModuleControllerMock) Enqueue

func (mock *GitModuleControllerMock) Enqueue(namespace string, name string)

Enqueue calls EnqueueFunc.

func (*GitModuleControllerMock) EnqueueCalls

func (mock *GitModuleControllerMock) EnqueueCalls() []struct {
	Namespace string
	Name      string
}

EnqueueCalls gets all the calls that were made to Enqueue. Check the length with:

len(mockedGitModuleController.EnqueueCalls())

func (*GitModuleControllerMock) Get

func (mock *GitModuleControllerMock) Get(namespace string, name string, options v1b.GetOptions) (*v1a.GitModule, error)

Get calls GetFunc.

func (*GitModuleControllerMock) GetCalls

func (mock *GitModuleControllerMock) GetCalls() []struct {
	Namespace string
	Name      string
	Options   v1b.GetOptions
}

GetCalls gets all the calls that were made to Get. Check the length with:

len(mockedGitModuleController.GetCalls())

func (*GitModuleControllerMock) GroupVersionKind

func (mock *GitModuleControllerMock) GroupVersionKind() schema.GroupVersionKind

GroupVersionKind calls GroupVersionKindFunc.

func (*GitModuleControllerMock) GroupVersionKindCalls

func (mock *GitModuleControllerMock) GroupVersionKindCalls() []struct {
}

GroupVersionKindCalls gets all the calls that were made to GroupVersionKind. Check the length with:

len(mockedGitModuleController.GroupVersionKindCalls())

func (*GitModuleControllerMock) Informer

Informer calls InformerFunc.

func (*GitModuleControllerMock) InformerCalls

func (mock *GitModuleControllerMock) InformerCalls() []struct {
}

InformerCalls gets all the calls that were made to Informer. Check the length with:

len(mockedGitModuleController.InformerCalls())

func (*GitModuleControllerMock) List

func (mock *GitModuleControllerMock) List(namespace string, opts v1b.ListOptions) (*v1a.GitModuleList, error)

List calls ListFunc.

func (*GitModuleControllerMock) ListCalls

func (mock *GitModuleControllerMock) ListCalls() []struct {
	Namespace string
	Opts      v1b.ListOptions
}

ListCalls gets all the calls that were made to List. Check the length with:

len(mockedGitModuleController.ListCalls())

func (*GitModuleControllerMock) OnChange

func (mock *GitModuleControllerMock) OnChange(ctx context.Context, name string, sync v1.GitModuleHandler)

OnChange calls OnChangeFunc.

func (*GitModuleControllerMock) OnChangeCalls

func (mock *GitModuleControllerMock) OnChangeCalls() []struct {
	Ctx  context.Context
	Name string
	Sync v1.GitModuleHandler
}

OnChangeCalls gets all the calls that were made to OnChange. Check the length with:

len(mockedGitModuleController.OnChangeCalls())

func (*GitModuleControllerMock) OnRemove

func (mock *GitModuleControllerMock) OnRemove(ctx context.Context, name string, sync v1.GitModuleHandler)

OnRemove calls OnRemoveFunc.

func (*GitModuleControllerMock) OnRemoveCalls

func (mock *GitModuleControllerMock) OnRemoveCalls() []struct {
	Ctx  context.Context
	Name string
	Sync v1.GitModuleHandler
}

OnRemoveCalls gets all the calls that were made to OnRemove. Check the length with:

len(mockedGitModuleController.OnRemoveCalls())

func (*GitModuleControllerMock) Patch

func (mock *GitModuleControllerMock) Patch(namespace string, name string, pt types.PatchType, data []byte, subresources ...string) (*v1a.GitModule, error)

Patch calls PatchFunc.

func (*GitModuleControllerMock) PatchCalls

func (mock *GitModuleControllerMock) 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(mockedGitModuleController.PatchCalls())

func (*GitModuleControllerMock) Update

func (mock *GitModuleControllerMock) Update(in1 *v1a.GitModule) (*v1a.GitModule, error)

Update calls UpdateFunc.

func (*GitModuleControllerMock) UpdateCalls

func (mock *GitModuleControllerMock) UpdateCalls() []struct {
	In1 *v1a.GitModule
}

UpdateCalls gets all the calls that were made to Update. Check the length with:

len(mockedGitModuleController.UpdateCalls())

func (*GitModuleControllerMock) UpdateStatus

func (mock *GitModuleControllerMock) UpdateStatus(in1 *v1a.GitModule) (*v1a.GitModule, error)

UpdateStatus calls UpdateStatusFunc.

func (*GitModuleControllerMock) UpdateStatusCalls

func (mock *GitModuleControllerMock) UpdateStatusCalls() []struct {
	In1 *v1a.GitModule
}

UpdateStatusCalls gets all the calls that were made to UpdateStatus. Check the length with:

len(mockedGitModuleController.UpdateStatusCalls())

func (*GitModuleControllerMock) Updater

func (mock *GitModuleControllerMock) Updater() generic.Updater

Updater calls UpdaterFunc.

func (*GitModuleControllerMock) UpdaterCalls

func (mock *GitModuleControllerMock) UpdaterCalls() []struct {
}

UpdaterCalls gets all the calls that were made to Updater. Check the length with:

len(mockedGitModuleController.UpdaterCalls())

func (*GitModuleControllerMock) Watch

func (mock *GitModuleControllerMock) Watch(namespace string, opts v1b.ListOptions) (watch.Interface, error)

Watch calls WatchFunc.

func (*GitModuleControllerMock) WatchCalls

func (mock *GitModuleControllerMock) WatchCalls() []struct {
	Namespace string
	Opts      v1b.ListOptions
}

WatchCalls gets all the calls that were made to Watch. Check the length with:

len(mockedGitModuleController.WatchCalls())

Source Files

  • zz_generated_git_module_mock.go

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL