Documentation
¶
Overview ¶
Package hosts provides auto-generated mocks for the hosts.Backend interface. This package should only be imported in test files.
Index ¶
- type MockBackend
- func (_m *MockBackend) EXPECT() *MockBackend_Expecter
- func (_mock *MockBackend) GenerateManualInstructions(config hosts.HostsConfig) string
- func (_mock *MockBackend) Remove(ctx context.Context, hostnames []string) error
- func (_mock *MockBackend) Update(ctx context.Context, config hosts.HostsConfig) error
- func (_mock *MockBackend) Validate(ctx context.Context, config hosts.HostsConfig) ([]hosts.ValidationResult, error)
- type MockBackend_Expecter
- func (_e *MockBackend_Expecter) GenerateManualInstructions(config interface{}) *MockBackend_GenerateManualInstructions_Call
- func (_e *MockBackend_Expecter) Remove(ctx interface{}, hostnames interface{}) *MockBackend_Remove_Call
- func (_e *MockBackend_Expecter) Update(ctx interface{}, config interface{}) *MockBackend_Update_Call
- func (_e *MockBackend_Expecter) Validate(ctx interface{}, config interface{}) *MockBackend_Validate_Call
- type MockBackend_GenerateManualInstructions_Call
- func (_c *MockBackend_GenerateManualInstructions_Call) Return(s string) *MockBackend_GenerateManualInstructions_Call
- func (_c *MockBackend_GenerateManualInstructions_Call) Run(run func(config hosts.HostsConfig)) *MockBackend_GenerateManualInstructions_Call
- func (_c *MockBackend_GenerateManualInstructions_Call) RunAndReturn(run func(config hosts.HostsConfig) string) *MockBackend_GenerateManualInstructions_Call
- type MockBackend_Remove_Call
- func (_c *MockBackend_Remove_Call) Return(err error) *MockBackend_Remove_Call
- func (_c *MockBackend_Remove_Call) Run(run func(ctx context.Context, hostnames []string)) *MockBackend_Remove_Call
- func (_c *MockBackend_Remove_Call) RunAndReturn(run func(ctx context.Context, hostnames []string) error) *MockBackend_Remove_Call
- type MockBackend_Update_Call
- func (_c *MockBackend_Update_Call) Return(err error) *MockBackend_Update_Call
- func (_c *MockBackend_Update_Call) Run(run func(ctx context.Context, config hosts.HostsConfig)) *MockBackend_Update_Call
- func (_c *MockBackend_Update_Call) RunAndReturn(run func(ctx context.Context, config hosts.HostsConfig) error) *MockBackend_Update_Call
- type MockBackend_Validate_Call
- func (_c *MockBackend_Validate_Call) Return(validationResults []hosts.ValidationResult, err error) *MockBackend_Validate_Call
- func (_c *MockBackend_Validate_Call) Run(run func(ctx context.Context, config hosts.HostsConfig)) *MockBackend_Validate_Call
- func (_c *MockBackend_Validate_Call) RunAndReturn(...) *MockBackend_Validate_Call
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockBackend ¶
MockBackend is an autogenerated mock type for the Backend type
func NewMockBackend ¶
func NewMockBackend(t interface {
mock.TestingT
Cleanup(func())
}) *MockBackend
NewMockBackend creates a new instance of MockBackend. 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 (*MockBackend) EXPECT ¶
func (_m *MockBackend) EXPECT() *MockBackend_Expecter
func (*MockBackend) GenerateManualInstructions ¶
func (_mock *MockBackend) GenerateManualInstructions(config hosts.HostsConfig) string
GenerateManualInstructions provides a mock function for the type MockBackend
func (*MockBackend) Remove ¶
func (_mock *MockBackend) Remove(ctx context.Context, hostnames []string) error
Remove provides a mock function for the type MockBackend
func (*MockBackend) Update ¶
func (_mock *MockBackend) Update(ctx context.Context, config hosts.HostsConfig) error
Update provides a mock function for the type MockBackend
func (*MockBackend) Validate ¶
func (_mock *MockBackend) Validate(ctx context.Context, config hosts.HostsConfig) ([]hosts.ValidationResult, error)
Validate provides a mock function for the type MockBackend
type MockBackend_Expecter ¶
type MockBackend_Expecter struct {
// contains filtered or unexported fields
}
func (*MockBackend_Expecter) GenerateManualInstructions ¶
func (_e *MockBackend_Expecter) GenerateManualInstructions(config interface{}) *MockBackend_GenerateManualInstructions_Call
GenerateManualInstructions is a helper method to define mock.On call
- config hosts.HostsConfig
func (*MockBackend_Expecter) Remove ¶
func (_e *MockBackend_Expecter) Remove(ctx interface{}, hostnames interface{}) *MockBackend_Remove_Call
Remove is a helper method to define mock.On call
- ctx context.Context
- hostnames []string
func (*MockBackend_Expecter) Update ¶
func (_e *MockBackend_Expecter) Update(ctx interface{}, config interface{}) *MockBackend_Update_Call
Update is a helper method to define mock.On call
- ctx context.Context
- config hosts.HostsConfig
func (*MockBackend_Expecter) Validate ¶
func (_e *MockBackend_Expecter) Validate(ctx interface{}, config interface{}) *MockBackend_Validate_Call
Validate is a helper method to define mock.On call
- ctx context.Context
- config hosts.HostsConfig
type MockBackend_GenerateManualInstructions_Call ¶
MockBackend_GenerateManualInstructions_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GenerateManualInstructions'
func (*MockBackend_GenerateManualInstructions_Call) Return ¶
func (_c *MockBackend_GenerateManualInstructions_Call) Return(s string) *MockBackend_GenerateManualInstructions_Call
func (*MockBackend_GenerateManualInstructions_Call) Run ¶
func (_c *MockBackend_GenerateManualInstructions_Call) Run(run func(config hosts.HostsConfig)) *MockBackend_GenerateManualInstructions_Call
func (*MockBackend_GenerateManualInstructions_Call) RunAndReturn ¶
func (_c *MockBackend_GenerateManualInstructions_Call) RunAndReturn(run func(config hosts.HostsConfig) string) *MockBackend_GenerateManualInstructions_Call
type MockBackend_Remove_Call ¶
MockBackend_Remove_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Remove'
func (*MockBackend_Remove_Call) Return ¶
func (_c *MockBackend_Remove_Call) Return(err error) *MockBackend_Remove_Call
func (*MockBackend_Remove_Call) Run ¶
func (_c *MockBackend_Remove_Call) Run(run func(ctx context.Context, hostnames []string)) *MockBackend_Remove_Call
func (*MockBackend_Remove_Call) RunAndReturn ¶
func (_c *MockBackend_Remove_Call) RunAndReturn(run func(ctx context.Context, hostnames []string) error) *MockBackend_Remove_Call
type MockBackend_Update_Call ¶
MockBackend_Update_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Update'
func (*MockBackend_Update_Call) Return ¶
func (_c *MockBackend_Update_Call) Return(err error) *MockBackend_Update_Call
func (*MockBackend_Update_Call) Run ¶
func (_c *MockBackend_Update_Call) Run(run func(ctx context.Context, config hosts.HostsConfig)) *MockBackend_Update_Call
func (*MockBackend_Update_Call) RunAndReturn ¶
func (_c *MockBackend_Update_Call) RunAndReturn(run func(ctx context.Context, config hosts.HostsConfig) error) *MockBackend_Update_Call
type MockBackend_Validate_Call ¶
MockBackend_Validate_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Validate'
func (*MockBackend_Validate_Call) Return ¶
func (_c *MockBackend_Validate_Call) Return(validationResults []hosts.ValidationResult, err error) *MockBackend_Validate_Call
func (*MockBackend_Validate_Call) Run ¶
func (_c *MockBackend_Validate_Call) Run(run func(ctx context.Context, config hosts.HostsConfig)) *MockBackend_Validate_Call
func (*MockBackend_Validate_Call) RunAndReturn ¶
func (_c *MockBackend_Validate_Call) RunAndReturn(run func(ctx context.Context, config hosts.HostsConfig) ([]hosts.ValidationResult, error)) *MockBackend_Validate_Call