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 StorageClassCacheMock

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

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

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

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

StorageClassCacheMock is a mock implementation of StorageClassCache.

    func TestSomethingThatUsesStorageClassCache(t *testing.T) {

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

        // use mockedStorageClassCache in code that requires StorageClassCache
        // and then make assertions.

    }

func (*StorageClassCacheMock) AddIndexer

func (mock *StorageClassCacheMock) AddIndexer(indexName string, indexer v1.StorageClassIndexer)

AddIndexer calls AddIndexerFunc.

func (*StorageClassCacheMock) AddIndexerCalls

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

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

len(mockedStorageClassCache.AddIndexerCalls())

func (*StorageClassCacheMock) Get

func (mock *StorageClassCacheMock) Get(name string) (*v1a.StorageClass, error)

Get calls GetFunc.

func (*StorageClassCacheMock) GetByIndex

func (mock *StorageClassCacheMock) GetByIndex(indexName string, key string) ([]*v1a.StorageClass, error)

GetByIndex calls GetByIndexFunc.

func (*StorageClassCacheMock) GetByIndexCalls

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

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

len(mockedStorageClassCache.GetByIndexCalls())

func (*StorageClassCacheMock) GetCalls

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

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

len(mockedStorageClassCache.GetCalls())

func (*StorageClassCacheMock) List

func (mock *StorageClassCacheMock) List(selector labels.Selector) ([]*v1a.StorageClass, error)

List calls ListFunc.

func (*StorageClassCacheMock) ListCalls

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

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

len(mockedStorageClassCache.ListCalls())

type StorageClassClientMock

type StorageClassClientMock struct {
	// CreateFunc mocks the Create method.
	CreateFunc func(in1 *v1a.StorageClass) (*v1a.StorageClass, error)

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

	// GetFunc mocks the Get method.
	GetFunc func(name string, options v1b.GetOptions) (*v1a.StorageClass, error)

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

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

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

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

StorageClassClientMock is a mock implementation of StorageClassClient.

    func TestSomethingThatUsesStorageClassClient(t *testing.T) {

        // make and configure a mocked StorageClassClient
        mockedStorageClassClient := &StorageClassClientMock{
            CreateFunc: func(in1 *v1a.StorageClass) (*v1a.StorageClass, error) {
	               panic("mock out the Create method")
            },
            DeleteFunc: func(name string, options *v1b.DeleteOptions) error {
	               panic("mock out the Delete method")
            },
            GetFunc: func(name string, options v1b.GetOptions) (*v1a.StorageClass, error) {
	               panic("mock out the Get method")
            },
            ListFunc: func(opts v1b.ListOptions) (*v1a.StorageClassList, error) {
	               panic("mock out the List method")
            },
            PatchFunc: func(name string, pt types.PatchType, data []byte, subresources ...string) (*v1a.StorageClass, error) {
	               panic("mock out the Patch method")
            },
            UpdateFunc: func(in1 *v1a.StorageClass) (*v1a.StorageClass, error) {
	               panic("mock out the Update method")
            },
            WatchFunc: func(opts v1b.ListOptions) (watch.Interface, error) {
	               panic("mock out the Watch method")
            },
        }

        // use mockedStorageClassClient in code that requires StorageClassClient
        // and then make assertions.

    }

func (*StorageClassClientMock) Create

Create calls CreateFunc.

func (*StorageClassClientMock) CreateCalls

func (mock *StorageClassClientMock) CreateCalls() []struct {
	In1 *v1a.StorageClass
}

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

len(mockedStorageClassClient.CreateCalls())

func (*StorageClassClientMock) Delete

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

Delete calls DeleteFunc.

func (*StorageClassClientMock) DeleteCalls

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

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

len(mockedStorageClassClient.DeleteCalls())

func (*StorageClassClientMock) Get

func (mock *StorageClassClientMock) Get(name string, options v1b.GetOptions) (*v1a.StorageClass, error)

Get calls GetFunc.

func (*StorageClassClientMock) GetCalls

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

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

len(mockedStorageClassClient.GetCalls())

func (*StorageClassClientMock) List

List calls ListFunc.

func (*StorageClassClientMock) ListCalls

func (mock *StorageClassClientMock) ListCalls() []struct {
	Opts v1b.ListOptions
}

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

len(mockedStorageClassClient.ListCalls())

func (*StorageClassClientMock) Patch

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

Patch calls PatchFunc.

func (*StorageClassClientMock) PatchCalls

func (mock *StorageClassClientMock) 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(mockedStorageClassClient.PatchCalls())

func (*StorageClassClientMock) Update

Update calls UpdateFunc.

func (*StorageClassClientMock) UpdateCalls

func (mock *StorageClassClientMock) UpdateCalls() []struct {
	In1 *v1a.StorageClass
}

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

len(mockedStorageClassClient.UpdateCalls())

func (*StorageClassClientMock) Watch

Watch calls WatchFunc.

func (*StorageClassClientMock) WatchCalls

func (mock *StorageClassClientMock) WatchCalls() []struct {
	Opts v1b.ListOptions
}

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

len(mockedStorageClassClient.WatchCalls())

type StorageClassControllerMock

type StorageClassControllerMock 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.StorageClassCache

	// CreateFunc mocks the Create method.
	CreateFunc func(in1 *v1a.StorageClass) (*v1a.StorageClass, error)

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

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

	// GetFunc mocks the Get method.
	GetFunc func(name string, options v1b.GetOptions) (*v1a.StorageClass, 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 v1b.ListOptions) (*v1a.StorageClassList, error)

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

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

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

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

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

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

StorageClassControllerMock is a mock implementation of StorageClassController.

    func TestSomethingThatUsesStorageClassController(t *testing.T) {

        // make and configure a mocked StorageClassController
        mockedStorageClassController := &StorageClassControllerMock{
            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.StorageClassCache {
	               panic("mock out the Cache method")
            },
            CreateFunc: func(in1 *v1a.StorageClass) (*v1a.StorageClass, error) {
	               panic("mock out the Create method")
            },
            DeleteFunc: func(name string, options *v1b.DeleteOptions) error {
	               panic("mock out the Delete method")
            },
            EnqueueFunc: func(name string)  {
	               panic("mock out the Enqueue method")
            },
            GetFunc: func(name string, options v1b.GetOptions) (*v1a.StorageClass, 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 v1b.ListOptions) (*v1a.StorageClassList, error) {
	               panic("mock out the List method")
            },
            OnChangeFunc: func(ctx context.Context, name string, sync v1.StorageClassHandler)  {
	               panic("mock out the OnChange method")
            },
            OnRemoveFunc: func(ctx context.Context, name string, sync v1.StorageClassHandler)  {
	               panic("mock out the OnRemove method")
            },
            PatchFunc: func(name string, pt types.PatchType, data []byte, subresources ...string) (*v1a.StorageClass, error) {
	               panic("mock out the Patch method")
            },
            UpdateFunc: func(in1 *v1a.StorageClass) (*v1a.StorageClass, error) {
	               panic("mock out the Update method")
            },
            UpdaterFunc: func() generic.Updater {
	               panic("mock out the Updater method")
            },
            WatchFunc: func(opts v1b.ListOptions) (watch.Interface, error) {
	               panic("mock out the Watch method")
            },
        }

        // use mockedStorageClassController in code that requires StorageClassController
        // and then make assertions.

    }

func (*StorageClassControllerMock) AddGenericHandler

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

AddGenericHandler calls AddGenericHandlerFunc.

func (*StorageClassControllerMock) AddGenericHandlerCalls

func (mock *StorageClassControllerMock) 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(mockedStorageClassController.AddGenericHandlerCalls())

func (*StorageClassControllerMock) AddGenericRemoveHandler

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

AddGenericRemoveHandler calls AddGenericRemoveHandlerFunc.

func (*StorageClassControllerMock) AddGenericRemoveHandlerCalls

func (mock *StorageClassControllerMock) 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(mockedStorageClassController.AddGenericRemoveHandlerCalls())

func (*StorageClassControllerMock) Cache

Cache calls CacheFunc.

func (*StorageClassControllerMock) CacheCalls

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

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

len(mockedStorageClassController.CacheCalls())

func (*StorageClassControllerMock) Create

Create calls CreateFunc.

func (*StorageClassControllerMock) CreateCalls

func (mock *StorageClassControllerMock) CreateCalls() []struct {
	In1 *v1a.StorageClass
}

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

len(mockedStorageClassController.CreateCalls())

func (*StorageClassControllerMock) Delete

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

Delete calls DeleteFunc.

func (*StorageClassControllerMock) DeleteCalls

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

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

len(mockedStorageClassController.DeleteCalls())

func (*StorageClassControllerMock) Enqueue

func (mock *StorageClassControllerMock) Enqueue(name string)

Enqueue calls EnqueueFunc.

func (*StorageClassControllerMock) EnqueueCalls

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

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

len(mockedStorageClassController.EnqueueCalls())

func (*StorageClassControllerMock) Get

func (mock *StorageClassControllerMock) Get(name string, options v1b.GetOptions) (*v1a.StorageClass, error)

Get calls GetFunc.

func (*StorageClassControllerMock) GetCalls

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

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

len(mockedStorageClassController.GetCalls())

func (*StorageClassControllerMock) GroupVersionKind

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

GroupVersionKind calls GroupVersionKindFunc.

func (*StorageClassControllerMock) GroupVersionKindCalls

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

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

len(mockedStorageClassController.GroupVersionKindCalls())

func (*StorageClassControllerMock) Informer

Informer calls InformerFunc.

func (*StorageClassControllerMock) InformerCalls

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

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

len(mockedStorageClassController.InformerCalls())

func (*StorageClassControllerMock) List

List calls ListFunc.

func (*StorageClassControllerMock) ListCalls

func (mock *StorageClassControllerMock) ListCalls() []struct {
	Opts v1b.ListOptions
}

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

len(mockedStorageClassController.ListCalls())

func (*StorageClassControllerMock) OnChange

func (mock *StorageClassControllerMock) OnChange(ctx context.Context, name string, sync v1.StorageClassHandler)

OnChange calls OnChangeFunc.

func (*StorageClassControllerMock) OnChangeCalls

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

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

len(mockedStorageClassController.OnChangeCalls())

func (*StorageClassControllerMock) OnRemove

func (mock *StorageClassControllerMock) OnRemove(ctx context.Context, name string, sync v1.StorageClassHandler)

OnRemove calls OnRemoveFunc.

func (*StorageClassControllerMock) OnRemoveCalls

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

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

len(mockedStorageClassController.OnRemoveCalls())

func (*StorageClassControllerMock) Patch

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

Patch calls PatchFunc.

func (*StorageClassControllerMock) PatchCalls

func (mock *StorageClassControllerMock) 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(mockedStorageClassController.PatchCalls())

func (*StorageClassControllerMock) Update

Update calls UpdateFunc.

func (*StorageClassControllerMock) UpdateCalls

func (mock *StorageClassControllerMock) UpdateCalls() []struct {
	In1 *v1a.StorageClass
}

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

len(mockedStorageClassController.UpdateCalls())

func (*StorageClassControllerMock) Updater

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

Updater calls UpdaterFunc.

func (*StorageClassControllerMock) UpdaterCalls

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

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

len(mockedStorageClassController.UpdaterCalls())

func (*StorageClassControllerMock) Watch

Watch calls WatchFunc.

func (*StorageClassControllerMock) WatchCalls

func (mock *StorageClassControllerMock) WatchCalls() []struct {
	Opts v1b.ListOptions
}

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

len(mockedStorageClassController.WatchCalls())

Jump to

Keyboard shortcuts

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