fakes

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 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 CustomResourceDefinitionCacheMock

type CustomResourceDefinitionCacheMock struct {
	// AddIndexerFunc mocks the AddIndexer method.
	AddIndexerFunc func(indexName string, indexer v1beta1.CustomResourceDefinitionIndexer)

	// GetFunc mocks the Get method.
	GetFunc func(name string) (*v1beta1a.CustomResourceDefinition, error)

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

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

CustomResourceDefinitionCacheMock is a mock implementation of CustomResourceDefinitionCache.

    func TestSomethingThatUsesCustomResourceDefinitionCache(t *testing.T) {

        // make and configure a mocked CustomResourceDefinitionCache
        mockedCustomResourceDefinitionCache := &CustomResourceDefinitionCacheMock{
            AddIndexerFunc: func(indexName string, indexer v1beta1.CustomResourceDefinitionIndexer)  {
	               panic("mock out the AddIndexer method")
            },
            GetFunc: func(name string) (*v1beta1a.CustomResourceDefinition, error) {
	               panic("mock out the Get method")
            },
            GetByIndexFunc: func(indexName string, key string) ([]*v1beta1a.CustomResourceDefinition, error) {
	               panic("mock out the GetByIndex method")
            },
            ListFunc: func(selector labels.Selector) ([]*v1beta1a.CustomResourceDefinition, error) {
	               panic("mock out the List method")
            },
        }

        // use mockedCustomResourceDefinitionCache in code that requires CustomResourceDefinitionCache
        // and then make assertions.

    }

func (*CustomResourceDefinitionCacheMock) AddIndexer

AddIndexer calls AddIndexerFunc.

func (*CustomResourceDefinitionCacheMock) AddIndexerCalls

func (mock *CustomResourceDefinitionCacheMock) AddIndexerCalls() []struct {
	IndexName string
	Indexer   v1beta1.CustomResourceDefinitionIndexer
}

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

len(mockedCustomResourceDefinitionCache.AddIndexerCalls())

func (*CustomResourceDefinitionCacheMock) Get

Get calls GetFunc.

func (*CustomResourceDefinitionCacheMock) GetByIndex

GetByIndex calls GetByIndexFunc.

func (*CustomResourceDefinitionCacheMock) GetByIndexCalls

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

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

len(mockedCustomResourceDefinitionCache.GetByIndexCalls())

func (*CustomResourceDefinitionCacheMock) GetCalls

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

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

len(mockedCustomResourceDefinitionCache.GetCalls())

func (*CustomResourceDefinitionCacheMock) List

List calls ListFunc.

func (*CustomResourceDefinitionCacheMock) ListCalls

func (mock *CustomResourceDefinitionCacheMock) ListCalls() []struct {
	Selector labels.Selector
}

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

len(mockedCustomResourceDefinitionCache.ListCalls())

type CustomResourceDefinitionClientMock

type CustomResourceDefinitionClientMock struct {
	// CreateFunc mocks the Create method.
	CreateFunc func(in1 *v1beta1a.CustomResourceDefinition) (*v1beta1a.CustomResourceDefinition, error)

	// DeleteFunc mocks the Delete method.
	DeleteFunc func(name string, options *v1.DeleteOptions) error

	// GetFunc mocks the Get method.
	GetFunc func(name string, options v1.GetOptions) (*v1beta1a.CustomResourceDefinition, error)

	// ListFunc mocks the List method.
	ListFunc func(opts v1.ListOptions) (*v1beta1a.CustomResourceDefinitionList, error)

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

	// UpdateFunc mocks the Update method.
	UpdateFunc func(in1 *v1beta1a.CustomResourceDefinition) (*v1beta1a.CustomResourceDefinition, error)

	// UpdateStatusFunc mocks the UpdateStatus method.
	UpdateStatusFunc func(in1 *v1beta1a.CustomResourceDefinition) (*v1beta1a.CustomResourceDefinition, error)

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

CustomResourceDefinitionClientMock is a mock implementation of CustomResourceDefinitionClient.

    func TestSomethingThatUsesCustomResourceDefinitionClient(t *testing.T) {

        // make and configure a mocked CustomResourceDefinitionClient
        mockedCustomResourceDefinitionClient := &CustomResourceDefinitionClientMock{
            CreateFunc: func(in1 *v1beta1a.CustomResourceDefinition) (*v1beta1a.CustomResourceDefinition, error) {
	               panic("mock out the Create method")
            },
            DeleteFunc: func(name string, options *v1.DeleteOptions) error {
	               panic("mock out the Delete method")
            },
            GetFunc: func(name string, options v1.GetOptions) (*v1beta1a.CustomResourceDefinition, error) {
	               panic("mock out the Get method")
            },
            ListFunc: func(opts v1.ListOptions) (*v1beta1a.CustomResourceDefinitionList, error) {
	               panic("mock out the List method")
            },
            PatchFunc: func(name string, pt types.PatchType, data []byte, subresources ...string) (*v1beta1a.CustomResourceDefinition, error) {
	               panic("mock out the Patch method")
            },
            UpdateFunc: func(in1 *v1beta1a.CustomResourceDefinition) (*v1beta1a.CustomResourceDefinition, error) {
	               panic("mock out the Update method")
            },
            UpdateStatusFunc: func(in1 *v1beta1a.CustomResourceDefinition) (*v1beta1a.CustomResourceDefinition, error) {
	               panic("mock out the UpdateStatus method")
            },
            WatchFunc: func(opts v1.ListOptions) (watch.Interface, error) {
	               panic("mock out the Watch method")
            },
        }

        // use mockedCustomResourceDefinitionClient in code that requires CustomResourceDefinitionClient
        // and then make assertions.

    }

func (*CustomResourceDefinitionClientMock) Create

Create calls CreateFunc.

func (*CustomResourceDefinitionClientMock) CreateCalls

func (mock *CustomResourceDefinitionClientMock) CreateCalls() []struct {
	In1 *v1beta1a.CustomResourceDefinition
}

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

len(mockedCustomResourceDefinitionClient.CreateCalls())

func (*CustomResourceDefinitionClientMock) Delete

func (mock *CustomResourceDefinitionClientMock) Delete(name string, options *v1.DeleteOptions) error

Delete calls DeleteFunc.

func (*CustomResourceDefinitionClientMock) DeleteCalls

func (mock *CustomResourceDefinitionClientMock) DeleteCalls() []struct {
	Name    string
	Options *v1.DeleteOptions
}

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

len(mockedCustomResourceDefinitionClient.DeleteCalls())

func (*CustomResourceDefinitionClientMock) Get

Get calls GetFunc.

func (*CustomResourceDefinitionClientMock) GetCalls

func (mock *CustomResourceDefinitionClientMock) GetCalls() []struct {
	Name    string
	Options v1.GetOptions
}

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

len(mockedCustomResourceDefinitionClient.GetCalls())

func (*CustomResourceDefinitionClientMock) List

List calls ListFunc.

func (*CustomResourceDefinitionClientMock) ListCalls

func (mock *CustomResourceDefinitionClientMock) ListCalls() []struct {
	Opts v1.ListOptions
}

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

len(mockedCustomResourceDefinitionClient.ListCalls())

func (*CustomResourceDefinitionClientMock) Patch

func (mock *CustomResourceDefinitionClientMock) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (*v1beta1a.CustomResourceDefinition, error)

Patch calls PatchFunc.

func (*CustomResourceDefinitionClientMock) PatchCalls

func (mock *CustomResourceDefinitionClientMock) PatchCalls() []struct {
	Name         string
	Pt           types.PatchType
	Data         []byte
	Subresources []string
}

PatchCalls gets all the calls that were made to Patch. Check the length with:

len(mockedCustomResourceDefinitionClient.PatchCalls())

func (*CustomResourceDefinitionClientMock) Update

Update calls UpdateFunc.

func (*CustomResourceDefinitionClientMock) UpdateCalls

func (mock *CustomResourceDefinitionClientMock) UpdateCalls() []struct {
	In1 *v1beta1a.CustomResourceDefinition
}

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

len(mockedCustomResourceDefinitionClient.UpdateCalls())

func (*CustomResourceDefinitionClientMock) UpdateStatus

UpdateStatus calls UpdateStatusFunc.

func (*CustomResourceDefinitionClientMock) UpdateStatusCalls

func (mock *CustomResourceDefinitionClientMock) UpdateStatusCalls() []struct {
	In1 *v1beta1a.CustomResourceDefinition
}

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

len(mockedCustomResourceDefinitionClient.UpdateStatusCalls())

func (*CustomResourceDefinitionClientMock) Watch

Watch calls WatchFunc.

func (*CustomResourceDefinitionClientMock) WatchCalls

func (mock *CustomResourceDefinitionClientMock) WatchCalls() []struct {
	Opts v1.ListOptions
}

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

len(mockedCustomResourceDefinitionClient.WatchCalls())

type CustomResourceDefinitionControllerMock

type CustomResourceDefinitionControllerMock 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() v1beta1.CustomResourceDefinitionCache

	// CreateFunc mocks the Create method.
	CreateFunc func(in1 *v1beta1a.CustomResourceDefinition) (*v1beta1a.CustomResourceDefinition, error)

	// DeleteFunc mocks the Delete method.
	DeleteFunc func(name string, options *v1.DeleteOptions) error

	// EnqueueFunc mocks the Enqueue method.
	EnqueueFunc func(name string)

	// GetFunc mocks the Get method.
	GetFunc func(name string, options v1.GetOptions) (*v1beta1a.CustomResourceDefinition, 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(opts v1.ListOptions) (*v1beta1a.CustomResourceDefinitionList, error)

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

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

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

	// UpdateFunc mocks the Update method.
	UpdateFunc func(in1 *v1beta1a.CustomResourceDefinition) (*v1beta1a.CustomResourceDefinition, error)

	// UpdateStatusFunc mocks the UpdateStatus method.
	UpdateStatusFunc func(in1 *v1beta1a.CustomResourceDefinition) (*v1beta1a.CustomResourceDefinition, error)

	// UpdaterFunc mocks the Updater method.
	UpdaterFunc func() generic.Updater

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

CustomResourceDefinitionControllerMock is a mock implementation of CustomResourceDefinitionController.

    func TestSomethingThatUsesCustomResourceDefinitionController(t *testing.T) {

        // make and configure a mocked CustomResourceDefinitionController
        mockedCustomResourceDefinitionController := &CustomResourceDefinitionControllerMock{
            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() v1beta1.CustomResourceDefinitionCache {
	               panic("mock out the Cache method")
            },
            CreateFunc: func(in1 *v1beta1a.CustomResourceDefinition) (*v1beta1a.CustomResourceDefinition, error) {
	               panic("mock out the Create method")
            },
            DeleteFunc: func(name string, options *v1.DeleteOptions) error {
	               panic("mock out the Delete method")
            },
            EnqueueFunc: func(name string)  {
	               panic("mock out the Enqueue method")
            },
            GetFunc: func(name string, options v1.GetOptions) (*v1beta1a.CustomResourceDefinition, 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(opts v1.ListOptions) (*v1beta1a.CustomResourceDefinitionList, error) {
	               panic("mock out the List method")
            },
            OnChangeFunc: func(ctx context.Context, name string, sync v1beta1.CustomResourceDefinitionHandler)  {
	               panic("mock out the OnChange method")
            },
            OnRemoveFunc: func(ctx context.Context, name string, sync v1beta1.CustomResourceDefinitionHandler)  {
	               panic("mock out the OnRemove method")
            },
            PatchFunc: func(name string, pt types.PatchType, data []byte, subresources ...string) (*v1beta1a.CustomResourceDefinition, error) {
	               panic("mock out the Patch method")
            },
            UpdateFunc: func(in1 *v1beta1a.CustomResourceDefinition) (*v1beta1a.CustomResourceDefinition, error) {
	               panic("mock out the Update method")
            },
            UpdateStatusFunc: func(in1 *v1beta1a.CustomResourceDefinition) (*v1beta1a.CustomResourceDefinition, error) {
	               panic("mock out the UpdateStatus method")
            },
            UpdaterFunc: func() generic.Updater {
	               panic("mock out the Updater method")
            },
            WatchFunc: func(opts v1.ListOptions) (watch.Interface, error) {
	               panic("mock out the Watch method")
            },
        }

        // use mockedCustomResourceDefinitionController in code that requires CustomResourceDefinitionController
        // and then make assertions.

    }

func (*CustomResourceDefinitionControllerMock) AddGenericHandler

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

AddGenericHandler calls AddGenericHandlerFunc.

func (*CustomResourceDefinitionControllerMock) AddGenericHandlerCalls

func (mock *CustomResourceDefinitionControllerMock) 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(mockedCustomResourceDefinitionController.AddGenericHandlerCalls())

func (*CustomResourceDefinitionControllerMock) AddGenericRemoveHandler

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

AddGenericRemoveHandler calls AddGenericRemoveHandlerFunc.

func (*CustomResourceDefinitionControllerMock) AddGenericRemoveHandlerCalls

func (mock *CustomResourceDefinitionControllerMock) 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(mockedCustomResourceDefinitionController.AddGenericRemoveHandlerCalls())

func (*CustomResourceDefinitionControllerMock) Cache

Cache calls CacheFunc.

func (*CustomResourceDefinitionControllerMock) CacheCalls

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

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

len(mockedCustomResourceDefinitionController.CacheCalls())

func (*CustomResourceDefinitionControllerMock) Create

Create calls CreateFunc.

func (*CustomResourceDefinitionControllerMock) CreateCalls

func (mock *CustomResourceDefinitionControllerMock) CreateCalls() []struct {
	In1 *v1beta1a.CustomResourceDefinition
}

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

len(mockedCustomResourceDefinitionController.CreateCalls())

func (*CustomResourceDefinitionControllerMock) Delete

Delete calls DeleteFunc.

func (*CustomResourceDefinitionControllerMock) DeleteCalls

func (mock *CustomResourceDefinitionControllerMock) DeleteCalls() []struct {
	Name    string
	Options *v1.DeleteOptions
}

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

len(mockedCustomResourceDefinitionController.DeleteCalls())

func (*CustomResourceDefinitionControllerMock) Enqueue

func (mock *CustomResourceDefinitionControllerMock) Enqueue(name string)

Enqueue calls EnqueueFunc.

func (*CustomResourceDefinitionControllerMock) EnqueueCalls

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

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

len(mockedCustomResourceDefinitionController.EnqueueCalls())

func (*CustomResourceDefinitionControllerMock) Get

Get calls GetFunc.

func (*CustomResourceDefinitionControllerMock) GetCalls

func (mock *CustomResourceDefinitionControllerMock) GetCalls() []struct {
	Name    string
	Options v1.GetOptions
}

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

len(mockedCustomResourceDefinitionController.GetCalls())

func (*CustomResourceDefinitionControllerMock) GroupVersionKind

GroupVersionKind calls GroupVersionKindFunc.

func (*CustomResourceDefinitionControllerMock) GroupVersionKindCalls

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

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

len(mockedCustomResourceDefinitionController.GroupVersionKindCalls())

func (*CustomResourceDefinitionControllerMock) Informer

Informer calls InformerFunc.

func (*CustomResourceDefinitionControllerMock) InformerCalls

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

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

len(mockedCustomResourceDefinitionController.InformerCalls())

func (*CustomResourceDefinitionControllerMock) List

List calls ListFunc.

func (*CustomResourceDefinitionControllerMock) ListCalls

func (mock *CustomResourceDefinitionControllerMock) ListCalls() []struct {
	Opts v1.ListOptions
}

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

len(mockedCustomResourceDefinitionController.ListCalls())

func (*CustomResourceDefinitionControllerMock) OnChange

OnChange calls OnChangeFunc.

func (*CustomResourceDefinitionControllerMock) OnChangeCalls

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

len(mockedCustomResourceDefinitionController.OnChangeCalls())

func (*CustomResourceDefinitionControllerMock) OnRemove

OnRemove calls OnRemoveFunc.

func (*CustomResourceDefinitionControllerMock) OnRemoveCalls

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

len(mockedCustomResourceDefinitionController.OnRemoveCalls())

func (*CustomResourceDefinitionControllerMock) Patch

Patch calls PatchFunc.

func (*CustomResourceDefinitionControllerMock) PatchCalls

func (mock *CustomResourceDefinitionControllerMock) PatchCalls() []struct {
	Name         string
	Pt           types.PatchType
	Data         []byte
	Subresources []string
}

PatchCalls gets all the calls that were made to Patch. Check the length with:

len(mockedCustomResourceDefinitionController.PatchCalls())

func (*CustomResourceDefinitionControllerMock) Update

Update calls UpdateFunc.

func (*CustomResourceDefinitionControllerMock) UpdateCalls

func (mock *CustomResourceDefinitionControllerMock) UpdateCalls() []struct {
	In1 *v1beta1a.CustomResourceDefinition
}

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

len(mockedCustomResourceDefinitionController.UpdateCalls())

func (*CustomResourceDefinitionControllerMock) UpdateStatus

UpdateStatus calls UpdateStatusFunc.

func (*CustomResourceDefinitionControllerMock) UpdateStatusCalls

func (mock *CustomResourceDefinitionControllerMock) UpdateStatusCalls() []struct {
	In1 *v1beta1a.CustomResourceDefinition
}

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

len(mockedCustomResourceDefinitionController.UpdateStatusCalls())

func (*CustomResourceDefinitionControllerMock) Updater

Updater calls UpdaterFunc.

func (*CustomResourceDefinitionControllerMock) UpdaterCalls

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

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

len(mockedCustomResourceDefinitionController.UpdaterCalls())

func (*CustomResourceDefinitionControllerMock) Watch

Watch calls WatchFunc.

func (*CustomResourceDefinitionControllerMock) WatchCalls

func (mock *CustomResourceDefinitionControllerMock) WatchCalls() []struct {
	Opts v1.ListOptions
}

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

len(mockedCustomResourceDefinitionController.WatchCalls())

Jump to

Keyboard shortcuts

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