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 ClusterDomainCacheMock

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

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

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

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

ClusterDomainCacheMock is a mock implementation of ClusterDomainCache.

    func TestSomethingThatUsesClusterDomainCache(t *testing.T) {

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

        // use mockedClusterDomainCache in code that requires ClusterDomainCache
        // and then make assertions.

    }

func (*ClusterDomainCacheMock) AddIndexer

func (mock *ClusterDomainCacheMock) AddIndexer(indexName string, indexer v1.ClusterDomainIndexer)

AddIndexer calls AddIndexerFunc.

func (*ClusterDomainCacheMock) AddIndexerCalls

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

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

len(mockedClusterDomainCache.AddIndexerCalls())

func (*ClusterDomainCacheMock) Get

func (mock *ClusterDomainCacheMock) Get(namespace string, name string) (*v1a.ClusterDomain, error)

Get calls GetFunc.

func (*ClusterDomainCacheMock) GetByIndex

func (mock *ClusterDomainCacheMock) GetByIndex(indexName string, key string) ([]*v1a.ClusterDomain, error)

GetByIndex calls GetByIndexFunc.

func (*ClusterDomainCacheMock) GetByIndexCalls

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

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

len(mockedClusterDomainCache.GetByIndexCalls())

func (*ClusterDomainCacheMock) GetCalls

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

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

len(mockedClusterDomainCache.GetCalls())

func (*ClusterDomainCacheMock) List

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

List calls ListFunc.

func (*ClusterDomainCacheMock) ListCalls

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

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

len(mockedClusterDomainCache.ListCalls())

type ClusterDomainClientMock

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

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

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

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

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

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

ClusterDomainClientMock is a mock implementation of ClusterDomainClient.

    func TestSomethingThatUsesClusterDomainClient(t *testing.T) {

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

        // use mockedClusterDomainClient in code that requires ClusterDomainClient
        // and then make assertions.

    }

func (*ClusterDomainClientMock) Create

Create calls CreateFunc.

func (*ClusterDomainClientMock) CreateCalls

func (mock *ClusterDomainClientMock) CreateCalls() []struct {
	In1 *v1a.ClusterDomain
}

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

len(mockedClusterDomainClient.CreateCalls())

func (*ClusterDomainClientMock) Delete

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

Delete calls DeleteFunc.

func (*ClusterDomainClientMock) DeleteCalls

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

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

len(mockedClusterDomainClient.DeleteCalls())

func (*ClusterDomainClientMock) Get

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

Get calls GetFunc.

func (*ClusterDomainClientMock) GetCalls

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

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

len(mockedClusterDomainClient.GetCalls())

func (*ClusterDomainClientMock) List

func (mock *ClusterDomainClientMock) List(namespace string, opts v1b.ListOptions) (*v1a.ClusterDomainList, error)

List calls ListFunc.

func (*ClusterDomainClientMock) ListCalls

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

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

len(mockedClusterDomainClient.ListCalls())

func (*ClusterDomainClientMock) Patch

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

Patch calls PatchFunc.

func (*ClusterDomainClientMock) PatchCalls

func (mock *ClusterDomainClientMock) 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(mockedClusterDomainClient.PatchCalls())

func (*ClusterDomainClientMock) Update

Update calls UpdateFunc.

func (*ClusterDomainClientMock) UpdateCalls

func (mock *ClusterDomainClientMock) UpdateCalls() []struct {
	In1 *v1a.ClusterDomain
}

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

len(mockedClusterDomainClient.UpdateCalls())

func (*ClusterDomainClientMock) UpdateStatus

func (mock *ClusterDomainClientMock) UpdateStatus(in1 *v1a.ClusterDomain) (*v1a.ClusterDomain, error)

UpdateStatus calls UpdateStatusFunc.

func (*ClusterDomainClientMock) UpdateStatusCalls

func (mock *ClusterDomainClientMock) UpdateStatusCalls() []struct {
	In1 *v1a.ClusterDomain
}

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

len(mockedClusterDomainClient.UpdateStatusCalls())

func (*ClusterDomainClientMock) Watch

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

Watch calls WatchFunc.

func (*ClusterDomainClientMock) WatchCalls

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

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

len(mockedClusterDomainClient.WatchCalls())

type ClusterDomainControllerMock

type ClusterDomainControllerMock 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.ClusterDomainCache

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

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

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

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

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

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

ClusterDomainControllerMock is a mock implementation of ClusterDomainController.

    func TestSomethingThatUsesClusterDomainController(t *testing.T) {

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

    }

func (*ClusterDomainControllerMock) AddGenericHandler

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

AddGenericHandler calls AddGenericHandlerFunc.

func (*ClusterDomainControllerMock) AddGenericHandlerCalls

func (mock *ClusterDomainControllerMock) 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(mockedClusterDomainController.AddGenericHandlerCalls())

func (*ClusterDomainControllerMock) AddGenericRemoveHandler

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

AddGenericRemoveHandler calls AddGenericRemoveHandlerFunc.

func (*ClusterDomainControllerMock) AddGenericRemoveHandlerCalls

func (mock *ClusterDomainControllerMock) 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(mockedClusterDomainController.AddGenericRemoveHandlerCalls())

func (*ClusterDomainControllerMock) Cache

Cache calls CacheFunc.

func (*ClusterDomainControllerMock) CacheCalls

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

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

len(mockedClusterDomainController.CacheCalls())

func (*ClusterDomainControllerMock) Create

Create calls CreateFunc.

func (*ClusterDomainControllerMock) CreateCalls

func (mock *ClusterDomainControllerMock) CreateCalls() []struct {
	In1 *v1a.ClusterDomain
}

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

len(mockedClusterDomainController.CreateCalls())

func (*ClusterDomainControllerMock) Delete

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

Delete calls DeleteFunc.

func (*ClusterDomainControllerMock) DeleteCalls

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

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

len(mockedClusterDomainController.DeleteCalls())

func (*ClusterDomainControllerMock) Enqueue

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

Enqueue calls EnqueueFunc.

func (*ClusterDomainControllerMock) EnqueueCalls

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

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

len(mockedClusterDomainController.EnqueueCalls())

func (*ClusterDomainControllerMock) Get

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

Get calls GetFunc.

func (*ClusterDomainControllerMock) GetCalls

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

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

len(mockedClusterDomainController.GetCalls())

func (*ClusterDomainControllerMock) GroupVersionKind

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

GroupVersionKind calls GroupVersionKindFunc.

func (*ClusterDomainControllerMock) GroupVersionKindCalls

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

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

len(mockedClusterDomainController.GroupVersionKindCalls())

func (*ClusterDomainControllerMock) Informer

Informer calls InformerFunc.

func (*ClusterDomainControllerMock) InformerCalls

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

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

len(mockedClusterDomainController.InformerCalls())

func (*ClusterDomainControllerMock) List

List calls ListFunc.

func (*ClusterDomainControllerMock) ListCalls

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

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

len(mockedClusterDomainController.ListCalls())

func (*ClusterDomainControllerMock) OnChange

func (mock *ClusterDomainControllerMock) OnChange(ctx context.Context, name string, sync v1.ClusterDomainHandler)

OnChange calls OnChangeFunc.

func (*ClusterDomainControllerMock) OnChangeCalls

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

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

len(mockedClusterDomainController.OnChangeCalls())

func (*ClusterDomainControllerMock) OnRemove

func (mock *ClusterDomainControllerMock) OnRemove(ctx context.Context, name string, sync v1.ClusterDomainHandler)

OnRemove calls OnRemoveFunc.

func (*ClusterDomainControllerMock) OnRemoveCalls

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

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

len(mockedClusterDomainController.OnRemoveCalls())

func (*ClusterDomainControllerMock) Patch

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

Patch calls PatchFunc.

func (*ClusterDomainControllerMock) PatchCalls

func (mock *ClusterDomainControllerMock) 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(mockedClusterDomainController.PatchCalls())

func (*ClusterDomainControllerMock) Update

Update calls UpdateFunc.

func (*ClusterDomainControllerMock) UpdateCalls

func (mock *ClusterDomainControllerMock) UpdateCalls() []struct {
	In1 *v1a.ClusterDomain
}

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

len(mockedClusterDomainController.UpdateCalls())

func (*ClusterDomainControllerMock) UpdateStatus

func (mock *ClusterDomainControllerMock) UpdateStatus(in1 *v1a.ClusterDomain) (*v1a.ClusterDomain, error)

UpdateStatus calls UpdateStatusFunc.

func (*ClusterDomainControllerMock) UpdateStatusCalls

func (mock *ClusterDomainControllerMock) UpdateStatusCalls() []struct {
	In1 *v1a.ClusterDomain
}

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

len(mockedClusterDomainController.UpdateStatusCalls())

func (*ClusterDomainControllerMock) Updater

Updater calls UpdaterFunc.

func (*ClusterDomainControllerMock) UpdaterCalls

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

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

len(mockedClusterDomainController.UpdaterCalls())

func (*ClusterDomainControllerMock) Watch

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

Watch calls WatchFunc.

func (*ClusterDomainControllerMock) WatchCalls

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

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

len(mockedClusterDomainController.WatchCalls())

type FeatureCacheMock

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

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

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

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

FeatureCacheMock is a mock implementation of FeatureCache.

    func TestSomethingThatUsesFeatureCache(t *testing.T) {

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

        // use mockedFeatureCache in code that requires FeatureCache
        // and then make assertions.

    }

func (*FeatureCacheMock) AddIndexer

func (mock *FeatureCacheMock) AddIndexer(indexName string, indexer v1.FeatureIndexer)

AddIndexer calls AddIndexerFunc.

func (*FeatureCacheMock) AddIndexerCalls

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

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

len(mockedFeatureCache.AddIndexerCalls())

func (*FeatureCacheMock) Get

func (mock *FeatureCacheMock) Get(namespace string, name string) (*v1a.Feature, error)

Get calls GetFunc.

func (*FeatureCacheMock) GetByIndex

func (mock *FeatureCacheMock) GetByIndex(indexName string, key string) ([]*v1a.Feature, error)

GetByIndex calls GetByIndexFunc.

func (*FeatureCacheMock) GetByIndexCalls

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

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

len(mockedFeatureCache.GetByIndexCalls())

func (*FeatureCacheMock) GetCalls

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

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

len(mockedFeatureCache.GetCalls())

func (*FeatureCacheMock) List

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

List calls ListFunc.

func (*FeatureCacheMock) ListCalls

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

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

len(mockedFeatureCache.ListCalls())

type FeatureClientMock

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

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

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

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

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

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

FeatureClientMock is a mock implementation of FeatureClient.

    func TestSomethingThatUsesFeatureClient(t *testing.T) {

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

        // use mockedFeatureClient in code that requires FeatureClient
        // and then make assertions.

    }

func (*FeatureClientMock) Create

func (mock *FeatureClientMock) Create(in1 *v1a.Feature) (*v1a.Feature, error)

Create calls CreateFunc.

func (*FeatureClientMock) CreateCalls

func (mock *FeatureClientMock) CreateCalls() []struct {
	In1 *v1a.Feature
}

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

len(mockedFeatureClient.CreateCalls())

func (*FeatureClientMock) Delete

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

Delete calls DeleteFunc.

func (*FeatureClientMock) DeleteCalls

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

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

len(mockedFeatureClient.DeleteCalls())

func (*FeatureClientMock) Get

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

Get calls GetFunc.

func (*FeatureClientMock) GetCalls

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

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

len(mockedFeatureClient.GetCalls())

func (*FeatureClientMock) List

func (mock *FeatureClientMock) List(namespace string, opts v1b.ListOptions) (*v1a.FeatureList, error)

List calls ListFunc.

func (*FeatureClientMock) ListCalls

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

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

len(mockedFeatureClient.ListCalls())

func (*FeatureClientMock) Patch

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

Patch calls PatchFunc.

func (*FeatureClientMock) PatchCalls

func (mock *FeatureClientMock) 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(mockedFeatureClient.PatchCalls())

func (*FeatureClientMock) Update

func (mock *FeatureClientMock) Update(in1 *v1a.Feature) (*v1a.Feature, error)

Update calls UpdateFunc.

func (*FeatureClientMock) UpdateCalls

func (mock *FeatureClientMock) UpdateCalls() []struct {
	In1 *v1a.Feature
}

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

len(mockedFeatureClient.UpdateCalls())

func (*FeatureClientMock) UpdateStatus

func (mock *FeatureClientMock) UpdateStatus(in1 *v1a.Feature) (*v1a.Feature, error)

UpdateStatus calls UpdateStatusFunc.

func (*FeatureClientMock) UpdateStatusCalls

func (mock *FeatureClientMock) UpdateStatusCalls() []struct {
	In1 *v1a.Feature
}

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

len(mockedFeatureClient.UpdateStatusCalls())

func (*FeatureClientMock) Watch

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

Watch calls WatchFunc.

func (*FeatureClientMock) WatchCalls

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

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

len(mockedFeatureClient.WatchCalls())

type FeatureControllerMock

type FeatureControllerMock 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.FeatureCache

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

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

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

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

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

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

FeatureControllerMock is a mock implementation of FeatureController.

    func TestSomethingThatUsesFeatureController(t *testing.T) {

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

    }

func (*FeatureControllerMock) AddGenericHandler

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

AddGenericHandler calls AddGenericHandlerFunc.

func (*FeatureControllerMock) AddGenericHandlerCalls

func (mock *FeatureControllerMock) 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(mockedFeatureController.AddGenericHandlerCalls())

func (*FeatureControllerMock) AddGenericRemoveHandler

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

AddGenericRemoveHandler calls AddGenericRemoveHandlerFunc.

func (*FeatureControllerMock) AddGenericRemoveHandlerCalls

func (mock *FeatureControllerMock) 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(mockedFeatureController.AddGenericRemoveHandlerCalls())

func (*FeatureControllerMock) Cache

func (mock *FeatureControllerMock) Cache() v1.FeatureCache

Cache calls CacheFunc.

func (*FeatureControllerMock) CacheCalls

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

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

len(mockedFeatureController.CacheCalls())

func (*FeatureControllerMock) Create

func (mock *FeatureControllerMock) Create(in1 *v1a.Feature) (*v1a.Feature, error)

Create calls CreateFunc.

func (*FeatureControllerMock) CreateCalls

func (mock *FeatureControllerMock) CreateCalls() []struct {
	In1 *v1a.Feature
}

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

len(mockedFeatureController.CreateCalls())

func (*FeatureControllerMock) Delete

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

Delete calls DeleteFunc.

func (*FeatureControllerMock) DeleteCalls

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

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

len(mockedFeatureController.DeleteCalls())

func (*FeatureControllerMock) Enqueue

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

Enqueue calls EnqueueFunc.

func (*FeatureControllerMock) EnqueueCalls

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

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

len(mockedFeatureController.EnqueueCalls())

func (*FeatureControllerMock) Get

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

Get calls GetFunc.

func (*FeatureControllerMock) GetCalls

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

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

len(mockedFeatureController.GetCalls())

func (*FeatureControllerMock) GroupVersionKind

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

GroupVersionKind calls GroupVersionKindFunc.

func (*FeatureControllerMock) GroupVersionKindCalls

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

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

len(mockedFeatureController.GroupVersionKindCalls())

func (*FeatureControllerMock) Informer

Informer calls InformerFunc.

func (*FeatureControllerMock) InformerCalls

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

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

len(mockedFeatureController.InformerCalls())

func (*FeatureControllerMock) List

func (mock *FeatureControllerMock) List(namespace string, opts v1b.ListOptions) (*v1a.FeatureList, error)

List calls ListFunc.

func (*FeatureControllerMock) ListCalls

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

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

len(mockedFeatureController.ListCalls())

func (*FeatureControllerMock) OnChange

func (mock *FeatureControllerMock) OnChange(ctx context.Context, name string, sync v1.FeatureHandler)

OnChange calls OnChangeFunc.

func (*FeatureControllerMock) OnChangeCalls

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

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

len(mockedFeatureController.OnChangeCalls())

func (*FeatureControllerMock) OnRemove

func (mock *FeatureControllerMock) OnRemove(ctx context.Context, name string, sync v1.FeatureHandler)

OnRemove calls OnRemoveFunc.

func (*FeatureControllerMock) OnRemoveCalls

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

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

len(mockedFeatureController.OnRemoveCalls())

func (*FeatureControllerMock) Patch

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

Patch calls PatchFunc.

func (*FeatureControllerMock) PatchCalls

func (mock *FeatureControllerMock) 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(mockedFeatureController.PatchCalls())

func (*FeatureControllerMock) Update

func (mock *FeatureControllerMock) Update(in1 *v1a.Feature) (*v1a.Feature, error)

Update calls UpdateFunc.

func (*FeatureControllerMock) UpdateCalls

func (mock *FeatureControllerMock) UpdateCalls() []struct {
	In1 *v1a.Feature
}

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

len(mockedFeatureController.UpdateCalls())

func (*FeatureControllerMock) UpdateStatus

func (mock *FeatureControllerMock) UpdateStatus(in1 *v1a.Feature) (*v1a.Feature, error)

UpdateStatus calls UpdateStatusFunc.

func (*FeatureControllerMock) UpdateStatusCalls

func (mock *FeatureControllerMock) UpdateStatusCalls() []struct {
	In1 *v1a.Feature
}

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

len(mockedFeatureController.UpdateStatusCalls())

func (*FeatureControllerMock) Updater

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

Updater calls UpdaterFunc.

func (*FeatureControllerMock) UpdaterCalls

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

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

len(mockedFeatureController.UpdaterCalls())

func (*FeatureControllerMock) Watch

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

Watch calls WatchFunc.

func (*FeatureControllerMock) WatchCalls

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

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

len(mockedFeatureController.WatchCalls())

Source Files

  • zz_generated_cluster_domain_mock.go
  • zz_generated_feature_mock.go

Jump to

Keyboard shortcuts

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