fakes

package
v0.0.0-...-4370ff1 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2022 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 JobControllerMock

type JobControllerMock struct {
	// AddClusterScopedFeatureHandlerFunc mocks the AddClusterScopedFeatureHandler method.
	AddClusterScopedFeatureHandlerFunc func(ctx context.Context, enabled func() bool, name string, clusterName string, handler v1a.JobHandlerFunc)

	// AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method.
	AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, handler v1a.JobHandlerFunc)

	// AddFeatureHandlerFunc mocks the AddFeatureHandler method.
	AddFeatureHandlerFunc func(ctx context.Context, enabled func() bool, name string, sync v1a.JobHandlerFunc)

	// AddHandlerFunc mocks the AddHandler method.
	AddHandlerFunc func(ctx context.Context, name string, handler v1a.JobHandlerFunc)

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

	// EnqueueAfterFunc mocks the EnqueueAfter method.
	EnqueueAfterFunc func(namespace string, name string, after time.Duration)

	// GenericFunc mocks the Generic method.
	GenericFunc func() controller.GenericController

	// InformerFunc mocks the Informer method.
	InformerFunc func() cache.SharedIndexInformer

	// ListerFunc mocks the Lister method.
	ListerFunc func() v1a.JobLister

	// StartFunc mocks the Start method.
	StartFunc func(ctx context.Context, threadiness int) error

	// SyncFunc mocks the Sync method.
	SyncFunc func(ctx context.Context) error
	// contains filtered or unexported fields
}

JobControllerMock is a mock implementation of JobController.

    func TestSomethingThatUsesJobController(t *testing.T) {

        // make and configure a mocked JobController
        mockedJobController := &JobControllerMock{
            AddClusterScopedFeatureHandlerFunc: func(ctx context.Context, enabled func() bool, name string, clusterName string, handler v1a.JobHandlerFunc)  {
	               panic("mock out the AddClusterScopedFeatureHandler method")
            },
            AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, handler v1a.JobHandlerFunc)  {
	               panic("mock out the AddClusterScopedHandler method")
            },
            AddFeatureHandlerFunc: func(ctx context.Context, enabled func() bool, name string, sync v1a.JobHandlerFunc)  {
	               panic("mock out the AddFeatureHandler method")
            },
            AddHandlerFunc: func(ctx context.Context, name string, handler v1a.JobHandlerFunc)  {
	               panic("mock out the AddHandler method")
            },
            EnqueueFunc: func(namespace string, name string)  {
	               panic("mock out the Enqueue method")
            },
            EnqueueAfterFunc: func(namespace string, name string, after time.Duration)  {
	               panic("mock out the EnqueueAfter method")
            },
            GenericFunc: func() controller.GenericController {
	               panic("mock out the Generic method")
            },
            InformerFunc: func() cache.SharedIndexInformer {
	               panic("mock out the Informer method")
            },
            ListerFunc: func() v1a.JobLister {
	               panic("mock out the Lister method")
            },
            StartFunc: func(ctx context.Context, threadiness int) error {
	               panic("mock out the Start method")
            },
            SyncFunc: func(ctx context.Context) error {
	               panic("mock out the Sync method")
            },
        }

        // use mockedJobController in code that requires JobController
        // and then make assertions.

    }

func (*JobControllerMock) AddClusterScopedFeatureHandler

func (mock *JobControllerMock) AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name string, clusterName string, handler v1a.JobHandlerFunc)

AddClusterScopedFeatureHandler calls AddClusterScopedFeatureHandlerFunc.

func (*JobControllerMock) AddClusterScopedFeatureHandlerCalls

func (mock *JobControllerMock) AddClusterScopedFeatureHandlerCalls() []struct {
	Ctx         context.Context
	Enabled     func() bool
	Name        string
	ClusterName string
	Handler     v1a.JobHandlerFunc
}

AddClusterScopedFeatureHandlerCalls gets all the calls that were made to AddClusterScopedFeatureHandler. Check the length with:

len(mockedJobController.AddClusterScopedFeatureHandlerCalls())

func (*JobControllerMock) AddClusterScopedHandler

func (mock *JobControllerMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, handler v1a.JobHandlerFunc)

AddClusterScopedHandler calls AddClusterScopedHandlerFunc.

func (*JobControllerMock) AddClusterScopedHandlerCalls

func (mock *JobControllerMock) AddClusterScopedHandlerCalls() []struct {
	Ctx         context.Context
	Name        string
	ClusterName string
	Handler     v1a.JobHandlerFunc
}

AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. Check the length with:

len(mockedJobController.AddClusterScopedHandlerCalls())

func (*JobControllerMock) AddFeatureHandler

func (mock *JobControllerMock) AddFeatureHandler(ctx context.Context, enabled func() bool, name string, sync v1a.JobHandlerFunc)

AddFeatureHandler calls AddFeatureHandlerFunc.

func (*JobControllerMock) AddFeatureHandlerCalls

func (mock *JobControllerMock) AddFeatureHandlerCalls() []struct {
	Ctx     context.Context
	Enabled func() bool
	Name    string
	Sync    v1a.JobHandlerFunc
}

AddFeatureHandlerCalls gets all the calls that were made to AddFeatureHandler. Check the length with:

len(mockedJobController.AddFeatureHandlerCalls())

func (*JobControllerMock) AddHandler

func (mock *JobControllerMock) AddHandler(ctx context.Context, name string, handler v1a.JobHandlerFunc)

AddHandler calls AddHandlerFunc.

func (*JobControllerMock) AddHandlerCalls

func (mock *JobControllerMock) AddHandlerCalls() []struct {
	Ctx     context.Context
	Name    string
	Handler v1a.JobHandlerFunc
}

AddHandlerCalls gets all the calls that were made to AddHandler. Check the length with:

len(mockedJobController.AddHandlerCalls())

func (*JobControllerMock) Enqueue

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

Enqueue calls EnqueueFunc.

func (*JobControllerMock) EnqueueAfter

func (mock *JobControllerMock) EnqueueAfter(namespace string, name string, after time.Duration)

EnqueueAfter calls EnqueueAfterFunc.

func (*JobControllerMock) EnqueueAfterCalls

func (mock *JobControllerMock) EnqueueAfterCalls() []struct {
	Namespace string
	Name      string
	After     time.Duration
}

EnqueueAfterCalls gets all the calls that were made to EnqueueAfter. Check the length with:

len(mockedJobController.EnqueueAfterCalls())

func (*JobControllerMock) EnqueueCalls

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

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

len(mockedJobController.EnqueueCalls())

func (*JobControllerMock) Generic

Generic calls GenericFunc.

func (*JobControllerMock) GenericCalls

func (mock *JobControllerMock) GenericCalls() []struct {
}

GenericCalls gets all the calls that were made to Generic. Check the length with:

len(mockedJobController.GenericCalls())

func (*JobControllerMock) Informer

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

Informer calls InformerFunc.

func (*JobControllerMock) InformerCalls

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

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

len(mockedJobController.InformerCalls())

func (*JobControllerMock) Lister

func (mock *JobControllerMock) Lister() v1a.JobLister

Lister calls ListerFunc.

func (*JobControllerMock) ListerCalls

func (mock *JobControllerMock) ListerCalls() []struct {
}

ListerCalls gets all the calls that were made to Lister. Check the length with:

len(mockedJobController.ListerCalls())

func (*JobControllerMock) Start

func (mock *JobControllerMock) Start(ctx context.Context, threadiness int) error

Start calls StartFunc.

func (*JobControllerMock) StartCalls

func (mock *JobControllerMock) StartCalls() []struct {
	Ctx         context.Context
	Threadiness int
}

StartCalls gets all the calls that were made to Start. Check the length with:

len(mockedJobController.StartCalls())

func (*JobControllerMock) Sync

func (mock *JobControllerMock) Sync(ctx context.Context) error

Sync calls SyncFunc.

func (*JobControllerMock) SyncCalls

func (mock *JobControllerMock) SyncCalls() []struct {
	Ctx context.Context
}

SyncCalls gets all the calls that were made to Sync. Check the length with:

len(mockedJobController.SyncCalls())

type JobInterfaceMock

type JobInterfaceMock struct {
	// AddClusterScopedFeatureHandlerFunc mocks the AddClusterScopedFeatureHandler method.
	AddClusterScopedFeatureHandlerFunc func(ctx context.Context, enabled func() bool, name string, clusterName string, sync v1a.JobHandlerFunc)

	// AddClusterScopedFeatureLifecycleFunc mocks the AddClusterScopedFeatureLifecycle method.
	AddClusterScopedFeatureLifecycleFunc func(ctx context.Context, enabled func() bool, name string, clusterName string, lifecycle v1a.JobLifecycle)

	// AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method.
	AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, sync v1a.JobHandlerFunc)

	// AddClusterScopedLifecycleFunc mocks the AddClusterScopedLifecycle method.
	AddClusterScopedLifecycleFunc func(ctx context.Context, name string, clusterName string, lifecycle v1a.JobLifecycle)

	// AddFeatureHandlerFunc mocks the AddFeatureHandler method.
	AddFeatureHandlerFunc func(ctx context.Context, enabled func() bool, name string, sync v1a.JobHandlerFunc)

	// AddFeatureLifecycleFunc mocks the AddFeatureLifecycle method.
	AddFeatureLifecycleFunc func(ctx context.Context, enabled func() bool, name string, lifecycle v1a.JobLifecycle)

	// AddHandlerFunc mocks the AddHandler method.
	AddHandlerFunc func(ctx context.Context, name string, sync v1a.JobHandlerFunc)

	// AddLifecycleFunc mocks the AddLifecycle method.
	AddLifecycleFunc func(ctx context.Context, name string, lifecycle v1a.JobLifecycle)

	// ControllerFunc mocks the Controller method.
	ControllerFunc func() v1a.JobController

	// CreateFunc mocks the Create method.
	CreateFunc func(in1 *v1.Job) (*v1.Job, error)

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

	// DeleteCollectionFunc mocks the DeleteCollection method.
	DeleteCollectionFunc func(deleteOpts *v1b.DeleteOptions, listOpts v1b.ListOptions) error

	// DeleteNamespacedFunc mocks the DeleteNamespaced method.
	DeleteNamespacedFunc func(namespace string, name string, options *v1b.DeleteOptions) error

	// GetFunc mocks the Get method.
	GetFunc func(name string, opts v1b.GetOptions) (*v1.Job, error)

	// GetNamespacedFunc mocks the GetNamespaced method.
	GetNamespacedFunc func(namespace string, name string, opts v1b.GetOptions) (*v1.Job, error)

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

	// ListNamespacedFunc mocks the ListNamespaced method.
	ListNamespacedFunc func(namespace string, opts v1b.ListOptions) (*v1a.JobList, error)

	// ObjectClientFunc mocks the ObjectClient method.
	ObjectClientFunc func() *objectclient.ObjectClient

	// UpdateFunc mocks the Update method.
	UpdateFunc func(in1 *v1.Job) (*v1.Job, error)

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

JobInterfaceMock is a mock implementation of JobInterface.

    func TestSomethingThatUsesJobInterface(t *testing.T) {

        // make and configure a mocked JobInterface
        mockedJobInterface := &JobInterfaceMock{
            AddClusterScopedFeatureHandlerFunc: func(ctx context.Context, enabled func() bool, name string, clusterName string, sync v1a.JobHandlerFunc)  {
	               panic("mock out the AddClusterScopedFeatureHandler method")
            },
            AddClusterScopedFeatureLifecycleFunc: func(ctx context.Context, enabled func() bool, name string, clusterName string, lifecycle v1a.JobLifecycle)  {
	               panic("mock out the AddClusterScopedFeatureLifecycle method")
            },
            AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, sync v1a.JobHandlerFunc)  {
	               panic("mock out the AddClusterScopedHandler method")
            },
            AddClusterScopedLifecycleFunc: func(ctx context.Context, name string, clusterName string, lifecycle v1a.JobLifecycle)  {
	               panic("mock out the AddClusterScopedLifecycle method")
            },
            AddFeatureHandlerFunc: func(ctx context.Context, enabled func() bool, name string, sync v1a.JobHandlerFunc)  {
	               panic("mock out the AddFeatureHandler method")
            },
            AddFeatureLifecycleFunc: func(ctx context.Context, enabled func() bool, name string, lifecycle v1a.JobLifecycle)  {
	               panic("mock out the AddFeatureLifecycle method")
            },
            AddHandlerFunc: func(ctx context.Context, name string, sync v1a.JobHandlerFunc)  {
	               panic("mock out the AddHandler method")
            },
            AddLifecycleFunc: func(ctx context.Context, name string, lifecycle v1a.JobLifecycle)  {
	               panic("mock out the AddLifecycle method")
            },
            ControllerFunc: func() v1a.JobController {
	               panic("mock out the Controller method")
            },
            CreateFunc: func(in1 *v1.Job) (*v1.Job, error) {
	               panic("mock out the Create method")
            },
            DeleteFunc: func(name string, options *v1b.DeleteOptions) error {
	               panic("mock out the Delete method")
            },
            DeleteCollectionFunc: func(deleteOpts *v1b.DeleteOptions, listOpts v1b.ListOptions) error {
	               panic("mock out the DeleteCollection method")
            },
            DeleteNamespacedFunc: func(namespace string, name string, options *v1b.DeleteOptions) error {
	               panic("mock out the DeleteNamespaced method")
            },
            GetFunc: func(name string, opts v1b.GetOptions) (*v1.Job, error) {
	               panic("mock out the Get method")
            },
            GetNamespacedFunc: func(namespace string, name string, opts v1b.GetOptions) (*v1.Job, error) {
	               panic("mock out the GetNamespaced method")
            },
            ListFunc: func(opts v1b.ListOptions) (*v1a.JobList, error) {
	               panic("mock out the List method")
            },
            ListNamespacedFunc: func(namespace string, opts v1b.ListOptions) (*v1a.JobList, error) {
	               panic("mock out the ListNamespaced method")
            },
            ObjectClientFunc: func() *objectclient.ObjectClient {
	               panic("mock out the ObjectClient method")
            },
            UpdateFunc: func(in1 *v1.Job) (*v1.Job, error) {
	               panic("mock out the Update method")
            },
            WatchFunc: func(opts v1b.ListOptions) (watch.Interface, error) {
	               panic("mock out the Watch method")
            },
        }

        // use mockedJobInterface in code that requires JobInterface
        // and then make assertions.

    }

func (*JobInterfaceMock) AddClusterScopedFeatureHandler

func (mock *JobInterfaceMock) AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name string, clusterName string, sync v1a.JobHandlerFunc)

AddClusterScopedFeatureHandler calls AddClusterScopedFeatureHandlerFunc.

func (*JobInterfaceMock) AddClusterScopedFeatureHandlerCalls

func (mock *JobInterfaceMock) AddClusterScopedFeatureHandlerCalls() []struct {
	Ctx         context.Context
	Enabled     func() bool
	Name        string
	ClusterName string
	Sync        v1a.JobHandlerFunc
}

AddClusterScopedFeatureHandlerCalls gets all the calls that were made to AddClusterScopedFeatureHandler. Check the length with:

len(mockedJobInterface.AddClusterScopedFeatureHandlerCalls())

func (*JobInterfaceMock) AddClusterScopedFeatureLifecycle

func (mock *JobInterfaceMock) AddClusterScopedFeatureLifecycle(ctx context.Context, enabled func() bool, name string, clusterName string, lifecycle v1a.JobLifecycle)

AddClusterScopedFeatureLifecycle calls AddClusterScopedFeatureLifecycleFunc.

func (*JobInterfaceMock) AddClusterScopedFeatureLifecycleCalls

func (mock *JobInterfaceMock) AddClusterScopedFeatureLifecycleCalls() []struct {
	Ctx         context.Context
	Enabled     func() bool
	Name        string
	ClusterName string
	Lifecycle   v1a.JobLifecycle
}

AddClusterScopedFeatureLifecycleCalls gets all the calls that were made to AddClusterScopedFeatureLifecycle. Check the length with:

len(mockedJobInterface.AddClusterScopedFeatureLifecycleCalls())

func (*JobInterfaceMock) AddClusterScopedHandler

func (mock *JobInterfaceMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, sync v1a.JobHandlerFunc)

AddClusterScopedHandler calls AddClusterScopedHandlerFunc.

func (*JobInterfaceMock) AddClusterScopedHandlerCalls

func (mock *JobInterfaceMock) AddClusterScopedHandlerCalls() []struct {
	Ctx         context.Context
	Name        string
	ClusterName string
	Sync        v1a.JobHandlerFunc
}

AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. Check the length with:

len(mockedJobInterface.AddClusterScopedHandlerCalls())

func (*JobInterfaceMock) AddClusterScopedLifecycle

func (mock *JobInterfaceMock) AddClusterScopedLifecycle(ctx context.Context, name string, clusterName string, lifecycle v1a.JobLifecycle)

AddClusterScopedLifecycle calls AddClusterScopedLifecycleFunc.

func (*JobInterfaceMock) AddClusterScopedLifecycleCalls

func (mock *JobInterfaceMock) AddClusterScopedLifecycleCalls() []struct {
	Ctx         context.Context
	Name        string
	ClusterName string
	Lifecycle   v1a.JobLifecycle
}

AddClusterScopedLifecycleCalls gets all the calls that were made to AddClusterScopedLifecycle. Check the length with:

len(mockedJobInterface.AddClusterScopedLifecycleCalls())

func (*JobInterfaceMock) AddFeatureHandler

func (mock *JobInterfaceMock) AddFeatureHandler(ctx context.Context, enabled func() bool, name string, sync v1a.JobHandlerFunc)

AddFeatureHandler calls AddFeatureHandlerFunc.

func (*JobInterfaceMock) AddFeatureHandlerCalls

func (mock *JobInterfaceMock) AddFeatureHandlerCalls() []struct {
	Ctx     context.Context
	Enabled func() bool
	Name    string
	Sync    v1a.JobHandlerFunc
}

AddFeatureHandlerCalls gets all the calls that were made to AddFeatureHandler. Check the length with:

len(mockedJobInterface.AddFeatureHandlerCalls())

func (*JobInterfaceMock) AddFeatureLifecycle

func (mock *JobInterfaceMock) AddFeatureLifecycle(ctx context.Context, enabled func() bool, name string, lifecycle v1a.JobLifecycle)

AddFeatureLifecycle calls AddFeatureLifecycleFunc.

func (*JobInterfaceMock) AddFeatureLifecycleCalls

func (mock *JobInterfaceMock) AddFeatureLifecycleCalls() []struct {
	Ctx       context.Context
	Enabled   func() bool
	Name      string
	Lifecycle v1a.JobLifecycle
}

AddFeatureLifecycleCalls gets all the calls that were made to AddFeatureLifecycle. Check the length with:

len(mockedJobInterface.AddFeatureLifecycleCalls())

func (*JobInterfaceMock) AddHandler

func (mock *JobInterfaceMock) AddHandler(ctx context.Context, name string, sync v1a.JobHandlerFunc)

AddHandler calls AddHandlerFunc.

func (*JobInterfaceMock) AddHandlerCalls

func (mock *JobInterfaceMock) AddHandlerCalls() []struct {
	Ctx  context.Context
	Name string
	Sync v1a.JobHandlerFunc
}

AddHandlerCalls gets all the calls that were made to AddHandler. Check the length with:

len(mockedJobInterface.AddHandlerCalls())

func (*JobInterfaceMock) AddLifecycle

func (mock *JobInterfaceMock) AddLifecycle(ctx context.Context, name string, lifecycle v1a.JobLifecycle)

AddLifecycle calls AddLifecycleFunc.

func (*JobInterfaceMock) AddLifecycleCalls

func (mock *JobInterfaceMock) AddLifecycleCalls() []struct {
	Ctx       context.Context
	Name      string
	Lifecycle v1a.JobLifecycle
}

AddLifecycleCalls gets all the calls that were made to AddLifecycle. Check the length with:

len(mockedJobInterface.AddLifecycleCalls())

func (*JobInterfaceMock) Controller

func (mock *JobInterfaceMock) Controller() v1a.JobController

Controller calls ControllerFunc.

func (*JobInterfaceMock) ControllerCalls

func (mock *JobInterfaceMock) ControllerCalls() []struct {
}

ControllerCalls gets all the calls that were made to Controller. Check the length with:

len(mockedJobInterface.ControllerCalls())

func (*JobInterfaceMock) Create

func (mock *JobInterfaceMock) Create(in1 *v1.Job) (*v1.Job, error)

Create calls CreateFunc.

func (*JobInterfaceMock) CreateCalls

func (mock *JobInterfaceMock) CreateCalls() []struct {
	In1 *v1.Job
}

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

len(mockedJobInterface.CreateCalls())

func (*JobInterfaceMock) Delete

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

Delete calls DeleteFunc.

func (*JobInterfaceMock) DeleteCalls

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

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

len(mockedJobInterface.DeleteCalls())

func (*JobInterfaceMock) DeleteCollection

func (mock *JobInterfaceMock) DeleteCollection(deleteOpts *v1b.DeleteOptions, listOpts v1b.ListOptions) error

DeleteCollection calls DeleteCollectionFunc.

func (*JobInterfaceMock) DeleteCollectionCalls

func (mock *JobInterfaceMock) DeleteCollectionCalls() []struct {
	DeleteOpts *v1b.DeleteOptions
	ListOpts   v1b.ListOptions
}

DeleteCollectionCalls gets all the calls that were made to DeleteCollection. Check the length with:

len(mockedJobInterface.DeleteCollectionCalls())

func (*JobInterfaceMock) DeleteNamespaced

func (mock *JobInterfaceMock) DeleteNamespaced(namespace string, name string, options *v1b.DeleteOptions) error

DeleteNamespaced calls DeleteNamespacedFunc.

func (*JobInterfaceMock) DeleteNamespacedCalls

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

DeleteNamespacedCalls gets all the calls that were made to DeleteNamespaced. Check the length with:

len(mockedJobInterface.DeleteNamespacedCalls())

func (*JobInterfaceMock) Get

func (mock *JobInterfaceMock) Get(name string, opts v1b.GetOptions) (*v1.Job, error)

Get calls GetFunc.

func (*JobInterfaceMock) GetCalls

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

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

len(mockedJobInterface.GetCalls())

func (*JobInterfaceMock) GetNamespaced

func (mock *JobInterfaceMock) GetNamespaced(namespace string, name string, opts v1b.GetOptions) (*v1.Job, error)

GetNamespaced calls GetNamespacedFunc.

func (*JobInterfaceMock) GetNamespacedCalls

func (mock *JobInterfaceMock) GetNamespacedCalls() []struct {
	Namespace string
	Name      string
	Opts      v1b.GetOptions
}

GetNamespacedCalls gets all the calls that were made to GetNamespaced. Check the length with:

len(mockedJobInterface.GetNamespacedCalls())

func (*JobInterfaceMock) List

func (mock *JobInterfaceMock) List(opts v1b.ListOptions) (*v1a.JobList, error)

List calls ListFunc.

func (*JobInterfaceMock) ListCalls

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

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

len(mockedJobInterface.ListCalls())

func (*JobInterfaceMock) ListNamespaced

func (mock *JobInterfaceMock) ListNamespaced(namespace string, opts v1b.ListOptions) (*v1a.JobList, error)

ListNamespaced calls ListNamespacedFunc.

func (*JobInterfaceMock) ListNamespacedCalls

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

ListNamespacedCalls gets all the calls that were made to ListNamespaced. Check the length with:

len(mockedJobInterface.ListNamespacedCalls())

func (*JobInterfaceMock) ObjectClient

func (mock *JobInterfaceMock) ObjectClient() *objectclient.ObjectClient

ObjectClient calls ObjectClientFunc.

func (*JobInterfaceMock) ObjectClientCalls

func (mock *JobInterfaceMock) ObjectClientCalls() []struct {
}

ObjectClientCalls gets all the calls that were made to ObjectClient. Check the length with:

len(mockedJobInterface.ObjectClientCalls())

func (*JobInterfaceMock) Update

func (mock *JobInterfaceMock) Update(in1 *v1.Job) (*v1.Job, error)

Update calls UpdateFunc.

func (*JobInterfaceMock) UpdateCalls

func (mock *JobInterfaceMock) UpdateCalls() []struct {
	In1 *v1.Job
}

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

len(mockedJobInterface.UpdateCalls())

func (*JobInterfaceMock) Watch

func (mock *JobInterfaceMock) Watch(opts v1b.ListOptions) (watch.Interface, error)

Watch calls WatchFunc.

func (*JobInterfaceMock) WatchCalls

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

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

len(mockedJobInterface.WatchCalls())

type JobListerMock

type JobListerMock struct {
	// GetFunc mocks the Get method.
	GetFunc func(namespace string, name string) (*v1.Job, error)

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

JobListerMock is a mock implementation of JobLister.

    func TestSomethingThatUsesJobLister(t *testing.T) {

        // make and configure a mocked JobLister
        mockedJobLister := &JobListerMock{
            GetFunc: func(namespace string, name string) (*v1.Job, error) {
	               panic("mock out the Get method")
            },
            ListFunc: func(namespace string, selector labels.Selector) ([]*v1.Job, error) {
	               panic("mock out the List method")
            },
        }

        // use mockedJobLister in code that requires JobLister
        // and then make assertions.

    }

func (*JobListerMock) Get

func (mock *JobListerMock) Get(namespace string, name string) (*v1.Job, error)

Get calls GetFunc.

func (*JobListerMock) GetCalls

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

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

len(mockedJobLister.GetCalls())

func (*JobListerMock) List

func (mock *JobListerMock) List(namespace string, selector labels.Selector) ([]*v1.Job, error)

List calls ListFunc.

func (*JobListerMock) ListCalls

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

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

len(mockedJobLister.ListCalls())

type JobsGetterMock

type JobsGetterMock struct {
	// JobsFunc mocks the Jobs method.
	JobsFunc func(namespace string) v1a.JobInterface
	// contains filtered or unexported fields
}

JobsGetterMock is a mock implementation of JobsGetter.

    func TestSomethingThatUsesJobsGetter(t *testing.T) {

        // make and configure a mocked JobsGetter
        mockedJobsGetter := &JobsGetterMock{
            JobsFunc: func(namespace string) v1a.JobInterface {
	               panic("mock out the Jobs method")
            },
        }

        // use mockedJobsGetter in code that requires JobsGetter
        // and then make assertions.

    }

func (*JobsGetterMock) Jobs

func (mock *JobsGetterMock) Jobs(namespace string) v1a.JobInterface

Jobs calls JobsFunc.

func (*JobsGetterMock) JobsCalls

func (mock *JobsGetterMock) JobsCalls() []struct {
	Namespace string
}

JobsCalls gets all the calls that were made to Jobs. Check the length with:

len(mockedJobsGetter.JobsCalls())

Jump to

Keyboard shortcuts

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