fakes

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 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 TaskCacheMock

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

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

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

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

TaskCacheMock is a mock implementation of TaskCache.

    func TestSomethingThatUsesTaskCache(t *testing.T) {

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

        // use mockedTaskCache in code that requires TaskCache
        // and then make assertions.

    }

func (*TaskCacheMock) AddIndexer

func (mock *TaskCacheMock) AddIndexer(indexName string, indexer v1alpha1.TaskIndexer)

AddIndexer calls AddIndexerFunc.

func (*TaskCacheMock) AddIndexerCalls

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

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

len(mockedTaskCache.AddIndexerCalls())

func (*TaskCacheMock) Get

func (mock *TaskCacheMock) Get(namespace string, name string) (*v1alpha1a.Task, error)

Get calls GetFunc.

func (*TaskCacheMock) GetByIndex

func (mock *TaskCacheMock) GetByIndex(indexName string, key string) ([]*v1alpha1a.Task, error)

GetByIndex calls GetByIndexFunc.

func (*TaskCacheMock) GetByIndexCalls

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

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

len(mockedTaskCache.GetByIndexCalls())

func (*TaskCacheMock) GetCalls

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

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

len(mockedTaskCache.GetCalls())

func (*TaskCacheMock) List

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

List calls ListFunc.

func (*TaskCacheMock) ListCalls

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

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

len(mockedTaskCache.ListCalls())

type TaskClientMock

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

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

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

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

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

TaskClientMock is a mock implementation of TaskClient.

    func TestSomethingThatUsesTaskClient(t *testing.T) {

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

        // use mockedTaskClient in code that requires TaskClient
        // and then make assertions.

    }

func (*TaskClientMock) Create

func (mock *TaskClientMock) Create(in1 *v1alpha1a.Task) (*v1alpha1a.Task, error)

Create calls CreateFunc.

func (*TaskClientMock) CreateCalls

func (mock *TaskClientMock) CreateCalls() []struct {
	In1 *v1alpha1a.Task
}

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

len(mockedTaskClient.CreateCalls())

func (*TaskClientMock) Delete

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

Delete calls DeleteFunc.

func (*TaskClientMock) DeleteCalls

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

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

len(mockedTaskClient.DeleteCalls())

func (*TaskClientMock) Get

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

Get calls GetFunc.

func (*TaskClientMock) GetCalls

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

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

len(mockedTaskClient.GetCalls())

func (*TaskClientMock) List

func (mock *TaskClientMock) List(namespace string, opts v1.ListOptions) (*v1alpha1a.TaskList, error)

List calls ListFunc.

func (*TaskClientMock) ListCalls

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

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

len(mockedTaskClient.ListCalls())

func (*TaskClientMock) Patch

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

Patch calls PatchFunc.

func (*TaskClientMock) PatchCalls

func (mock *TaskClientMock) 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(mockedTaskClient.PatchCalls())

func (*TaskClientMock) Update

func (mock *TaskClientMock) Update(in1 *v1alpha1a.Task) (*v1alpha1a.Task, error)

Update calls UpdateFunc.

func (*TaskClientMock) UpdateCalls

func (mock *TaskClientMock) UpdateCalls() []struct {
	In1 *v1alpha1a.Task
}

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

len(mockedTaskClient.UpdateCalls())

func (*TaskClientMock) Watch

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

Watch calls WatchFunc.

func (*TaskClientMock) WatchCalls

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

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

len(mockedTaskClient.WatchCalls())

type TaskControllerMock

type TaskControllerMock 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.TaskCache

	// CreateFunc mocks the Create method.
	CreateFunc func(in1 *v1alpha1a.Task) (*v1alpha1a.Task, 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.Task, 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.TaskList, error)

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

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

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

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

TaskControllerMock is a mock implementation of TaskController.

    func TestSomethingThatUsesTaskController(t *testing.T) {

        // make and configure a mocked TaskController
        mockedTaskController := &TaskControllerMock{
            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.TaskCache {
	               panic("mock out the Cache method")
            },
            CreateFunc: func(in1 *v1alpha1a.Task) (*v1alpha1a.Task, 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.Task, 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.TaskList, error) {
	               panic("mock out the List method")
            },
            OnChangeFunc: func(ctx context.Context, name string, sync v1alpha1.TaskHandler)  {
	               panic("mock out the OnChange method")
            },
            OnRemoveFunc: func(ctx context.Context, name string, sync v1alpha1.TaskHandler)  {
	               panic("mock out the OnRemove method")
            },
            PatchFunc: func(namespace string, name string, pt types.PatchType, data []byte, subresources ...string) (*v1alpha1a.Task, error) {
	               panic("mock out the Patch method")
            },
            UpdateFunc: func(in1 *v1alpha1a.Task) (*v1alpha1a.Task, error) {
	               panic("mock out the Update 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 mockedTaskController in code that requires TaskController
        // and then make assertions.

    }

func (*TaskControllerMock) AddGenericHandler

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

AddGenericHandler calls AddGenericHandlerFunc.

func (*TaskControllerMock) AddGenericHandlerCalls

func (mock *TaskControllerMock) 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(mockedTaskController.AddGenericHandlerCalls())

func (*TaskControllerMock) AddGenericRemoveHandler

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

AddGenericRemoveHandler calls AddGenericRemoveHandlerFunc.

func (*TaskControllerMock) AddGenericRemoveHandlerCalls

func (mock *TaskControllerMock) 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(mockedTaskController.AddGenericRemoveHandlerCalls())

func (*TaskControllerMock) Cache

func (mock *TaskControllerMock) Cache() v1alpha1.TaskCache

Cache calls CacheFunc.

func (*TaskControllerMock) CacheCalls

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

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

len(mockedTaskController.CacheCalls())

func (*TaskControllerMock) Create

func (mock *TaskControllerMock) Create(in1 *v1alpha1a.Task) (*v1alpha1a.Task, error)

Create calls CreateFunc.

func (*TaskControllerMock) CreateCalls

func (mock *TaskControllerMock) CreateCalls() []struct {
	In1 *v1alpha1a.Task
}

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

len(mockedTaskController.CreateCalls())

func (*TaskControllerMock) Delete

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

Delete calls DeleteFunc.

func (*TaskControllerMock) DeleteCalls

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

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

len(mockedTaskController.DeleteCalls())

func (*TaskControllerMock) Enqueue

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

Enqueue calls EnqueueFunc.

func (*TaskControllerMock) EnqueueCalls

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

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

len(mockedTaskController.EnqueueCalls())

func (*TaskControllerMock) Get

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

Get calls GetFunc.

func (*TaskControllerMock) GetCalls

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

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

len(mockedTaskController.GetCalls())

func (*TaskControllerMock) GroupVersionKind

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

GroupVersionKind calls GroupVersionKindFunc.

func (*TaskControllerMock) GroupVersionKindCalls

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

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

len(mockedTaskController.GroupVersionKindCalls())

func (*TaskControllerMock) Informer

func (mock *TaskControllerMock) Informer() cache.SharedIndexInformer

Informer calls InformerFunc.

func (*TaskControllerMock) InformerCalls

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

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

len(mockedTaskController.InformerCalls())

func (*TaskControllerMock) List

func (mock *TaskControllerMock) List(namespace string, opts v1.ListOptions) (*v1alpha1a.TaskList, error)

List calls ListFunc.

func (*TaskControllerMock) ListCalls

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

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

len(mockedTaskController.ListCalls())

func (*TaskControllerMock) OnChange

func (mock *TaskControllerMock) OnChange(ctx context.Context, name string, sync v1alpha1.TaskHandler)

OnChange calls OnChangeFunc.

func (*TaskControllerMock) OnChangeCalls

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

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

len(mockedTaskController.OnChangeCalls())

func (*TaskControllerMock) OnRemove

func (mock *TaskControllerMock) OnRemove(ctx context.Context, name string, sync v1alpha1.TaskHandler)

OnRemove calls OnRemoveFunc.

func (*TaskControllerMock) OnRemoveCalls

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

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

len(mockedTaskController.OnRemoveCalls())

func (*TaskControllerMock) Patch

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

Patch calls PatchFunc.

func (*TaskControllerMock) PatchCalls

func (mock *TaskControllerMock) 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(mockedTaskController.PatchCalls())

func (*TaskControllerMock) Update

func (mock *TaskControllerMock) Update(in1 *v1alpha1a.Task) (*v1alpha1a.Task, error)

Update calls UpdateFunc.

func (*TaskControllerMock) UpdateCalls

func (mock *TaskControllerMock) UpdateCalls() []struct {
	In1 *v1alpha1a.Task
}

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

len(mockedTaskController.UpdateCalls())

func (*TaskControllerMock) Updater

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

Updater calls UpdaterFunc.

func (*TaskControllerMock) UpdaterCalls

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

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

len(mockedTaskController.UpdaterCalls())

func (*TaskControllerMock) Watch

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

Watch calls WatchFunc.

func (*TaskControllerMock) WatchCalls

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

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

len(mockedTaskController.WatchCalls())

type TaskRunCacheMock

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

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

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

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

TaskRunCacheMock is a mock implementation of TaskRunCache.

    func TestSomethingThatUsesTaskRunCache(t *testing.T) {

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

        // use mockedTaskRunCache in code that requires TaskRunCache
        // and then make assertions.

    }

func (*TaskRunCacheMock) AddIndexer

func (mock *TaskRunCacheMock) AddIndexer(indexName string, indexer v1alpha1.TaskRunIndexer)

AddIndexer calls AddIndexerFunc.

func (*TaskRunCacheMock) AddIndexerCalls

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

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

len(mockedTaskRunCache.AddIndexerCalls())

func (*TaskRunCacheMock) Get

func (mock *TaskRunCacheMock) Get(namespace string, name string) (*v1alpha1a.TaskRun, error)

Get calls GetFunc.

func (*TaskRunCacheMock) GetByIndex

func (mock *TaskRunCacheMock) GetByIndex(indexName string, key string) ([]*v1alpha1a.TaskRun, error)

GetByIndex calls GetByIndexFunc.

func (*TaskRunCacheMock) GetByIndexCalls

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

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

len(mockedTaskRunCache.GetByIndexCalls())

func (*TaskRunCacheMock) GetCalls

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

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

len(mockedTaskRunCache.GetCalls())

func (*TaskRunCacheMock) List

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

List calls ListFunc.

func (*TaskRunCacheMock) ListCalls

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

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

len(mockedTaskRunCache.ListCalls())

type TaskRunClientMock

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

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

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

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

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

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

TaskRunClientMock is a mock implementation of TaskRunClient.

    func TestSomethingThatUsesTaskRunClient(t *testing.T) {

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

        // use mockedTaskRunClient in code that requires TaskRunClient
        // and then make assertions.

    }

func (*TaskRunClientMock) Create

func (mock *TaskRunClientMock) Create(in1 *v1alpha1a.TaskRun) (*v1alpha1a.TaskRun, error)

Create calls CreateFunc.

func (*TaskRunClientMock) CreateCalls

func (mock *TaskRunClientMock) CreateCalls() []struct {
	In1 *v1alpha1a.TaskRun
}

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

len(mockedTaskRunClient.CreateCalls())

func (*TaskRunClientMock) Delete

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

Delete calls DeleteFunc.

func (*TaskRunClientMock) DeleteCalls

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

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

len(mockedTaskRunClient.DeleteCalls())

func (*TaskRunClientMock) Get

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

Get calls GetFunc.

func (*TaskRunClientMock) GetCalls

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

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

len(mockedTaskRunClient.GetCalls())

func (*TaskRunClientMock) List

func (mock *TaskRunClientMock) List(namespace string, opts v1.ListOptions) (*v1alpha1a.TaskRunList, error)

List calls ListFunc.

func (*TaskRunClientMock) ListCalls

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

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

len(mockedTaskRunClient.ListCalls())

func (*TaskRunClientMock) Patch

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

Patch calls PatchFunc.

func (*TaskRunClientMock) PatchCalls

func (mock *TaskRunClientMock) 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(mockedTaskRunClient.PatchCalls())

func (*TaskRunClientMock) Update

func (mock *TaskRunClientMock) Update(in1 *v1alpha1a.TaskRun) (*v1alpha1a.TaskRun, error)

Update calls UpdateFunc.

func (*TaskRunClientMock) UpdateCalls

func (mock *TaskRunClientMock) UpdateCalls() []struct {
	In1 *v1alpha1a.TaskRun
}

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

len(mockedTaskRunClient.UpdateCalls())

func (*TaskRunClientMock) UpdateStatus

func (mock *TaskRunClientMock) UpdateStatus(in1 *v1alpha1a.TaskRun) (*v1alpha1a.TaskRun, error)

UpdateStatus calls UpdateStatusFunc.

func (*TaskRunClientMock) UpdateStatusCalls

func (mock *TaskRunClientMock) UpdateStatusCalls() []struct {
	In1 *v1alpha1a.TaskRun
}

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

len(mockedTaskRunClient.UpdateStatusCalls())

func (*TaskRunClientMock) Watch

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

Watch calls WatchFunc.

func (*TaskRunClientMock) WatchCalls

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

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

len(mockedTaskRunClient.WatchCalls())

type TaskRunControllerMock

type TaskRunControllerMock 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.TaskRunCache

	// CreateFunc mocks the Create method.
	CreateFunc func(in1 *v1alpha1a.TaskRun) (*v1alpha1a.TaskRun, 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.TaskRun, 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.TaskRunList, error)

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

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

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

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

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

TaskRunControllerMock is a mock implementation of TaskRunController.

    func TestSomethingThatUsesTaskRunController(t *testing.T) {

        // make and configure a mocked TaskRunController
        mockedTaskRunController := &TaskRunControllerMock{
            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.TaskRunCache {
	               panic("mock out the Cache method")
            },
            CreateFunc: func(in1 *v1alpha1a.TaskRun) (*v1alpha1a.TaskRun, 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.TaskRun, 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.TaskRunList, error) {
	               panic("mock out the List method")
            },
            OnChangeFunc: func(ctx context.Context, name string, sync v1alpha1.TaskRunHandler)  {
	               panic("mock out the OnChange method")
            },
            OnRemoveFunc: func(ctx context.Context, name string, sync v1alpha1.TaskRunHandler)  {
	               panic("mock out the OnRemove method")
            },
            PatchFunc: func(namespace string, name string, pt types.PatchType, data []byte, subresources ...string) (*v1alpha1a.TaskRun, error) {
	               panic("mock out the Patch method")
            },
            UpdateFunc: func(in1 *v1alpha1a.TaskRun) (*v1alpha1a.TaskRun, error) {
	               panic("mock out the Update method")
            },
            UpdateStatusFunc: func(in1 *v1alpha1a.TaskRun) (*v1alpha1a.TaskRun, 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 mockedTaskRunController in code that requires TaskRunController
        // and then make assertions.

    }

func (*TaskRunControllerMock) AddGenericHandler

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

AddGenericHandler calls AddGenericHandlerFunc.

func (*TaskRunControllerMock) AddGenericHandlerCalls

func (mock *TaskRunControllerMock) 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(mockedTaskRunController.AddGenericHandlerCalls())

func (*TaskRunControllerMock) AddGenericRemoveHandler

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

AddGenericRemoveHandler calls AddGenericRemoveHandlerFunc.

func (*TaskRunControllerMock) AddGenericRemoveHandlerCalls

func (mock *TaskRunControllerMock) 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(mockedTaskRunController.AddGenericRemoveHandlerCalls())

func (*TaskRunControllerMock) Cache

Cache calls CacheFunc.

func (*TaskRunControllerMock) CacheCalls

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

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

len(mockedTaskRunController.CacheCalls())

func (*TaskRunControllerMock) Create

Create calls CreateFunc.

func (*TaskRunControllerMock) CreateCalls

func (mock *TaskRunControllerMock) CreateCalls() []struct {
	In1 *v1alpha1a.TaskRun
}

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

len(mockedTaskRunController.CreateCalls())

func (*TaskRunControllerMock) Delete

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

Delete calls DeleteFunc.

func (*TaskRunControllerMock) DeleteCalls

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

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

len(mockedTaskRunController.DeleteCalls())

func (*TaskRunControllerMock) Enqueue

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

Enqueue calls EnqueueFunc.

func (*TaskRunControllerMock) EnqueueCalls

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

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

len(mockedTaskRunController.EnqueueCalls())

func (*TaskRunControllerMock) Get

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

Get calls GetFunc.

func (*TaskRunControllerMock) GetCalls

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

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

len(mockedTaskRunController.GetCalls())

func (*TaskRunControllerMock) GroupVersionKind

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

GroupVersionKind calls GroupVersionKindFunc.

func (*TaskRunControllerMock) GroupVersionKindCalls

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

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

len(mockedTaskRunController.GroupVersionKindCalls())

func (*TaskRunControllerMock) Informer

Informer calls InformerFunc.

func (*TaskRunControllerMock) InformerCalls

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

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

len(mockedTaskRunController.InformerCalls())

func (*TaskRunControllerMock) List

func (mock *TaskRunControllerMock) List(namespace string, opts v1.ListOptions) (*v1alpha1a.TaskRunList, error)

List calls ListFunc.

func (*TaskRunControllerMock) ListCalls

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

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

len(mockedTaskRunController.ListCalls())

func (*TaskRunControllerMock) OnChange

func (mock *TaskRunControllerMock) OnChange(ctx context.Context, name string, sync v1alpha1.TaskRunHandler)

OnChange calls OnChangeFunc.

func (*TaskRunControllerMock) OnChangeCalls

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

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

len(mockedTaskRunController.OnChangeCalls())

func (*TaskRunControllerMock) OnRemove

func (mock *TaskRunControllerMock) OnRemove(ctx context.Context, name string, sync v1alpha1.TaskRunHandler)

OnRemove calls OnRemoveFunc.

func (*TaskRunControllerMock) OnRemoveCalls

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

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

len(mockedTaskRunController.OnRemoveCalls())

func (*TaskRunControllerMock) Patch

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

Patch calls PatchFunc.

func (*TaskRunControllerMock) PatchCalls

func (mock *TaskRunControllerMock) 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(mockedTaskRunController.PatchCalls())

func (*TaskRunControllerMock) Update

Update calls UpdateFunc.

func (*TaskRunControllerMock) UpdateCalls

func (mock *TaskRunControllerMock) UpdateCalls() []struct {
	In1 *v1alpha1a.TaskRun
}

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

len(mockedTaskRunController.UpdateCalls())

func (*TaskRunControllerMock) UpdateStatus

func (mock *TaskRunControllerMock) UpdateStatus(in1 *v1alpha1a.TaskRun) (*v1alpha1a.TaskRun, error)

UpdateStatus calls UpdateStatusFunc.

func (*TaskRunControllerMock) UpdateStatusCalls

func (mock *TaskRunControllerMock) UpdateStatusCalls() []struct {
	In1 *v1alpha1a.TaskRun
}

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

len(mockedTaskRunController.UpdateStatusCalls())

func (*TaskRunControllerMock) Updater

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

Updater calls UpdaterFunc.

func (*TaskRunControllerMock) UpdaterCalls

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

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

len(mockedTaskRunController.UpdaterCalls())

func (*TaskRunControllerMock) Watch

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

Watch calls WatchFunc.

func (*TaskRunControllerMock) WatchCalls

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

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

len(mockedTaskRunController.WatchCalls())

Jump to

Keyboard shortcuts

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