mocks

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	mock.Mock
}

Client is an autogenerated mock type for the Client type

func NewClient

func NewClient(t interface {
	mock.TestingT
	Cleanup(func())
}) *Client

NewClient creates a new instance of Client. 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 (*Client) Close

func (_m *Client) Close() error

Close provides a mock function with no fields

func (*Client) Create

func (_m *Client) Create(ctx context.Context, name string, slot *int32) (hypervisor.VirtualMachine, *string, error)

Create provides a mock function with given fields: ctx, name, slot

func (*Client) Delete

func (_m *Client) Delete(ctx context.Context, id string) error

Delete provides a mock function with given fields: ctx, id

func (*Client) EXPECT

func (_m *Client) EXPECT() *Client_Expecter

func (*Client) Init

func (_m *Client) Init(ctx context.Context, config []byte) error

Init provides a mock function with given fields: ctx, config

func (*Client) List

func (_m *Client) List(ctx context.Context) ([]hypervisor.VirtualMachine, error)

List provides a mock function with given fields: ctx

func (*Client) Shutdown

func (_m *Client) Shutdown(ctx context.Context) error

Shutdown provides a mock function with given fields: ctx

type Client_Close_Call

type Client_Close_Call struct {
	*mock.Call
}

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

func (*Client_Close_Call) Return

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

func (*Client_Close_Call) Run

func (_c *Client_Close_Call) Run(run func()) *Client_Close_Call

func (*Client_Close_Call) RunAndReturn added in v0.3.0

func (_c *Client_Close_Call) RunAndReturn(run func() error) *Client_Close_Call

type Client_Create_Call

type Client_Create_Call struct {
	*mock.Call
}

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

func (*Client_Create_Call) Return

func (_c *Client_Create_Call) Return(vm hypervisor.VirtualMachine, stompedVmId *string, err error) *Client_Create_Call

func (*Client_Create_Call) Run

func (_c *Client_Create_Call) Run(run func(ctx context.Context, name string, slot *int32)) *Client_Create_Call

func (*Client_Create_Call) RunAndReturn added in v0.3.0

type Client_Delete_Call

type Client_Delete_Call struct {
	*mock.Call
}

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

func (*Client_Delete_Call) Return

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

func (*Client_Delete_Call) Run

func (_c *Client_Delete_Call) Run(run func(ctx context.Context, id string)) *Client_Delete_Call

func (*Client_Delete_Call) RunAndReturn added in v0.3.0

func (_c *Client_Delete_Call) RunAndReturn(run func(context.Context, string) error) *Client_Delete_Call

type Client_Expecter

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

func (*Client_Expecter) Close

func (_e *Client_Expecter) Close() *Client_Close_Call

Close is a helper method to define mock.On call

func (*Client_Expecter) Create

func (_e *Client_Expecter) Create(ctx interface{}, name interface{}, slot interface{}) *Client_Create_Call

Create is a helper method to define mock.On call

  • ctx context.Context
  • name string
  • slot *int32

func (*Client_Expecter) Delete

func (_e *Client_Expecter) Delete(ctx interface{}, id interface{}) *Client_Delete_Call

Delete is a helper method to define mock.On call

  • ctx context.Context
  • id string

func (*Client_Expecter) Init

func (_e *Client_Expecter) Init(ctx interface{}, config interface{}) *Client_Init_Call

Init is a helper method to define mock.On call

  • ctx context.Context
  • config []byte

func (*Client_Expecter) List

func (_e *Client_Expecter) List(ctx interface{}) *Client_List_Call

List is a helper method to define mock.On call

  • ctx context.Context

func (*Client_Expecter) Shutdown

func (_e *Client_Expecter) Shutdown(ctx interface{}) *Client_Shutdown_Call

Shutdown is a helper method to define mock.On call

  • ctx context.Context

type Client_Init_Call

type Client_Init_Call struct {
	*mock.Call
}

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

func (*Client_Init_Call) Return

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

func (*Client_Init_Call) Run

func (_c *Client_Init_Call) Run(run func(ctx context.Context, config []byte)) *Client_Init_Call

func (*Client_Init_Call) RunAndReturn added in v0.3.0

func (_c *Client_Init_Call) RunAndReturn(run func(context.Context, []byte) error) *Client_Init_Call

type Client_List_Call

type Client_List_Call struct {
	*mock.Call
}

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

func (*Client_List_Call) Return

func (*Client_List_Call) Run

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

func (*Client_List_Call) RunAndReturn added in v0.3.0

type Client_Shutdown_Call

type Client_Shutdown_Call struct {
	*mock.Call
}

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

func (*Client_Shutdown_Call) Return

func (*Client_Shutdown_Call) Run

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

func (*Client_Shutdown_Call) RunAndReturn added in v0.3.0

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

Jump to

Keyboard shortcuts

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