mocks

package
v0.0.0-...-f6f1670 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2025 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Controller

Controller is an autogenerated mock type for the Controller type.

type Manager

type Manager struct {
	mock.Mock
}

Manager is an autogenerated mock type for the Manager type

func NewManager

func NewManager(t interface {
	mock.TestingT
	Cleanup(func())
}) *Manager

NewManager creates a new instance of Manager. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*Manager) Add

func (_m *Manager) Add(_a0 manager.Runnable) error

Add provides a mock function with given fields: _a0

func (*Manager) AddHealthzCheck

func (_m *Manager) AddHealthzCheck(name string, check healthz.Checker) error

AddHealthzCheck provides a mock function with given fields: name, check

func (*Manager) AddMetricsServerExtraHandler

func (_m *Manager) AddMetricsServerExtraHandler(path string, handler http.Handler) error

AddMetricsServerExtraHandler provides a mock function with given fields: path, handler

func (*Manager) AddReadyzCheck

func (_m *Manager) AddReadyzCheck(name string, check healthz.Checker) error

AddReadyzCheck provides a mock function with given fields: name, check

func (*Manager) EXPECT

func (_m *Manager) EXPECT() *Manager_Expecter

func (*Manager) Elected

func (_m *Manager) Elected() <-chan struct{}

Elected provides a mock function with no fields

func (*Manager) GetAPIReader

func (_m *Manager) GetAPIReader() client.Reader

GetAPIReader provides a mock function with no fields

func (*Manager) GetCache

func (_m *Manager) GetCache() cache.Cache

GetCache provides a mock function with no fields

func (*Manager) GetClient

func (_m *Manager) GetClient() client.Client

GetClient provides a mock function with no fields

func (*Manager) GetConfig

func (_m *Manager) GetConfig() *rest.Config

GetConfig provides a mock function with no fields

func (*Manager) GetControllerOptions

func (_m *Manager) GetControllerOptions() config.Controller

GetControllerOptions provides a mock function with no fields

func (*Manager) GetEventRecorderFor

func (_m *Manager) GetEventRecorderFor(name string) record.EventRecorder

GetEventRecorderFor provides a mock function with given fields: name

func (*Manager) GetFieldIndexer

func (_m *Manager) GetFieldIndexer() client.FieldIndexer

GetFieldIndexer provides a mock function with no fields

func (*Manager) GetHTTPClient

func (_m *Manager) GetHTTPClient() *http.Client

GetHTTPClient provides a mock function with no fields

func (*Manager) GetLogger

func (_m *Manager) GetLogger() logr.Logger

GetLogger provides a mock function with no fields

func (*Manager) GetRESTMapper

func (_m *Manager) GetRESTMapper() meta.RESTMapper

GetRESTMapper provides a mock function with no fields

func (*Manager) GetScheme

func (_m *Manager) GetScheme() *runtime.Scheme

GetScheme provides a mock function with no fields

func (*Manager) GetWebhookServer

func (_m *Manager) GetWebhookServer() webhook.Server

GetWebhookServer provides a mock function with no fields

func (*Manager) Start

func (_m *Manager) Start(ctx context.Context) error

Start provides a mock function with given fields: ctx

type Manager_AddHealthzCheck_Call

type Manager_AddHealthzCheck_Call struct {
	*mock.Call
}

Manager_AddHealthzCheck_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddHealthzCheck'

func (*Manager_AddHealthzCheck_Call) Return

func (*Manager_AddHealthzCheck_Call) Run

func (*Manager_AddHealthzCheck_Call) RunAndReturn

type Manager_AddMetricsServerExtraHandler_Call

type Manager_AddMetricsServerExtraHandler_Call struct {
	*mock.Call
}

Manager_AddMetricsServerExtraHandler_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddMetricsServerExtraHandler'

func (*Manager_AddMetricsServerExtraHandler_Call) Return

func (*Manager_AddMetricsServerExtraHandler_Call) Run

func (*Manager_AddMetricsServerExtraHandler_Call) RunAndReturn

type Manager_AddReadyzCheck_Call

type Manager_AddReadyzCheck_Call struct {
	*mock.Call
}

Manager_AddReadyzCheck_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddReadyzCheck'

func (*Manager_AddReadyzCheck_Call) Return

func (*Manager_AddReadyzCheck_Call) Run

func (*Manager_AddReadyzCheck_Call) RunAndReturn

type Manager_Add_Call

type Manager_Add_Call struct {
	*mock.Call
}

Manager_Add_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Add'

func (*Manager_Add_Call) Return

func (_c *Manager_Add_Call) Return(_a0 error) *Manager_Add_Call

func (*Manager_Add_Call) Run

func (_c *Manager_Add_Call) Run(run func(_a0 manager.Runnable)) *Manager_Add_Call

func (*Manager_Add_Call) RunAndReturn

func (_c *Manager_Add_Call) RunAndReturn(run func(manager.Runnable) error) *Manager_Add_Call

type Manager_Elected_Call

type Manager_Elected_Call struct {
	*mock.Call
}

Manager_Elected_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Elected'

func (*Manager_Elected_Call) Return

func (_c *Manager_Elected_Call) Return(_a0 <-chan struct{}) *Manager_Elected_Call

func (*Manager_Elected_Call) Run

func (_c *Manager_Elected_Call) Run(run func()) *Manager_Elected_Call

func (*Manager_Elected_Call) RunAndReturn

func (_c *Manager_Elected_Call) RunAndReturn(run func() <-chan struct{}) *Manager_Elected_Call

type Manager_Expecter

type Manager_Expecter struct {
	// contains filtered or unexported fields
}

func (*Manager_Expecter) Add

func (_e *Manager_Expecter) Add(_a0 interface{}) *Manager_Add_Call

Add is a helper method to define mock.On call

  • _a0 manager.Runnable

func (*Manager_Expecter) AddHealthzCheck

func (_e *Manager_Expecter) AddHealthzCheck(name interface{}, check interface{}) *Manager_AddHealthzCheck_Call

AddHealthzCheck is a helper method to define mock.On call

  • name string
  • check healthz.Checker

func (*Manager_Expecter) AddMetricsServerExtraHandler

func (_e *Manager_Expecter) AddMetricsServerExtraHandler(path interface{}, handler interface{}) *Manager_AddMetricsServerExtraHandler_Call

AddMetricsServerExtraHandler is a helper method to define mock.On call

  • path string
  • handler http.Handler

func (*Manager_Expecter) AddReadyzCheck

func (_e *Manager_Expecter) AddReadyzCheck(name interface{}, check interface{}) *Manager_AddReadyzCheck_Call

AddReadyzCheck is a helper method to define mock.On call

  • name string
  • check healthz.Checker

func (*Manager_Expecter) Elected

func (_e *Manager_Expecter) Elected() *Manager_Elected_Call

Elected is a helper method to define mock.On call

func (*Manager_Expecter) GetAPIReader

func (_e *Manager_Expecter) GetAPIReader() *Manager_GetAPIReader_Call

GetAPIReader is a helper method to define mock.On call

func (*Manager_Expecter) GetCache

func (_e *Manager_Expecter) GetCache() *Manager_GetCache_Call

GetCache is a helper method to define mock.On call

func (*Manager_Expecter) GetClient

func (_e *Manager_Expecter) GetClient() *Manager_GetClient_Call

GetClient is a helper method to define mock.On call

func (*Manager_Expecter) GetConfig

func (_e *Manager_Expecter) GetConfig() *Manager_GetConfig_Call

GetConfig is a helper method to define mock.On call

func (*Manager_Expecter) GetControllerOptions

func (_e *Manager_Expecter) GetControllerOptions() *Manager_GetControllerOptions_Call

GetControllerOptions is a helper method to define mock.On call

func (*Manager_Expecter) GetEventRecorderFor

func (_e *Manager_Expecter) GetEventRecorderFor(name interface{}) *Manager_GetEventRecorderFor_Call

GetEventRecorderFor is a helper method to define mock.On call

  • name string

func (*Manager_Expecter) GetFieldIndexer

func (_e *Manager_Expecter) GetFieldIndexer() *Manager_GetFieldIndexer_Call

GetFieldIndexer is a helper method to define mock.On call

func (*Manager_Expecter) GetHTTPClient

func (_e *Manager_Expecter) GetHTTPClient() *Manager_GetHTTPClient_Call

GetHTTPClient is a helper method to define mock.On call

func (*Manager_Expecter) GetLogger

func (_e *Manager_Expecter) GetLogger() *Manager_GetLogger_Call

GetLogger is a helper method to define mock.On call

func (*Manager_Expecter) GetRESTMapper

func (_e *Manager_Expecter) GetRESTMapper() *Manager_GetRESTMapper_Call

GetRESTMapper is a helper method to define mock.On call

func (*Manager_Expecter) GetScheme

func (_e *Manager_Expecter) GetScheme() *Manager_GetScheme_Call

GetScheme is a helper method to define mock.On call

func (*Manager_Expecter) GetWebhookServer

func (_e *Manager_Expecter) GetWebhookServer() *Manager_GetWebhookServer_Call

GetWebhookServer is a helper method to define mock.On call

func (*Manager_Expecter) Start

func (_e *Manager_Expecter) Start(ctx interface{}) *Manager_Start_Call

Start is a helper method to define mock.On call

  • ctx context.Context

type Manager_GetAPIReader_Call

type Manager_GetAPIReader_Call struct {
	*mock.Call
}

Manager_GetAPIReader_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAPIReader'

func (*Manager_GetAPIReader_Call) Return

func (*Manager_GetAPIReader_Call) Run

func (*Manager_GetAPIReader_Call) RunAndReturn

func (_c *Manager_GetAPIReader_Call) RunAndReturn(run func() client.Reader) *Manager_GetAPIReader_Call

type Manager_GetCache_Call

type Manager_GetCache_Call struct {
	*mock.Call
}

Manager_GetCache_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetCache'

func (*Manager_GetCache_Call) Return

func (*Manager_GetCache_Call) Run

func (_c *Manager_GetCache_Call) Run(run func()) *Manager_GetCache_Call

func (*Manager_GetCache_Call) RunAndReturn

func (_c *Manager_GetCache_Call) RunAndReturn(run func() cache.Cache) *Manager_GetCache_Call

type Manager_GetClient_Call

type Manager_GetClient_Call struct {
	*mock.Call
}

Manager_GetClient_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetClient'

func (*Manager_GetClient_Call) Return

func (*Manager_GetClient_Call) Run

func (_c *Manager_GetClient_Call) Run(run func()) *Manager_GetClient_Call

func (*Manager_GetClient_Call) RunAndReturn

func (_c *Manager_GetClient_Call) RunAndReturn(run func() client.Client) *Manager_GetClient_Call

type Manager_GetConfig_Call

type Manager_GetConfig_Call struct {
	*mock.Call
}

Manager_GetConfig_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetConfig'

func (*Manager_GetConfig_Call) Return

func (*Manager_GetConfig_Call) Run

func (_c *Manager_GetConfig_Call) Run(run func()) *Manager_GetConfig_Call

func (*Manager_GetConfig_Call) RunAndReturn

func (_c *Manager_GetConfig_Call) RunAndReturn(run func() *rest.Config) *Manager_GetConfig_Call

type Manager_GetControllerOptions_Call

type Manager_GetControllerOptions_Call struct {
	*mock.Call
}

Manager_GetControllerOptions_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetControllerOptions'

func (*Manager_GetControllerOptions_Call) Return

func (*Manager_GetControllerOptions_Call) Run

func (*Manager_GetControllerOptions_Call) RunAndReturn

type Manager_GetEventRecorderFor_Call

type Manager_GetEventRecorderFor_Call struct {
	*mock.Call
}

Manager_GetEventRecorderFor_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetEventRecorderFor'

func (*Manager_GetEventRecorderFor_Call) Return

func (*Manager_GetEventRecorderFor_Call) Run

func (*Manager_GetEventRecorderFor_Call) RunAndReturn

type Manager_GetFieldIndexer_Call

type Manager_GetFieldIndexer_Call struct {
	*mock.Call
}

Manager_GetFieldIndexer_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetFieldIndexer'

func (*Manager_GetFieldIndexer_Call) Return

func (*Manager_GetFieldIndexer_Call) Run

func (*Manager_GetFieldIndexer_Call) RunAndReturn

type Manager_GetHTTPClient_Call

type Manager_GetHTTPClient_Call struct {
	*mock.Call
}

Manager_GetHTTPClient_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetHTTPClient'

func (*Manager_GetHTTPClient_Call) Return

func (*Manager_GetHTTPClient_Call) Run

func (*Manager_GetHTTPClient_Call) RunAndReturn

func (_c *Manager_GetHTTPClient_Call) RunAndReturn(run func() *http.Client) *Manager_GetHTTPClient_Call

type Manager_GetLogger_Call

type Manager_GetLogger_Call struct {
	*mock.Call
}

Manager_GetLogger_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetLogger'

func (*Manager_GetLogger_Call) Return

func (*Manager_GetLogger_Call) Run

func (_c *Manager_GetLogger_Call) Run(run func()) *Manager_GetLogger_Call

func (*Manager_GetLogger_Call) RunAndReturn

func (_c *Manager_GetLogger_Call) RunAndReturn(run func() logr.Logger) *Manager_GetLogger_Call

type Manager_GetRESTMapper_Call

type Manager_GetRESTMapper_Call struct {
	*mock.Call
}

Manager_GetRESTMapper_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetRESTMapper'

func (*Manager_GetRESTMapper_Call) Return

func (*Manager_GetRESTMapper_Call) Run

func (*Manager_GetRESTMapper_Call) RunAndReturn

type Manager_GetScheme_Call

type Manager_GetScheme_Call struct {
	*mock.Call
}

Manager_GetScheme_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetScheme'

func (*Manager_GetScheme_Call) Return

func (*Manager_GetScheme_Call) Run

func (_c *Manager_GetScheme_Call) Run(run func()) *Manager_GetScheme_Call

func (*Manager_GetScheme_Call) RunAndReturn

func (_c *Manager_GetScheme_Call) RunAndReturn(run func() *runtime.Scheme) *Manager_GetScheme_Call

type Manager_GetWebhookServer_Call

type Manager_GetWebhookServer_Call struct {
	*mock.Call
}

Manager_GetWebhookServer_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetWebhookServer'

func (*Manager_GetWebhookServer_Call) Return

func (*Manager_GetWebhookServer_Call) Run

func (*Manager_GetWebhookServer_Call) RunAndReturn

type Manager_Start_Call

type Manager_Start_Call struct {
	*mock.Call
}

Manager_Start_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Start'

func (*Manager_Start_Call) Return

func (_c *Manager_Start_Call) Return(_a0 error) *Manager_Start_Call

func (*Manager_Start_Call) Run

func (_c *Manager_Start_Call) Run(run func(ctx context.Context)) *Manager_Start_Call

func (*Manager_Start_Call) RunAndReturn

func (_c *Manager_Start_Call) RunAndReturn(run func(context.Context) error) *Manager_Start_Call

type NatsConfigHandler

type NatsConfigHandler struct {
	mock.Mock
}

NatsConfigHandler is an autogenerated mock type for the NatsConfigHandler type

func NewNatsConfigHandler

func NewNatsConfigHandler(t interface {
	mock.TestingT
	Cleanup(func())
}) *NatsConfigHandler

NewNatsConfigHandler creates a new instance of NatsConfigHandler. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*NatsConfigHandler) EXPECT

func (*NatsConfigHandler) GetNatsConfig

func (_m *NatsConfigHandler) GetNatsConfig(ctx context.Context, _a1 v1alpha1.Eventing) (*env.NATSConfig, error)

GetNatsConfig provides a mock function with given fields: ctx, _a1

type NatsConfigHandler_Expecter

type NatsConfigHandler_Expecter struct {
	// contains filtered or unexported fields
}

func (*NatsConfigHandler_Expecter) GetNatsConfig

func (_e *NatsConfigHandler_Expecter) GetNatsConfig(ctx interface{}, _a1 interface{}) *NatsConfigHandler_GetNatsConfig_Call

GetNatsConfig is a helper method to define mock.On call

  • ctx context.Context
  • _a1 v1alpha1.Eventing

type NatsConfigHandler_GetNatsConfig_Call

type NatsConfigHandler_GetNatsConfig_Call struct {
	*mock.Call
}

NatsConfigHandler_GetNatsConfig_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetNatsConfig'

func (*NatsConfigHandler_GetNatsConfig_Call) Return

func (*NatsConfigHandler_GetNatsConfig_Call) Run

func (*NatsConfigHandler_GetNatsConfig_Call) RunAndReturn

type TypedController

type TypedController[request comparable] struct {
	mock.Mock
}

TypedController is an autogenerated mock type for the TypedController type

func NewTypedController

func NewTypedController[request comparable](t interface {
	mock.TestingT
	Cleanup(func())
}) *TypedController[request]

NewTypedController creates a new instance of TypedController. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*TypedController[request]) EXPECT

func (_m *TypedController[request]) EXPECT() *TypedController_Expecter[request]

func (*TypedController[request]) GetLogger

func (_m *TypedController[request]) GetLogger() logr.Logger

GetLogger provides a mock function with no fields

func (*TypedController[request]) Reconcile

func (_m *TypedController[request]) Reconcile(_a0 context.Context, _a1 request) (reconcile.Result, error)

Reconcile provides a mock function with given fields: _a0, _a1

func (*TypedController[request]) Start

func (_m *TypedController[request]) Start(ctx context.Context) error

Start provides a mock function with given fields: ctx

func (*TypedController[request]) Watch

func (_m *TypedController[request]) Watch(src source.TypedSource[request]) error

Watch provides a mock function with given fields: src

type TypedController_Expecter

type TypedController_Expecter[request comparable] struct {
	// contains filtered or unexported fields
}

func (*TypedController_Expecter[request]) GetLogger

func (_e *TypedController_Expecter[request]) GetLogger() *TypedController_GetLogger_Call[request]

GetLogger is a helper method to define mock.On call

func (*TypedController_Expecter[request]) Reconcile

func (_e *TypedController_Expecter[request]) Reconcile(_a0 interface{}, _a1 interface{}) *TypedController_Reconcile_Call[request]

Reconcile is a helper method to define mock.On call

  • _a0 context.Context
  • _a1 request

func (*TypedController_Expecter[request]) Start

func (_e *TypedController_Expecter[request]) Start(ctx interface{}) *TypedController_Start_Call[request]

Start is a helper method to define mock.On call

  • ctx context.Context

func (*TypedController_Expecter[request]) Watch

func (_e *TypedController_Expecter[request]) Watch(src interface{}) *TypedController_Watch_Call[request]

Watch is a helper method to define mock.On call

  • src source.TypedSource[request]

type TypedController_GetLogger_Call

type TypedController_GetLogger_Call[request comparable] struct {
	*mock.Call
}

TypedController_GetLogger_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetLogger'

func (*TypedController_GetLogger_Call[request]) Return

func (_c *TypedController_GetLogger_Call[request]) Return(_a0 logr.Logger) *TypedController_GetLogger_Call[request]

func (*TypedController_GetLogger_Call[request]) Run

func (_c *TypedController_GetLogger_Call[request]) Run(run func()) *TypedController_GetLogger_Call[request]

func (*TypedController_GetLogger_Call[request]) RunAndReturn

func (_c *TypedController_GetLogger_Call[request]) RunAndReturn(run func() logr.Logger) *TypedController_GetLogger_Call[request]

type TypedController_Reconcile_Call

type TypedController_Reconcile_Call[request comparable] struct {
	*mock.Call
}

TypedController_Reconcile_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Reconcile'

func (*TypedController_Reconcile_Call[request]) Return

func (*TypedController_Reconcile_Call[request]) Run

func (_c *TypedController_Reconcile_Call[request]) Run(run func(_a0 context.Context, _a1 request)) *TypedController_Reconcile_Call[request]

func (*TypedController_Reconcile_Call[request]) RunAndReturn

func (_c *TypedController_Reconcile_Call[request]) RunAndReturn(run func(context.Context, request) (reconcile.Result, error)) *TypedController_Reconcile_Call[request]

type TypedController_Start_Call

type TypedController_Start_Call[request comparable] struct {
	*mock.Call
}

TypedController_Start_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Start'

func (*TypedController_Start_Call[request]) Return

func (_c *TypedController_Start_Call[request]) Return(_a0 error) *TypedController_Start_Call[request]

func (*TypedController_Start_Call[request]) Run

func (_c *TypedController_Start_Call[request]) Run(run func(ctx context.Context)) *TypedController_Start_Call[request]

func (*TypedController_Start_Call[request]) RunAndReturn

func (_c *TypedController_Start_Call[request]) RunAndReturn(run func(context.Context) error) *TypedController_Start_Call[request]

type TypedController_Watch_Call

type TypedController_Watch_Call[request comparable] struct {
	*mock.Call
}

TypedController_Watch_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Watch'

func (*TypedController_Watch_Call[request]) Return

func (_c *TypedController_Watch_Call[request]) Return(_a0 error) *TypedController_Watch_Call[request]

func (*TypedController_Watch_Call[request]) Run

func (_c *TypedController_Watch_Call[request]) Run(run func(src source.TypedSource[request])) *TypedController_Watch_Call[request]

func (*TypedController_Watch_Call[request]) RunAndReturn

func (_c *TypedController_Watch_Call[request]) RunAndReturn(run func(source.TypedSource[request]) error) *TypedController_Watch_Call[request]

Jump to

Keyboard shortcuts

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