mockexecutor

package
v1.0.0-alpha.53 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockAgent

type MockAgent struct {
	mock.Mock
}

MockAgent is an autogenerated mock type for the Agent type

func NewMockAgent

func NewMockAgent(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockAgent

NewMockAgent creates a new instance of MockAgent. 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 (*MockAgent) Addr

func (_mock *MockAgent) Addr() string

Addr provides a mock function for the type MockAgent

func (*MockAgent) EXPECT

func (_m *MockAgent) EXPECT() *MockAgent_Expecter

func (*MockAgent) Exec

func (_mock *MockAgent) Exec(ctx context.Context, bin string, args []string, stdin string) executor.ExecResult

Exec provides a mock function for the type MockAgent

func (*MockAgent) FailureReason

func (_mock *MockAgent) FailureReason() executor.FailureReason

FailureReason provides a mock function for the type MockAgent

func (*MockAgent) Prepare

func (_mock *MockAgent) Prepare(ctx context.Context) error

Prepare provides a mock function for the type MockAgent

func (*MockAgent) Remove

func (_mock *MockAgent) Remove(ctx context.Context) error

Remove provides a mock function for the type MockAgent

func (*MockAgent) Run

func (_mock *MockAgent) Run(ctx context.Context) error

Run provides a mock function for the type MockAgent

func (*MockAgent) Runtime

func (_mock *MockAgent) Runtime() *executor.Runtime

Runtime provides a mock function for the type MockAgent

func (*MockAgent) Start

func (_mock *MockAgent) Start(ctx context.Context) error

Start provides a mock function for the type MockAgent

func (*MockAgent) Status

func (_mock *MockAgent) Status() executor.Status

Status provides a mock function for the type MockAgent

func (*MockAgent) StatusTracker

func (_mock *MockAgent) StatusTracker() *executor.StatusTracker

StatusTracker provides a mock function for the type MockAgent

func (*MockAgent) Stop

func (_mock *MockAgent) Stop(ctx context.Context) error

Stop provides a mock function for the type MockAgent

func (*MockAgent) SubscribeStatus

func (_mock *MockAgent) SubscribeStatus() (<-chan executor.Status, func())

SubscribeStatus provides a mock function for the type MockAgent

func (*MockAgent) UUID

func (_mock *MockAgent) UUID() uuid.UUID

UUID provides a mock function for the type MockAgent

type MockAgent_Addr_Call

type MockAgent_Addr_Call struct {
	*mock.Call
}

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

func (*MockAgent_Addr_Call) Return

func (*MockAgent_Addr_Call) Run

func (_c *MockAgent_Addr_Call) Run(run func()) *MockAgent_Addr_Call

func (*MockAgent_Addr_Call) RunAndReturn

func (_c *MockAgent_Addr_Call) RunAndReturn(run func() string) *MockAgent_Addr_Call

type MockAgent_Exec_Call

type MockAgent_Exec_Call struct {
	*mock.Call
}

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

func (*MockAgent_Exec_Call) Return

func (*MockAgent_Exec_Call) Run

func (_c *MockAgent_Exec_Call) Run(run func(ctx context.Context, bin string, args []string, stdin string)) *MockAgent_Exec_Call

func (*MockAgent_Exec_Call) RunAndReturn

func (_c *MockAgent_Exec_Call) RunAndReturn(run func(ctx context.Context, bin string, args []string, stdin string) executor.ExecResult) *MockAgent_Exec_Call

type MockAgent_Expecter

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

func (*MockAgent_Expecter) Addr

Addr is a helper method to define mock.On call

func (*MockAgent_Expecter) Exec

func (_e *MockAgent_Expecter) Exec(ctx any, bin any, args any, stdin any) *MockAgent_Exec_Call

Exec is a helper method to define mock.On call

  • ctx context.Context
  • bin string
  • args []string
  • stdin string

func (*MockAgent_Expecter) FailureReason

func (_e *MockAgent_Expecter) FailureReason() *MockAgent_FailureReason_Call

FailureReason is a helper method to define mock.On call

func (*MockAgent_Expecter) Prepare

func (_e *MockAgent_Expecter) Prepare(ctx any) *MockAgent_Prepare_Call

Prepare is a helper method to define mock.On call

  • ctx context.Context

func (*MockAgent_Expecter) Remove

func (_e *MockAgent_Expecter) Remove(ctx any) *MockAgent_Remove_Call

Remove is a helper method to define mock.On call

  • ctx context.Context

func (*MockAgent_Expecter) Run

Run is a helper method to define mock.On call

  • ctx context.Context

func (*MockAgent_Expecter) Runtime

Runtime is a helper method to define mock.On call

func (*MockAgent_Expecter) Start

Start is a helper method to define mock.On call

  • ctx context.Context

func (*MockAgent_Expecter) Status

Status is a helper method to define mock.On call

func (*MockAgent_Expecter) StatusTracker

func (_e *MockAgent_Expecter) StatusTracker() *MockAgent_StatusTracker_Call

StatusTracker is a helper method to define mock.On call

func (*MockAgent_Expecter) Stop

Stop is a helper method to define mock.On call

  • ctx context.Context

func (*MockAgent_Expecter) SubscribeStatus

func (_e *MockAgent_Expecter) SubscribeStatus() *MockAgent_SubscribeStatus_Call

SubscribeStatus is a helper method to define mock.On call

func (*MockAgent_Expecter) UUID

UUID is a helper method to define mock.On call

type MockAgent_FailureReason_Call

type MockAgent_FailureReason_Call struct {
	*mock.Call
}

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

func (*MockAgent_FailureReason_Call) Return

func (*MockAgent_FailureReason_Call) Run

func (*MockAgent_FailureReason_Call) RunAndReturn

type MockAgent_Prepare_Call

type MockAgent_Prepare_Call struct {
	*mock.Call
}

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

func (*MockAgent_Prepare_Call) Return

func (*MockAgent_Prepare_Call) Run

func (*MockAgent_Prepare_Call) RunAndReturn

func (_c *MockAgent_Prepare_Call) RunAndReturn(run func(ctx context.Context) error) *MockAgent_Prepare_Call

type MockAgent_Remove_Call

type MockAgent_Remove_Call struct {
	*mock.Call
}

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

func (*MockAgent_Remove_Call) Return

func (*MockAgent_Remove_Call) Run

func (*MockAgent_Remove_Call) RunAndReturn

func (_c *MockAgent_Remove_Call) RunAndReturn(run func(ctx context.Context) error) *MockAgent_Remove_Call

type MockAgent_Run_Call

type MockAgent_Run_Call struct {
	*mock.Call
}

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

func (*MockAgent_Run_Call) Return

func (_c *MockAgent_Run_Call) Return(err error) *MockAgent_Run_Call

func (*MockAgent_Run_Call) Run

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

func (*MockAgent_Run_Call) RunAndReturn

func (_c *MockAgent_Run_Call) RunAndReturn(run func(ctx context.Context) error) *MockAgent_Run_Call

type MockAgent_Runtime_Call

type MockAgent_Runtime_Call struct {
	*mock.Call
}

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

func (*MockAgent_Runtime_Call) Return

func (*MockAgent_Runtime_Call) Run

func (_c *MockAgent_Runtime_Call) Run(run func()) *MockAgent_Runtime_Call

func (*MockAgent_Runtime_Call) RunAndReturn

func (_c *MockAgent_Runtime_Call) RunAndReturn(run func() *executor.Runtime) *MockAgent_Runtime_Call

type MockAgent_Start_Call

type MockAgent_Start_Call struct {
	*mock.Call
}

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

func (*MockAgent_Start_Call) Return

func (*MockAgent_Start_Call) Run

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

func (*MockAgent_Start_Call) RunAndReturn

func (_c *MockAgent_Start_Call) RunAndReturn(run func(ctx context.Context) error) *MockAgent_Start_Call

type MockAgent_StatusTracker_Call

type MockAgent_StatusTracker_Call struct {
	*mock.Call
}

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

func (*MockAgent_StatusTracker_Call) Return

func (*MockAgent_StatusTracker_Call) Run

func (*MockAgent_StatusTracker_Call) RunAndReturn

type MockAgent_Status_Call

type MockAgent_Status_Call struct {
	*mock.Call
}

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

func (*MockAgent_Status_Call) Return

func (*MockAgent_Status_Call) Run

func (_c *MockAgent_Status_Call) Run(run func()) *MockAgent_Status_Call

func (*MockAgent_Status_Call) RunAndReturn

func (_c *MockAgent_Status_Call) RunAndReturn(run func() executor.Status) *MockAgent_Status_Call

type MockAgent_Stop_Call

type MockAgent_Stop_Call struct {
	*mock.Call
}

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

func (*MockAgent_Stop_Call) Return

func (*MockAgent_Stop_Call) Run

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

func (*MockAgent_Stop_Call) RunAndReturn

func (_c *MockAgent_Stop_Call) RunAndReturn(run func(ctx context.Context) error) *MockAgent_Stop_Call

type MockAgent_SubscribeStatus_Call

type MockAgent_SubscribeStatus_Call struct {
	*mock.Call
}

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

func (*MockAgent_SubscribeStatus_Call) Return

func (_c *MockAgent_SubscribeStatus_Call) Return(statusCh <-chan executor.Status, fn func()) *MockAgent_SubscribeStatus_Call

func (*MockAgent_SubscribeStatus_Call) Run

func (*MockAgent_SubscribeStatus_Call) RunAndReturn

func (_c *MockAgent_SubscribeStatus_Call) RunAndReturn(run func() (<-chan executor.Status, func())) *MockAgent_SubscribeStatus_Call

type MockAgent_UUID_Call

type MockAgent_UUID_Call struct {
	*mock.Call
}

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

func (*MockAgent_UUID_Call) Return

func (*MockAgent_UUID_Call) Run

func (_c *MockAgent_UUID_Call) Run(run func()) *MockAgent_UUID_Call

func (*MockAgent_UUID_Call) RunAndReturn

func (_c *MockAgent_UUID_Call) RunAndReturn(run func() uuid.UUID) *MockAgent_UUID_Call

type MockProvider

type MockProvider struct {
	mock.Mock
}

MockProvider is an autogenerated mock type for the Provider type

func NewMockProvider

func NewMockProvider(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockProvider

NewMockProvider creates a new instance of MockProvider. 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 (*MockProvider) Create

func (_mock *MockProvider) Create(ctx context.Context, id uuid.UUID, ref spec.Reference, opts ...spec.Override) (executor.Agent, error)

Create provides a mock function for the type MockProvider

func (*MockProvider) Destroy

func (_mock *MockProvider) Destroy(ctx context.Context) error

Destroy provides a mock function for the type MockProvider

func (*MockProvider) EXPECT

func (_m *MockProvider) EXPECT() *MockProvider_Expecter

func (*MockProvider) Load

func (_mock *MockProvider) Load(ctx context.Context) ([]executor.Agent, error)

Load provides a mock function for the type MockProvider

func (*MockProvider) Registry

func (_mock *MockProvider) Registry() executor.Registry

Registry provides a mock function for the type MockProvider

type MockProvider_Create_Call

type MockProvider_Create_Call struct {
	*mock.Call
}

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

func (*MockProvider_Create_Call) Return

func (*MockProvider_Create_Call) Run

func (*MockProvider_Create_Call) RunAndReturn

type MockProvider_Destroy_Call

type MockProvider_Destroy_Call struct {
	*mock.Call
}

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

func (*MockProvider_Destroy_Call) Return

func (*MockProvider_Destroy_Call) Run

func (*MockProvider_Destroy_Call) RunAndReturn

func (_c *MockProvider_Destroy_Call) RunAndReturn(run func(ctx context.Context) error) *MockProvider_Destroy_Call

type MockProvider_Expecter

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

func (*MockProvider_Expecter) Create

func (_e *MockProvider_Expecter) Create(ctx any, id any, ref any, opts ...any) *MockProvider_Create_Call

Create is a helper method to define mock.On call

  • ctx context.Context
  • id uuid.UUID
  • ref spec.Reference
  • opts ...spec.Override

func (*MockProvider_Expecter) Destroy

Destroy is a helper method to define mock.On call

  • ctx context.Context

func (*MockProvider_Expecter) Load

Load is a helper method to define mock.On call

  • ctx context.Context

func (*MockProvider_Expecter) Registry

Registry is a helper method to define mock.On call

type MockProvider_Load_Call

type MockProvider_Load_Call struct {
	*mock.Call
}

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

func (*MockProvider_Load_Call) Return

func (*MockProvider_Load_Call) Run

func (*MockProvider_Load_Call) RunAndReturn

func (_c *MockProvider_Load_Call) RunAndReturn(run func(ctx context.Context) ([]executor.Agent, error)) *MockProvider_Load_Call

type MockProvider_Registry_Call

type MockProvider_Registry_Call struct {
	*mock.Call
}

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

func (*MockProvider_Registry_Call) Return

func (*MockProvider_Registry_Call) Run

func (*MockProvider_Registry_Call) RunAndReturn

type MockStatusObserver

type MockStatusObserver struct {
	mock.Mock
}

MockStatusObserver is an autogenerated mock type for the StatusObserver type

func NewMockStatusObserver

func NewMockStatusObserver(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockStatusObserver

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

func (*MockStatusObserver) FailureReason

func (_mock *MockStatusObserver) FailureReason() executor.FailureReason

FailureReason provides a mock function for the type MockStatusObserver

func (*MockStatusObserver) Status

func (_mock *MockStatusObserver) Status() executor.Status

Status provides a mock function for the type MockStatusObserver

func (*MockStatusObserver) SubscribeStatus

func (_mock *MockStatusObserver) SubscribeStatus() (<-chan executor.Status, func())

SubscribeStatus provides a mock function for the type MockStatusObserver

type MockStatusObserver_Expecter

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

func (*MockStatusObserver_Expecter) FailureReason

FailureReason is a helper method to define mock.On call

func (*MockStatusObserver_Expecter) Status

Status is a helper method to define mock.On call

func (*MockStatusObserver_Expecter) SubscribeStatus

SubscribeStatus is a helper method to define mock.On call

type MockStatusObserver_FailureReason_Call

type MockStatusObserver_FailureReason_Call struct {
	*mock.Call
}

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

func (*MockStatusObserver_FailureReason_Call) Return

func (*MockStatusObserver_FailureReason_Call) Run

func (*MockStatusObserver_FailureReason_Call) RunAndReturn

type MockStatusObserver_Status_Call

type MockStatusObserver_Status_Call struct {
	*mock.Call
}

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

func (*MockStatusObserver_Status_Call) Return

func (*MockStatusObserver_Status_Call) Run

func (*MockStatusObserver_Status_Call) RunAndReturn

type MockStatusObserver_SubscribeStatus_Call

type MockStatusObserver_SubscribeStatus_Call struct {
	*mock.Call
}

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

func (*MockStatusObserver_SubscribeStatus_Call) Return

func (*MockStatusObserver_SubscribeStatus_Call) Run

func (*MockStatusObserver_SubscribeStatus_Call) RunAndReturn

Jump to

Keyboard shortcuts

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