mocks

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 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 IPAllocator

type IPAllocator struct {
	mock.Mock
}

IPAllocator is an autogenerated mock type for the IPAllocator type

func NewIPAllocator

func NewIPAllocator(t interface {
	mock.TestingT
	Cleanup(func())
}) *IPAllocator

NewIPAllocator creates a new instance of IPAllocator. 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 (*IPAllocator) Allocate

func (_m *IPAllocator) Allocate(id string, ifName string, meta types.ReservationMetadata, staticIP net.IP) (*types100.IPConfig, error)

Allocate provides a mock function with given fields: id, ifName, meta, staticIP

func (*IPAllocator) EXPECT

func (_m *IPAllocator) EXPECT() *IPAllocator_Expecter

type IPAllocator_Allocate_Call

type IPAllocator_Allocate_Call struct {
	*mock.Call
}

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

func (*IPAllocator_Allocate_Call) Return

func (*IPAllocator_Allocate_Call) Run

func (_c *IPAllocator_Allocate_Call) Run(run func(id string, ifName string, meta types.ReservationMetadata, staticIP net.IP)) *IPAllocator_Allocate_Call

func (*IPAllocator_Allocate_Call) RunAndReturn

type IPAllocator_Expecter

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

func (*IPAllocator_Expecter) Allocate

func (_e *IPAllocator_Expecter) Allocate(id interface{}, ifName interface{}, meta interface{}, staticIP interface{}) *IPAllocator_Allocate_Call

Allocate is a helper method to define mock.On call

  • id string
  • ifName string
  • meta types.ReservationMetadata
  • staticIP net.IP

Jump to

Keyboard shortcuts

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