mocks

package
v1.0.0-beta.35 Latest Latest
Warning

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

Go to latest
Published: May 22, 2024 License: Apache-2.0 Imports: 4 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) DeleteBootRescue

func (_m *Client) DeleteBootRescue(id int) (*models.Rescue, error)

DeleteBootRescue provides a mock function with given fields: id

func (*Client) EXPECT

func (_m *Client) EXPECT() *Client_Expecter

func (*Client) GetBMServer

func (_m *Client) GetBMServer(_a0 int) (*models.Server, error)

GetBMServer provides a mock function with given fields: _a0

func (*Client) GetBootRescue

func (_m *Client) GetBootRescue(id int) (*models.Rescue, error)

GetBootRescue provides a mock function with given fields: id

func (*Client) GetReboot

func (_m *Client) GetReboot(_a0 int) (*models.Reset, error)

GetReboot provides a mock function with given fields: _a0

func (*Client) ListBMServers

func (_m *Client) ListBMServers() ([]models.Server, error)

ListBMServers provides a mock function with given fields:

func (*Client) ListSSHKeys

func (_m *Client) ListSSHKeys() ([]models.Key, error)

ListSSHKeys provides a mock function with given fields:

func (*Client) RebootBMServer

func (_m *Client) RebootBMServer(_a0 int, _a1 v1beta1.RebootType) (*models.ResetPost, error)

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

func (*Client) SetBMServerName

func (_m *Client) SetBMServerName(_a0 int, _a1 string) (*models.Server, error)

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

func (*Client) SetBootRescue

func (_m *Client) SetBootRescue(id int, fingerprint string) (*models.Rescue, error)

SetBootRescue provides a mock function with given fields: id, fingerprint

func (*Client) SetSSHKey

func (_m *Client) SetSSHKey(name string, publickey string) (*models.Key, error)

SetSSHKey provides a mock function with given fields: name, publickey

func (*Client) ValidateCredentials

func (_m *Client) ValidateCredentials() error

ValidateCredentials provides a mock function with given fields:

type Client_DeleteBootRescue_Call

type Client_DeleteBootRescue_Call struct {
	*mock.Call
}

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

func (*Client_DeleteBootRescue_Call) Return

func (*Client_DeleteBootRescue_Call) Run

func (*Client_DeleteBootRescue_Call) RunAndReturn

type Client_Expecter

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

func (*Client_Expecter) DeleteBootRescue

func (_e *Client_Expecter) DeleteBootRescue(id interface{}) *Client_DeleteBootRescue_Call

DeleteBootRescue is a helper method to define mock.On call

  • id int

func (*Client_Expecter) GetBMServer

func (_e *Client_Expecter) GetBMServer(_a0 interface{}) *Client_GetBMServer_Call

GetBMServer is a helper method to define mock.On call

  • _a0 int

func (*Client_Expecter) GetBootRescue

func (_e *Client_Expecter) GetBootRescue(id interface{}) *Client_GetBootRescue_Call

GetBootRescue is a helper method to define mock.On call

  • id int

func (*Client_Expecter) GetReboot

func (_e *Client_Expecter) GetReboot(_a0 interface{}) *Client_GetReboot_Call

GetReboot is a helper method to define mock.On call

  • _a0 int

func (*Client_Expecter) ListBMServers

func (_e *Client_Expecter) ListBMServers() *Client_ListBMServers_Call

ListBMServers is a helper method to define mock.On call

func (*Client_Expecter) ListSSHKeys

func (_e *Client_Expecter) ListSSHKeys() *Client_ListSSHKeys_Call

ListSSHKeys is a helper method to define mock.On call

func (*Client_Expecter) RebootBMServer

func (_e *Client_Expecter) RebootBMServer(_a0 interface{}, _a1 interface{}) *Client_RebootBMServer_Call

RebootBMServer is a helper method to define mock.On call

  • _a0 int
  • _a1 v1beta1.RebootType

func (*Client_Expecter) SetBMServerName

func (_e *Client_Expecter) SetBMServerName(_a0 interface{}, _a1 interface{}) *Client_SetBMServerName_Call

SetBMServerName is a helper method to define mock.On call

  • _a0 int
  • _a1 string

func (*Client_Expecter) SetBootRescue

func (_e *Client_Expecter) SetBootRescue(id interface{}, fingerprint interface{}) *Client_SetBootRescue_Call

SetBootRescue is a helper method to define mock.On call

  • id int
  • fingerprint string

func (*Client_Expecter) SetSSHKey

func (_e *Client_Expecter) SetSSHKey(name interface{}, publickey interface{}) *Client_SetSSHKey_Call

SetSSHKey is a helper method to define mock.On call

  • name string
  • publickey string

func (*Client_Expecter) ValidateCredentials

func (_e *Client_Expecter) ValidateCredentials() *Client_ValidateCredentials_Call

ValidateCredentials is a helper method to define mock.On call

type Client_GetBMServer_Call

type Client_GetBMServer_Call struct {
	*mock.Call
}

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

func (*Client_GetBMServer_Call) Return

func (*Client_GetBMServer_Call) Run

func (_c *Client_GetBMServer_Call) Run(run func(_a0 int)) *Client_GetBMServer_Call

func (*Client_GetBMServer_Call) RunAndReturn

func (_c *Client_GetBMServer_Call) RunAndReturn(run func(int) (*models.Server, error)) *Client_GetBMServer_Call

type Client_GetBootRescue_Call

type Client_GetBootRescue_Call struct {
	*mock.Call
}

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

func (*Client_GetBootRescue_Call) Return

func (*Client_GetBootRescue_Call) Run

func (*Client_GetBootRescue_Call) RunAndReturn

func (_c *Client_GetBootRescue_Call) RunAndReturn(run func(int) (*models.Rescue, error)) *Client_GetBootRescue_Call

type Client_GetReboot_Call

type Client_GetReboot_Call struct {
	*mock.Call
}

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

func (*Client_GetReboot_Call) Return

func (*Client_GetReboot_Call) Run

func (_c *Client_GetReboot_Call) Run(run func(_a0 int)) *Client_GetReboot_Call

func (*Client_GetReboot_Call) RunAndReturn

func (_c *Client_GetReboot_Call) RunAndReturn(run func(int) (*models.Reset, error)) *Client_GetReboot_Call

type Client_ListBMServers_Call

type Client_ListBMServers_Call struct {
	*mock.Call
}

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

func (*Client_ListBMServers_Call) Return

func (*Client_ListBMServers_Call) Run

func (*Client_ListBMServers_Call) RunAndReturn

func (_c *Client_ListBMServers_Call) RunAndReturn(run func() ([]models.Server, error)) *Client_ListBMServers_Call

type Client_ListSSHKeys_Call

type Client_ListSSHKeys_Call struct {
	*mock.Call
}

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

func (*Client_ListSSHKeys_Call) Return

func (*Client_ListSSHKeys_Call) Run

func (_c *Client_ListSSHKeys_Call) Run(run func()) *Client_ListSSHKeys_Call

func (*Client_ListSSHKeys_Call) RunAndReturn

func (_c *Client_ListSSHKeys_Call) RunAndReturn(run func() ([]models.Key, error)) *Client_ListSSHKeys_Call

type Client_RebootBMServer_Call

type Client_RebootBMServer_Call struct {
	*mock.Call
}

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

func (*Client_RebootBMServer_Call) Return

func (*Client_RebootBMServer_Call) Run

func (*Client_RebootBMServer_Call) RunAndReturn

type Client_SetBMServerName_Call

type Client_SetBMServerName_Call struct {
	*mock.Call
}

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

func (*Client_SetBMServerName_Call) Return

func (*Client_SetBMServerName_Call) Run

func (*Client_SetBMServerName_Call) RunAndReturn

type Client_SetBootRescue_Call

type Client_SetBootRescue_Call struct {
	*mock.Call
}

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

func (*Client_SetBootRescue_Call) Return

func (*Client_SetBootRescue_Call) Run

func (_c *Client_SetBootRescue_Call) Run(run func(id int, fingerprint string)) *Client_SetBootRescue_Call

func (*Client_SetBootRescue_Call) RunAndReturn

type Client_SetSSHKey_Call

type Client_SetSSHKey_Call struct {
	*mock.Call
}

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

func (*Client_SetSSHKey_Call) Return

func (*Client_SetSSHKey_Call) Run

func (_c *Client_SetSSHKey_Call) Run(run func(name string, publickey string)) *Client_SetSSHKey_Call

func (*Client_SetSSHKey_Call) RunAndReturn

func (_c *Client_SetSSHKey_Call) RunAndReturn(run func(string, string) (*models.Key, error)) *Client_SetSSHKey_Call

type Client_ValidateCredentials_Call

type Client_ValidateCredentials_Call struct {
	*mock.Call
}

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

func (*Client_ValidateCredentials_Call) Return

func (*Client_ValidateCredentials_Call) Run

func (*Client_ValidateCredentials_Call) RunAndReturn

type Factory

type Factory struct {
	mock.Mock
}

Factory is an autogenerated mock type for the Factory type

func NewFactory

func NewFactory(t interface {
	mock.TestingT
	Cleanup(func())
}) *Factory

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

func (_m *Factory) EXPECT() *Factory_Expecter

func (*Factory) NewClient

func (_m *Factory) NewClient(_a0 robotclient.Credentials) robotclient.Client

NewClient provides a mock function with given fields: _a0

type Factory_Expecter

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

func (*Factory_Expecter) NewClient

func (_e *Factory_Expecter) NewClient(_a0 interface{}) *Factory_NewClient_Call

NewClient is a helper method to define mock.On call

  • _a0 robotclient.Credentials

type Factory_NewClient_Call

type Factory_NewClient_Call struct {
	*mock.Call
}

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

func (*Factory_NewClient_Call) Return

func (*Factory_NewClient_Call) Run

func (*Factory_NewClient_Call) RunAndReturn

Jump to

Keyboard shortcuts

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