fakes

package
v0.1.2 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 ServiceAccountCacheMock

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

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

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

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

ServiceAccountCacheMock is a mock implementation of ServiceAccountCache.

    func TestSomethingThatUsesServiceAccountCache(t *testing.T) {

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

        // use mockedServiceAccountCache in code that requires ServiceAccountCache
        // and then make assertions.

    }

func (*ServiceAccountCacheMock) AddIndexer

func (mock *ServiceAccountCacheMock) AddIndexer(indexName string, indexer v1.ServiceAccountIndexer)

AddIndexer calls AddIndexerFunc.

func (*ServiceAccountCacheMock) AddIndexerCalls

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

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

len(mockedServiceAccountCache.AddIndexerCalls())

func (*ServiceAccountCacheMock) Get

func (mock *ServiceAccountCacheMock) Get(namespace string, name string) (*v1a.ServiceAccount, error)

Get calls GetFunc.

func (*ServiceAccountCacheMock) GetByIndex

func (mock *ServiceAccountCacheMock) GetByIndex(indexName string, key string) ([]*v1a.ServiceAccount, error)

GetByIndex calls GetByIndexFunc.

func (*ServiceAccountCacheMock) GetByIndexCalls

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

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

len(mockedServiceAccountCache.GetByIndexCalls())

func (*ServiceAccountCacheMock) GetCalls

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

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

len(mockedServiceAccountCache.GetCalls())

func (*ServiceAccountCacheMock) List

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

List calls ListFunc.

func (*ServiceAccountCacheMock) ListCalls

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

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

len(mockedServiceAccountCache.ListCalls())

type ServiceAccountClientMock

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

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

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

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

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

ServiceAccountClientMock is a mock implementation of ServiceAccountClient.

    func TestSomethingThatUsesServiceAccountClient(t *testing.T) {

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

        // use mockedServiceAccountClient in code that requires ServiceAccountClient
        // and then make assertions.

    }

func (*ServiceAccountClientMock) Create

Create calls CreateFunc.

func (*ServiceAccountClientMock) CreateCalls

func (mock *ServiceAccountClientMock) CreateCalls() []struct {
	In1 *v1a.ServiceAccount
}

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

len(mockedServiceAccountClient.CreateCalls())

func (*ServiceAccountClientMock) Delete

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

Delete calls DeleteFunc.

func (*ServiceAccountClientMock) DeleteCalls

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

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

len(mockedServiceAccountClient.DeleteCalls())

func (*ServiceAccountClientMock) Get

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

Get calls GetFunc.

func (*ServiceAccountClientMock) GetCalls

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

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

len(mockedServiceAccountClient.GetCalls())

func (*ServiceAccountClientMock) List

func (mock *ServiceAccountClientMock) List(namespace string, opts v1b.ListOptions) (*v1a.ServiceAccountList, error)

List calls ListFunc.

func (*ServiceAccountClientMock) ListCalls

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

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

len(mockedServiceAccountClient.ListCalls())

func (*ServiceAccountClientMock) Patch

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

Patch calls PatchFunc.

func (*ServiceAccountClientMock) PatchCalls

func (mock *ServiceAccountClientMock) 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(mockedServiceAccountClient.PatchCalls())

func (*ServiceAccountClientMock) Update

Update calls UpdateFunc.

func (*ServiceAccountClientMock) UpdateCalls

func (mock *ServiceAccountClientMock) UpdateCalls() []struct {
	In1 *v1a.ServiceAccount
}

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

len(mockedServiceAccountClient.UpdateCalls())

func (*ServiceAccountClientMock) Watch

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

Watch calls WatchFunc.

func (*ServiceAccountClientMock) WatchCalls

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

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

len(mockedServiceAccountClient.WatchCalls())

type ServiceAccountControllerMock

type ServiceAccountControllerMock 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.ServiceAccountCache

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

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

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

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

	// UpdateFunc mocks the Update method.
	UpdateFunc func(in1 *v1a.ServiceAccount) (*v1a.ServiceAccount, 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
}

ServiceAccountControllerMock is a mock implementation of ServiceAccountController.

    func TestSomethingThatUsesServiceAccountController(t *testing.T) {

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

    }

func (*ServiceAccountControllerMock) AddGenericHandler

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

AddGenericHandler calls AddGenericHandlerFunc.

func (*ServiceAccountControllerMock) AddGenericHandlerCalls

func (mock *ServiceAccountControllerMock) 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(mockedServiceAccountController.AddGenericHandlerCalls())

func (*ServiceAccountControllerMock) AddGenericRemoveHandler

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

AddGenericRemoveHandler calls AddGenericRemoveHandlerFunc.

func (*ServiceAccountControllerMock) AddGenericRemoveHandlerCalls

func (mock *ServiceAccountControllerMock) 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(mockedServiceAccountController.AddGenericRemoveHandlerCalls())

func (*ServiceAccountControllerMock) Cache

Cache calls CacheFunc.

func (*ServiceAccountControllerMock) CacheCalls

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

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

len(mockedServiceAccountController.CacheCalls())

func (*ServiceAccountControllerMock) Create

Create calls CreateFunc.

func (*ServiceAccountControllerMock) CreateCalls

func (mock *ServiceAccountControllerMock) CreateCalls() []struct {
	In1 *v1a.ServiceAccount
}

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

len(mockedServiceAccountController.CreateCalls())

func (*ServiceAccountControllerMock) Delete

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

Delete calls DeleteFunc.

func (*ServiceAccountControllerMock) DeleteCalls

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

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

len(mockedServiceAccountController.DeleteCalls())

func (*ServiceAccountControllerMock) Enqueue

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

Enqueue calls EnqueueFunc.

func (*ServiceAccountControllerMock) EnqueueCalls

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

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

len(mockedServiceAccountController.EnqueueCalls())

func (*ServiceAccountControllerMock) Get

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

Get calls GetFunc.

func (*ServiceAccountControllerMock) GetCalls

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

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

len(mockedServiceAccountController.GetCalls())

func (*ServiceAccountControllerMock) GroupVersionKind

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

GroupVersionKind calls GroupVersionKindFunc.

func (*ServiceAccountControllerMock) GroupVersionKindCalls

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

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

len(mockedServiceAccountController.GroupVersionKindCalls())

func (*ServiceAccountControllerMock) Informer

Informer calls InformerFunc.

func (*ServiceAccountControllerMock) InformerCalls

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

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

len(mockedServiceAccountController.InformerCalls())

func (*ServiceAccountControllerMock) List

List calls ListFunc.

func (*ServiceAccountControllerMock) ListCalls

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

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

len(mockedServiceAccountController.ListCalls())

func (*ServiceAccountControllerMock) OnChange

OnChange calls OnChangeFunc.

func (*ServiceAccountControllerMock) OnChangeCalls

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

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

len(mockedServiceAccountController.OnChangeCalls())

func (*ServiceAccountControllerMock) OnRemove

OnRemove calls OnRemoveFunc.

func (*ServiceAccountControllerMock) OnRemoveCalls

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

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

len(mockedServiceAccountController.OnRemoveCalls())

func (*ServiceAccountControllerMock) Patch

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

Patch calls PatchFunc.

func (*ServiceAccountControllerMock) PatchCalls

func (mock *ServiceAccountControllerMock) 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(mockedServiceAccountController.PatchCalls())

func (*ServiceAccountControllerMock) Update

Update calls UpdateFunc.

func (*ServiceAccountControllerMock) UpdateCalls

func (mock *ServiceAccountControllerMock) UpdateCalls() []struct {
	In1 *v1a.ServiceAccount
}

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

len(mockedServiceAccountController.UpdateCalls())

func (*ServiceAccountControllerMock) Updater

Updater calls UpdaterFunc.

func (*ServiceAccountControllerMock) UpdaterCalls

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

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

len(mockedServiceAccountController.UpdaterCalls())

func (*ServiceAccountControllerMock) Watch

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

Watch calls WatchFunc.

func (*ServiceAccountControllerMock) WatchCalls

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

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

len(mockedServiceAccountController.WatchCalls())

Jump to

Keyboard shortcuts

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