fakes

package
v0.1.0-rc1 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 BuildCacheMock

type BuildCacheMock struct {
	// AddIndexerFunc mocks the AddIndexer method.
	AddIndexerFunc func(indexName string, indexer v1alpha1.BuildIndexer)

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

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

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

BuildCacheMock is a mock implementation of BuildCache.

    func TestSomethingThatUsesBuildCache(t *testing.T) {

        // make and configure a mocked BuildCache
        mockedBuildCache := &BuildCacheMock{
            AddIndexerFunc: func(indexName string, indexer v1alpha1.BuildIndexer)  {
	               panic("mock out the AddIndexer method")
            },
            GetFunc: func(namespace string, name string) (*v1alpha1a.Build, error) {
	               panic("mock out the Get method")
            },
            GetByIndexFunc: func(indexName string, key string) ([]*v1alpha1a.Build, error) {
	               panic("mock out the GetByIndex method")
            },
            ListFunc: func(namespace string, selector labels.Selector) ([]*v1alpha1a.Build, error) {
	               panic("mock out the List method")
            },
        }

        // use mockedBuildCache in code that requires BuildCache
        // and then make assertions.

    }

func (*BuildCacheMock) AddIndexer

func (mock *BuildCacheMock) AddIndexer(indexName string, indexer v1alpha1.BuildIndexer)

AddIndexer calls AddIndexerFunc.

func (*BuildCacheMock) AddIndexerCalls

func (mock *BuildCacheMock) AddIndexerCalls() []struct {
	IndexName string
	Indexer   v1alpha1.BuildIndexer
}

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

len(mockedBuildCache.AddIndexerCalls())

func (*BuildCacheMock) Get

func (mock *BuildCacheMock) Get(namespace string, name string) (*v1alpha1a.Build, error)

Get calls GetFunc.

func (*BuildCacheMock) GetByIndex

func (mock *BuildCacheMock) GetByIndex(indexName string, key string) ([]*v1alpha1a.Build, error)

GetByIndex calls GetByIndexFunc.

func (*BuildCacheMock) GetByIndexCalls

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

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

len(mockedBuildCache.GetByIndexCalls())

func (*BuildCacheMock) GetCalls

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

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

len(mockedBuildCache.GetCalls())

func (*BuildCacheMock) List

func (mock *BuildCacheMock) List(namespace string, selector labels.Selector) ([]*v1alpha1a.Build, error)

List calls ListFunc.

func (*BuildCacheMock) ListCalls

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

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

len(mockedBuildCache.ListCalls())

type BuildClientMock

type BuildClientMock struct {
	// CreateFunc mocks the Create method.
	CreateFunc func(in1 *v1alpha1a.Build) (*v1alpha1a.Build, error)

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

	// GetFunc mocks the Get method.
	GetFunc func(namespace string, name string, options v1.GetOptions) (*v1alpha1a.Build, error)

	// ListFunc mocks the List method.
	ListFunc func(namespace string, opts v1.ListOptions) (*v1alpha1a.BuildList, error)

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

	// UpdateFunc mocks the Update method.
	UpdateFunc func(in1 *v1alpha1a.Build) (*v1alpha1a.Build, error)

	// UpdateStatusFunc mocks the UpdateStatus method.
	UpdateStatusFunc func(in1 *v1alpha1a.Build) (*v1alpha1a.Build, error)

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

BuildClientMock is a mock implementation of BuildClient.

    func TestSomethingThatUsesBuildClient(t *testing.T) {

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

        // use mockedBuildClient in code that requires BuildClient
        // and then make assertions.

    }

func (*BuildClientMock) Create

func (mock *BuildClientMock) Create(in1 *v1alpha1a.Build) (*v1alpha1a.Build, error)

Create calls CreateFunc.

func (*BuildClientMock) CreateCalls

func (mock *BuildClientMock) CreateCalls() []struct {
	In1 *v1alpha1a.Build
}

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

len(mockedBuildClient.CreateCalls())

func (*BuildClientMock) Delete

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

Delete calls DeleteFunc.

func (*BuildClientMock) DeleteCalls

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

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

len(mockedBuildClient.DeleteCalls())

func (*BuildClientMock) Get

func (mock *BuildClientMock) Get(namespace string, name string, options v1.GetOptions) (*v1alpha1a.Build, error)

Get calls GetFunc.

func (*BuildClientMock) GetCalls

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

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

len(mockedBuildClient.GetCalls())

func (*BuildClientMock) List

func (mock *BuildClientMock) List(namespace string, opts v1.ListOptions) (*v1alpha1a.BuildList, error)

List calls ListFunc.

func (*BuildClientMock) ListCalls

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

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

len(mockedBuildClient.ListCalls())

func (*BuildClientMock) Patch

func (mock *BuildClientMock) Patch(namespace string, name string, pt types.PatchType, data []byte, subresources ...string) (*v1alpha1a.Build, error)

Patch calls PatchFunc.

func (*BuildClientMock) PatchCalls

func (mock *BuildClientMock) 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(mockedBuildClient.PatchCalls())

func (*BuildClientMock) Update

func (mock *BuildClientMock) Update(in1 *v1alpha1a.Build) (*v1alpha1a.Build, error)

Update calls UpdateFunc.

func (*BuildClientMock) UpdateCalls

func (mock *BuildClientMock) UpdateCalls() []struct {
	In1 *v1alpha1a.Build
}

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

len(mockedBuildClient.UpdateCalls())

func (*BuildClientMock) UpdateStatus

func (mock *BuildClientMock) UpdateStatus(in1 *v1alpha1a.Build) (*v1alpha1a.Build, error)

UpdateStatus calls UpdateStatusFunc.

func (*BuildClientMock) UpdateStatusCalls

func (mock *BuildClientMock) UpdateStatusCalls() []struct {
	In1 *v1alpha1a.Build
}

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

len(mockedBuildClient.UpdateStatusCalls())

func (*BuildClientMock) Watch

func (mock *BuildClientMock) Watch(namespace string, opts v1.ListOptions) (watch.Interface, error)

Watch calls WatchFunc.

func (*BuildClientMock) WatchCalls

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

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

len(mockedBuildClient.WatchCalls())

type BuildControllerMock

type BuildControllerMock 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() v1alpha1.BuildCache

	// CreateFunc mocks the Create method.
	CreateFunc func(in1 *v1alpha1a.Build) (*v1alpha1a.Build, error)

	// DeleteFunc mocks the Delete method.
	DeleteFunc func(namespace string, name string, options *v1.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 v1.GetOptions) (*v1alpha1a.Build, 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 v1.ListOptions) (*v1alpha1a.BuildList, error)

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

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

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

	// UpdateFunc mocks the Update method.
	UpdateFunc func(in1 *v1alpha1a.Build) (*v1alpha1a.Build, error)

	// UpdateStatusFunc mocks the UpdateStatus method.
	UpdateStatusFunc func(in1 *v1alpha1a.Build) (*v1alpha1a.Build, error)

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

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

BuildControllerMock is a mock implementation of BuildController.

    func TestSomethingThatUsesBuildController(t *testing.T) {

        // make and configure a mocked BuildController
        mockedBuildController := &BuildControllerMock{
            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() v1alpha1.BuildCache {
	               panic("mock out the Cache method")
            },
            CreateFunc: func(in1 *v1alpha1a.Build) (*v1alpha1a.Build, error) {
	               panic("mock out the Create method")
            },
            DeleteFunc: func(namespace string, name string, options *v1.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 v1.GetOptions) (*v1alpha1a.Build, 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 v1.ListOptions) (*v1alpha1a.BuildList, error) {
	               panic("mock out the List method")
            },
            OnChangeFunc: func(ctx context.Context, name string, sync v1alpha1.BuildHandler)  {
	               panic("mock out the OnChange method")
            },
            OnRemoveFunc: func(ctx context.Context, name string, sync v1alpha1.BuildHandler)  {
	               panic("mock out the OnRemove method")
            },
            PatchFunc: func(namespace string, name string, pt types.PatchType, data []byte, subresources ...string) (*v1alpha1a.Build, error) {
	               panic("mock out the Patch method")
            },
            UpdateFunc: func(in1 *v1alpha1a.Build) (*v1alpha1a.Build, error) {
	               panic("mock out the Update method")
            },
            UpdateStatusFunc: func(in1 *v1alpha1a.Build) (*v1alpha1a.Build, error) {
	               panic("mock out the UpdateStatus method")
            },
            UpdaterFunc: func() generic.Updater {
	               panic("mock out the Updater method")
            },
            WatchFunc: func(namespace string, opts v1.ListOptions) (watch.Interface, error) {
	               panic("mock out the Watch method")
            },
        }

        // use mockedBuildController in code that requires BuildController
        // and then make assertions.

    }

func (*BuildControllerMock) AddGenericHandler

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

AddGenericHandler calls AddGenericHandlerFunc.

func (*BuildControllerMock) AddGenericHandlerCalls

func (mock *BuildControllerMock) 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(mockedBuildController.AddGenericHandlerCalls())

func (*BuildControllerMock) AddGenericRemoveHandler

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

AddGenericRemoveHandler calls AddGenericRemoveHandlerFunc.

func (*BuildControllerMock) AddGenericRemoveHandlerCalls

func (mock *BuildControllerMock) 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(mockedBuildController.AddGenericRemoveHandlerCalls())

func (*BuildControllerMock) Cache

func (mock *BuildControllerMock) Cache() v1alpha1.BuildCache

Cache calls CacheFunc.

func (*BuildControllerMock) CacheCalls

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

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

len(mockedBuildController.CacheCalls())

func (*BuildControllerMock) Create

func (mock *BuildControllerMock) Create(in1 *v1alpha1a.Build) (*v1alpha1a.Build, error)

Create calls CreateFunc.

func (*BuildControllerMock) CreateCalls

func (mock *BuildControllerMock) CreateCalls() []struct {
	In1 *v1alpha1a.Build
}

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

len(mockedBuildController.CreateCalls())

func (*BuildControllerMock) Delete

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

Delete calls DeleteFunc.

func (*BuildControllerMock) DeleteCalls

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

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

len(mockedBuildController.DeleteCalls())

func (*BuildControllerMock) Enqueue

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

Enqueue calls EnqueueFunc.

func (*BuildControllerMock) EnqueueCalls

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

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

len(mockedBuildController.EnqueueCalls())

func (*BuildControllerMock) Get

func (mock *BuildControllerMock) Get(namespace string, name string, options v1.GetOptions) (*v1alpha1a.Build, error)

Get calls GetFunc.

func (*BuildControllerMock) GetCalls

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

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

len(mockedBuildController.GetCalls())

func (*BuildControllerMock) GroupVersionKind

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

GroupVersionKind calls GroupVersionKindFunc.

func (*BuildControllerMock) GroupVersionKindCalls

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

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

len(mockedBuildController.GroupVersionKindCalls())

func (*BuildControllerMock) Informer

Informer calls InformerFunc.

func (*BuildControllerMock) InformerCalls

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

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

len(mockedBuildController.InformerCalls())

func (*BuildControllerMock) List

func (mock *BuildControllerMock) List(namespace string, opts v1.ListOptions) (*v1alpha1a.BuildList, error)

List calls ListFunc.

func (*BuildControllerMock) ListCalls

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

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

len(mockedBuildController.ListCalls())

func (*BuildControllerMock) OnChange

func (mock *BuildControllerMock) OnChange(ctx context.Context, name string, sync v1alpha1.BuildHandler)

OnChange calls OnChangeFunc.

func (*BuildControllerMock) OnChangeCalls

func (mock *BuildControllerMock) OnChangeCalls() []struct {
	Ctx  context.Context
	Name string
	Sync v1alpha1.BuildHandler
}

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

len(mockedBuildController.OnChangeCalls())

func (*BuildControllerMock) OnRemove

func (mock *BuildControllerMock) OnRemove(ctx context.Context, name string, sync v1alpha1.BuildHandler)

OnRemove calls OnRemoveFunc.

func (*BuildControllerMock) OnRemoveCalls

func (mock *BuildControllerMock) OnRemoveCalls() []struct {
	Ctx  context.Context
	Name string
	Sync v1alpha1.BuildHandler
}

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

len(mockedBuildController.OnRemoveCalls())

func (*BuildControllerMock) Patch

func (mock *BuildControllerMock) Patch(namespace string, name string, pt types.PatchType, data []byte, subresources ...string) (*v1alpha1a.Build, error)

Patch calls PatchFunc.

func (*BuildControllerMock) PatchCalls

func (mock *BuildControllerMock) 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(mockedBuildController.PatchCalls())

func (*BuildControllerMock) Update

func (mock *BuildControllerMock) Update(in1 *v1alpha1a.Build) (*v1alpha1a.Build, error)

Update calls UpdateFunc.

func (*BuildControllerMock) UpdateCalls

func (mock *BuildControllerMock) UpdateCalls() []struct {
	In1 *v1alpha1a.Build
}

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

len(mockedBuildController.UpdateCalls())

func (*BuildControllerMock) UpdateStatus

func (mock *BuildControllerMock) UpdateStatus(in1 *v1alpha1a.Build) (*v1alpha1a.Build, error)

UpdateStatus calls UpdateStatusFunc.

func (*BuildControllerMock) UpdateStatusCalls

func (mock *BuildControllerMock) UpdateStatusCalls() []struct {
	In1 *v1alpha1a.Build
}

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

len(mockedBuildController.UpdateStatusCalls())

func (*BuildControllerMock) Updater

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

Updater calls UpdaterFunc.

func (*BuildControllerMock) UpdaterCalls

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

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

len(mockedBuildController.UpdaterCalls())

func (*BuildControllerMock) Watch

func (mock *BuildControllerMock) Watch(namespace string, opts v1.ListOptions) (watch.Interface, error)

Watch calls WatchFunc.

func (*BuildControllerMock) WatchCalls

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

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

len(mockedBuildController.WatchCalls())

Jump to

Keyboard shortcuts

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