mocks

package
v0.17.2 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2026 License: Apache-2.0 Imports: 4 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockObjectStore

type MockObjectStore[T store.Object] struct {
	mock.Mock
}

MockObjectStore is an autogenerated mock type for the ObjectStore type

func NewMockObjectStore

func NewMockObjectStore[T store.Object](t interface {
	mock.TestingT
	Cleanup(func())
}) *MockObjectStore[T]

NewMockObjectStore creates a new instance of MockObjectStore. 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 (*MockObjectStore[T]) CreateOrReplace

func (_m *MockObjectStore[T]) CreateOrReplace(ctx context.Context, obj T) error

CreateOrReplace provides a mock function with given fields: ctx, obj

func (*MockObjectStore[T]) Delete

func (_m *MockObjectStore[T]) Delete(ctx context.Context, namespace string, name string) error

Delete provides a mock function with given fields: ctx, namespace, name

func (*MockObjectStore[T]) EXPECT

func (_m *MockObjectStore[T]) EXPECT() *MockObjectStore_Expecter[T]

func (*MockObjectStore[T]) Get

func (_m *MockObjectStore[T]) Get(ctx context.Context, namespace string, name string) (T, error)

Get provides a mock function with given fields: ctx, namespace, name

func (*MockObjectStore[T]) Info

Info provides a mock function with no fields

func (*MockObjectStore[T]) List

func (_m *MockObjectStore[T]) List(ctx context.Context, opts store.ListOpts) (*store.ListResponse[T], error)

List provides a mock function with given fields: ctx, opts

func (*MockObjectStore[T]) Patch

func (_m *MockObjectStore[T]) Patch(ctx context.Context, namespace string, name string, ops ...store.Patch) (T, error)

Patch provides a mock function with given fields: ctx, namespace, name, ops

func (*MockObjectStore[T]) Ready

func (_m *MockObjectStore[T]) Ready() bool

Ready provides a mock function with no fields

type MockObjectStore_CreateOrReplace_Call

type MockObjectStore_CreateOrReplace_Call[T store.Object] struct {
	*mock.Call
}

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

func (*MockObjectStore_CreateOrReplace_Call[T]) Return

func (*MockObjectStore_CreateOrReplace_Call[T]) Run

func (*MockObjectStore_CreateOrReplace_Call[T]) RunAndReturn

type MockObjectStore_Delete_Call

type MockObjectStore_Delete_Call[T store.Object] struct {
	*mock.Call
}

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

func (*MockObjectStore_Delete_Call[T]) Return

func (*MockObjectStore_Delete_Call[T]) Run

func (_c *MockObjectStore_Delete_Call[T]) Run(run func(ctx context.Context, namespace string, name string)) *MockObjectStore_Delete_Call[T]

func (*MockObjectStore_Delete_Call[T]) RunAndReturn

type MockObjectStore_Expecter

type MockObjectStore_Expecter[T store.Object] struct {
	// contains filtered or unexported fields
}

func (*MockObjectStore_Expecter[T]) CreateOrReplace

func (_e *MockObjectStore_Expecter[T]) CreateOrReplace(ctx interface{}, obj interface{}) *MockObjectStore_CreateOrReplace_Call[T]

CreateOrReplace is a helper method to define mock.On call

  • ctx context.Context
  • obj T

func (*MockObjectStore_Expecter[T]) Delete

func (_e *MockObjectStore_Expecter[T]) Delete(ctx interface{}, namespace interface{}, name interface{}) *MockObjectStore_Delete_Call[T]

Delete is a helper method to define mock.On call

  • ctx context.Context
  • namespace string
  • name string

func (*MockObjectStore_Expecter[T]) Get

func (_e *MockObjectStore_Expecter[T]) Get(ctx interface{}, namespace interface{}, name interface{}) *MockObjectStore_Get_Call[T]

Get is a helper method to define mock.On call

  • ctx context.Context
  • namespace string
  • name string

func (*MockObjectStore_Expecter[T]) Info

Info is a helper method to define mock.On call

func (*MockObjectStore_Expecter[T]) List

func (_e *MockObjectStore_Expecter[T]) List(ctx interface{}, opts interface{}) *MockObjectStore_List_Call[T]

List is a helper method to define mock.On call

  • ctx context.Context
  • opts store.ListOpts

func (*MockObjectStore_Expecter[T]) Patch

func (_e *MockObjectStore_Expecter[T]) Patch(ctx interface{}, namespace interface{}, name interface{}, ops ...interface{}) *MockObjectStore_Patch_Call[T]

Patch is a helper method to define mock.On call

  • ctx context.Context
  • namespace string
  • name string
  • ops ...store.Patch

func (*MockObjectStore_Expecter[T]) Ready

Ready is a helper method to define mock.On call

type MockObjectStore_Get_Call

type MockObjectStore_Get_Call[T store.Object] struct {
	*mock.Call
}

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

func (*MockObjectStore_Get_Call[T]) Return

func (_c *MockObjectStore_Get_Call[T]) Return(_a0 T, _a1 error) *MockObjectStore_Get_Call[T]

func (*MockObjectStore_Get_Call[T]) Run

func (_c *MockObjectStore_Get_Call[T]) Run(run func(ctx context.Context, namespace string, name string)) *MockObjectStore_Get_Call[T]

func (*MockObjectStore_Get_Call[T]) RunAndReturn

func (_c *MockObjectStore_Get_Call[T]) RunAndReturn(run func(context.Context, string, string) (T, error)) *MockObjectStore_Get_Call[T]

type MockObjectStore_Info_Call

type MockObjectStore_Info_Call[T store.Object] struct {
	*mock.Call
}

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

func (*MockObjectStore_Info_Call[T]) Return

func (*MockObjectStore_Info_Call[T]) Run

func (_c *MockObjectStore_Info_Call[T]) Run(run func()) *MockObjectStore_Info_Call[T]

func (*MockObjectStore_Info_Call[T]) RunAndReturn

type MockObjectStore_List_Call

type MockObjectStore_List_Call[T store.Object] struct {
	*mock.Call
}

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

func (*MockObjectStore_List_Call[T]) Return

func (*MockObjectStore_List_Call[T]) Run

func (*MockObjectStore_List_Call[T]) RunAndReturn

type MockObjectStore_Patch_Call

type MockObjectStore_Patch_Call[T store.Object] struct {
	*mock.Call
}

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

func (*MockObjectStore_Patch_Call[T]) Return

func (_c *MockObjectStore_Patch_Call[T]) Return(_a0 T, _a1 error) *MockObjectStore_Patch_Call[T]

func (*MockObjectStore_Patch_Call[T]) Run

func (_c *MockObjectStore_Patch_Call[T]) Run(run func(ctx context.Context, namespace string, name string, ops ...store.Patch)) *MockObjectStore_Patch_Call[T]

func (*MockObjectStore_Patch_Call[T]) RunAndReturn

func (_c *MockObjectStore_Patch_Call[T]) RunAndReturn(run func(context.Context, string, string, ...store.Patch) (T, error)) *MockObjectStore_Patch_Call[T]

type MockObjectStore_Ready_Call

type MockObjectStore_Ready_Call[T store.Object] struct {
	*mock.Call
}

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

func (*MockObjectStore_Ready_Call[T]) Return

func (*MockObjectStore_Ready_Call[T]) Run

func (_c *MockObjectStore_Ready_Call[T]) Run(run func()) *MockObjectStore_Ready_Call[T]

func (*MockObjectStore_Ready_Call[T]) RunAndReturn

func (_c *MockObjectStore_Ready_Call[T]) RunAndReturn(run func() bool) *MockObjectStore_Ready_Call[T]

Jump to

Keyboard shortcuts

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