mocks

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFakeStore

func NewFakeStore() store.Store

Types

type MockStore

type MockStore struct {
	Store
	sync.Mutex
	// contains filtered or unexported fields
}

func (*MockStore) GetMockWorkloadStatus

func (m *MockStore) GetMockWorkloadStatus(ID string) *types.WorkloadStatus

type Store

type Store struct {
	mock.Mock
}

Store is an autogenerated mock type for the Store type

func NewStore

func NewStore(t interface {
	mock.TestingT
	Cleanup(func())
}) *Store

NewStore creates a new instance of Store. 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 (*Store) EXPECT

func (_m *Store) EXPECT() *Store_Expecter

func (*Store) GetIdentifier

func (_mock *Store) GetIdentifier(ctx context.Context) string

GetIdentifier provides a mock function for the type Store

func (*Store) GetNode

func (_mock *Store) GetNode(ctx context.Context, nodename string) (*types.Node, error)

GetNode provides a mock function for the type Store

func (*Store) GetNodeStatus

func (_mock *Store) GetNodeStatus(ctx context.Context, nodename string) (*types.NodeStatus, error)

GetNodeStatus provides a mock function for the type Store

func (*Store) SetNodeStatus

func (_mock *Store) SetNodeStatus(ctx context.Context, ttl int64) error

SetNodeStatus provides a mock function for the type Store

func (*Store) SetWorkloadStatus

func (_mock *Store) SetWorkloadStatus(ctx context.Context, status *types.WorkloadStatus, ttl int64) error

SetWorkloadStatus provides a mock function for the type Store

type Store_Expecter

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

func (*Store_Expecter) GetIdentifier

func (_e *Store_Expecter) GetIdentifier(ctx any) *Store_GetIdentifier_Call

GetIdentifier is a helper method to define mock.On call

  • ctx context.Context

func (*Store_Expecter) GetNode

func (_e *Store_Expecter) GetNode(ctx any, nodename any) *Store_GetNode_Call

GetNode is a helper method to define mock.On call

  • ctx context.Context
  • nodename string

func (*Store_Expecter) GetNodeStatus

func (_e *Store_Expecter) GetNodeStatus(ctx any, nodename any) *Store_GetNodeStatus_Call

GetNodeStatus is a helper method to define mock.On call

  • ctx context.Context
  • nodename string

func (*Store_Expecter) SetNodeStatus

func (_e *Store_Expecter) SetNodeStatus(ctx any, ttl any) *Store_SetNodeStatus_Call

SetNodeStatus is a helper method to define mock.On call

  • ctx context.Context
  • ttl int64

func (*Store_Expecter) SetWorkloadStatus

func (_e *Store_Expecter) SetWorkloadStatus(ctx any, status any, ttl any) *Store_SetWorkloadStatus_Call

SetWorkloadStatus is a helper method to define mock.On call

  • ctx context.Context
  • status *types.WorkloadStatus
  • ttl int64

type Store_GetIdentifier_Call

type Store_GetIdentifier_Call struct {
	*mock.Call
}

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

func (*Store_GetIdentifier_Call) Return

func (*Store_GetIdentifier_Call) Run

func (*Store_GetIdentifier_Call) RunAndReturn

func (_c *Store_GetIdentifier_Call) RunAndReturn(run func(ctx context.Context) string) *Store_GetIdentifier_Call

type Store_GetNodeStatus_Call

type Store_GetNodeStatus_Call struct {
	*mock.Call
}

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

func (*Store_GetNodeStatus_Call) Return

func (*Store_GetNodeStatus_Call) Run

func (_c *Store_GetNodeStatus_Call) Run(run func(ctx context.Context, nodename string)) *Store_GetNodeStatus_Call

func (*Store_GetNodeStatus_Call) RunAndReturn

func (_c *Store_GetNodeStatus_Call) RunAndReturn(run func(ctx context.Context, nodename string) (*types.NodeStatus, error)) *Store_GetNodeStatus_Call

type Store_GetNode_Call

type Store_GetNode_Call struct {
	*mock.Call
}

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

func (*Store_GetNode_Call) Return

func (_c *Store_GetNode_Call) Return(node *types.Node, err error) *Store_GetNode_Call

func (*Store_GetNode_Call) Run

func (_c *Store_GetNode_Call) Run(run func(ctx context.Context, nodename string)) *Store_GetNode_Call

func (*Store_GetNode_Call) RunAndReturn

func (_c *Store_GetNode_Call) RunAndReturn(run func(ctx context.Context, nodename string) (*types.Node, error)) *Store_GetNode_Call

type Store_SetNodeStatus_Call

type Store_SetNodeStatus_Call struct {
	*mock.Call
}

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

func (*Store_SetNodeStatus_Call) Return

func (*Store_SetNodeStatus_Call) Run

func (*Store_SetNodeStatus_Call) RunAndReturn

func (_c *Store_SetNodeStatus_Call) RunAndReturn(run func(ctx context.Context, ttl int64) error) *Store_SetNodeStatus_Call

type Store_SetWorkloadStatus_Call

type Store_SetWorkloadStatus_Call struct {
	*mock.Call
}

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

func (*Store_SetWorkloadStatus_Call) Return

func (*Store_SetWorkloadStatus_Call) Run

func (*Store_SetWorkloadStatus_Call) RunAndReturn

Jump to

Keyboard shortcuts

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