testing

package
v1.31.4 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockCPUsProvider

type MockCPUsProvider struct {
	mock.Mock
}

MockCPUsProvider is an autogenerated mock type for the CPUsProvider type

func NewMockCPUsProvider

func NewMockCPUsProvider(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockCPUsProvider

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

func (*MockCPUsProvider) GetAllocatableCPUs

func (_m *MockCPUsProvider) GetAllocatableCPUs() []int64

GetAllocatableCPUs provides a mock function with given fields:

func (*MockCPUsProvider) GetCPUs

func (_m *MockCPUsProvider) GetCPUs(podUID string, containerName string) []int64

GetCPUs provides a mock function with given fields: podUID, containerName

type MockCPUsProvider_Expecter added in v1.31.0

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

func (*MockCPUsProvider_Expecter) GetAllocatableCPUs added in v1.31.0

GetAllocatableCPUs is a helper method to define mock.On call

func (*MockCPUsProvider_Expecter) GetCPUs added in v1.31.0

func (_e *MockCPUsProvider_Expecter) GetCPUs(podUID interface{}, containerName interface{}) *MockCPUsProvider_GetCPUs_Call

GetCPUs is a helper method to define mock.On call

  • podUID string
  • containerName string

type MockCPUsProvider_GetAllocatableCPUs_Call added in v1.31.0

type MockCPUsProvider_GetAllocatableCPUs_Call struct {
	*mock.Call
}

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

func (*MockCPUsProvider_GetAllocatableCPUs_Call) Return added in v1.31.0

func (*MockCPUsProvider_GetAllocatableCPUs_Call) Run added in v1.31.0

func (*MockCPUsProvider_GetAllocatableCPUs_Call) RunAndReturn added in v1.31.0

type MockCPUsProvider_GetCPUs_Call added in v1.31.0

type MockCPUsProvider_GetCPUs_Call struct {
	*mock.Call
}

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

func (*MockCPUsProvider_GetCPUs_Call) Return added in v1.31.0

func (*MockCPUsProvider_GetCPUs_Call) Run added in v1.31.0

func (_c *MockCPUsProvider_GetCPUs_Call) Run(run func(podUID string, containerName string)) *MockCPUsProvider_GetCPUs_Call

func (*MockCPUsProvider_GetCPUs_Call) RunAndReturn added in v1.31.0

type MockDevicesProvider

type MockDevicesProvider struct {
	mock.Mock
}

MockDevicesProvider is an autogenerated mock type for the DevicesProvider type

func NewMockDevicesProvider

func NewMockDevicesProvider(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockDevicesProvider

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

func (*MockDevicesProvider) GetAllocatableDevices

func (_m *MockDevicesProvider) GetAllocatableDevices() []*v1.ContainerDevices

GetAllocatableDevices provides a mock function with given fields:

func (*MockDevicesProvider) GetDevices

func (_m *MockDevicesProvider) GetDevices(podUID string, containerName string) []*v1.ContainerDevices

GetDevices provides a mock function with given fields: podUID, containerName

func (*MockDevicesProvider) UpdateAllocatedDevices

func (_m *MockDevicesProvider) UpdateAllocatedDevices()

UpdateAllocatedDevices provides a mock function with given fields:

type MockDevicesProvider_Expecter added in v1.31.0

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

func (*MockDevicesProvider_Expecter) GetAllocatableDevices added in v1.31.0

GetAllocatableDevices is a helper method to define mock.On call

func (*MockDevicesProvider_Expecter) GetDevices added in v1.31.0

func (_e *MockDevicesProvider_Expecter) GetDevices(podUID interface{}, containerName interface{}) *MockDevicesProvider_GetDevices_Call

GetDevices is a helper method to define mock.On call

  • podUID string
  • containerName string

func (*MockDevicesProvider_Expecter) UpdateAllocatedDevices added in v1.31.0

UpdateAllocatedDevices is a helper method to define mock.On call

type MockDevicesProvider_GetAllocatableDevices_Call added in v1.31.0

type MockDevicesProvider_GetAllocatableDevices_Call struct {
	*mock.Call
}

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

func (*MockDevicesProvider_GetAllocatableDevices_Call) Return added in v1.31.0

func (*MockDevicesProvider_GetAllocatableDevices_Call) Run added in v1.31.0

func (*MockDevicesProvider_GetAllocatableDevices_Call) RunAndReturn added in v1.31.0

type MockDevicesProvider_GetDevices_Call added in v1.31.0

type MockDevicesProvider_GetDevices_Call struct {
	*mock.Call
}

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

func (*MockDevicesProvider_GetDevices_Call) Return added in v1.31.0

func (*MockDevicesProvider_GetDevices_Call) Run added in v1.31.0

func (*MockDevicesProvider_GetDevices_Call) RunAndReturn added in v1.31.0

type MockDevicesProvider_UpdateAllocatedDevices_Call added in v1.31.0

type MockDevicesProvider_UpdateAllocatedDevices_Call struct {
	*mock.Call
}

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

func (*MockDevicesProvider_UpdateAllocatedDevices_Call) Return added in v1.31.0

func (*MockDevicesProvider_UpdateAllocatedDevices_Call) Run added in v1.31.0

func (*MockDevicesProvider_UpdateAllocatedDevices_Call) RunAndReturn added in v1.31.0

type MockDynamicResourcesProvider added in v1.27.0

type MockDynamicResourcesProvider struct {
	mock.Mock
}

MockDynamicResourcesProvider is an autogenerated mock type for the DynamicResourcesProvider type

func NewMockDynamicResourcesProvider added in v1.27.0

func NewMockDynamicResourcesProvider(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockDynamicResourcesProvider

NewMockDynamicResourcesProvider creates a new instance of MockDynamicResourcesProvider. 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 (*MockDynamicResourcesProvider) EXPECT added in v1.27.0

func (*MockDynamicResourcesProvider) GetDynamicResources added in v1.27.0

func (_m *MockDynamicResourcesProvider) GetDynamicResources(pod *v1.Pod, container *v1.Container) []*podresourcesv1.DynamicResource

GetDynamicResources provides a mock function with given fields: pod, container

type MockDynamicResourcesProvider_Expecter added in v1.31.0

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

func (*MockDynamicResourcesProvider_Expecter) GetDynamicResources added in v1.31.0

func (_e *MockDynamicResourcesProvider_Expecter) GetDynamicResources(pod interface{}, container interface{}) *MockDynamicResourcesProvider_GetDynamicResources_Call

GetDynamicResources is a helper method to define mock.On call

  • pod *v1.Pod
  • container *v1.Container

type MockDynamicResourcesProvider_GetDynamicResources_Call added in v1.31.0

type MockDynamicResourcesProvider_GetDynamicResources_Call struct {
	*mock.Call
}

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

func (*MockDynamicResourcesProvider_GetDynamicResources_Call) Return added in v1.31.0

func (*MockDynamicResourcesProvider_GetDynamicResources_Call) Run added in v1.31.0

func (*MockDynamicResourcesProvider_GetDynamicResources_Call) RunAndReturn added in v1.31.0

type MockMemoryProvider

type MockMemoryProvider struct {
	mock.Mock
}

MockMemoryProvider is an autogenerated mock type for the MemoryProvider type

func NewMockMemoryProvider

func NewMockMemoryProvider(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockMemoryProvider

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

func (*MockMemoryProvider) GetAllocatableMemory

func (_m *MockMemoryProvider) GetAllocatableMemory() []*v1.ContainerMemory

GetAllocatableMemory provides a mock function with given fields:

func (*MockMemoryProvider) GetMemory

func (_m *MockMemoryProvider) GetMemory(podUID string, containerName string) []*v1.ContainerMemory

GetMemory provides a mock function with given fields: podUID, containerName

type MockMemoryProvider_Expecter added in v1.31.0

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

func (*MockMemoryProvider_Expecter) GetAllocatableMemory added in v1.31.0

GetAllocatableMemory is a helper method to define mock.On call

func (*MockMemoryProvider_Expecter) GetMemory added in v1.31.0

func (_e *MockMemoryProvider_Expecter) GetMemory(podUID interface{}, containerName interface{}) *MockMemoryProvider_GetMemory_Call

GetMemory is a helper method to define mock.On call

  • podUID string
  • containerName string

type MockMemoryProvider_GetAllocatableMemory_Call added in v1.31.0

type MockMemoryProvider_GetAllocatableMemory_Call struct {
	*mock.Call
}

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

func (*MockMemoryProvider_GetAllocatableMemory_Call) Return added in v1.31.0

func (*MockMemoryProvider_GetAllocatableMemory_Call) Run added in v1.31.0

func (*MockMemoryProvider_GetAllocatableMemory_Call) RunAndReturn added in v1.31.0

type MockMemoryProvider_GetMemory_Call added in v1.31.0

type MockMemoryProvider_GetMemory_Call struct {
	*mock.Call
}

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

func (*MockMemoryProvider_GetMemory_Call) Return added in v1.31.0

func (*MockMemoryProvider_GetMemory_Call) Run added in v1.31.0

func (_c *MockMemoryProvider_GetMemory_Call) Run(run func(podUID string, containerName string)) *MockMemoryProvider_GetMemory_Call

func (*MockMemoryProvider_GetMemory_Call) RunAndReturn added in v1.31.0

type MockPodsProvider

type MockPodsProvider struct {
	mock.Mock
}

MockPodsProvider is an autogenerated mock type for the PodsProvider type

func NewMockPodsProvider

func NewMockPodsProvider(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockPodsProvider

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

func (*MockPodsProvider) GetPodByName added in v1.27.0

func (_m *MockPodsProvider) GetPodByName(namespace string, name string) (*v1.Pod, bool)

GetPodByName provides a mock function with given fields: namespace, name

func (*MockPodsProvider) GetPods

func (_m *MockPodsProvider) GetPods() []*v1.Pod

GetPods provides a mock function with given fields:

type MockPodsProvider_Expecter added in v1.31.0

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

func (*MockPodsProvider_Expecter) GetPodByName added in v1.31.0

func (_e *MockPodsProvider_Expecter) GetPodByName(namespace interface{}, name interface{}) *MockPodsProvider_GetPodByName_Call

GetPodByName is a helper method to define mock.On call

  • namespace string
  • name string

func (*MockPodsProvider_Expecter) GetPods added in v1.31.0

GetPods is a helper method to define mock.On call

type MockPodsProvider_GetPodByName_Call added in v1.31.0

type MockPodsProvider_GetPodByName_Call struct {
	*mock.Call
}

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

func (*MockPodsProvider_GetPodByName_Call) Return added in v1.31.0

func (*MockPodsProvider_GetPodByName_Call) Run added in v1.31.0

func (*MockPodsProvider_GetPodByName_Call) RunAndReturn added in v1.31.0

type MockPodsProvider_GetPods_Call added in v1.31.0

type MockPodsProvider_GetPods_Call struct {
	*mock.Call
}

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

func (*MockPodsProvider_GetPods_Call) Return added in v1.31.0

func (*MockPodsProvider_GetPods_Call) Run added in v1.31.0

func (*MockPodsProvider_GetPods_Call) RunAndReturn added in v1.31.0

func (_c *MockPodsProvider_GetPods_Call) RunAndReturn(run func() []*v1.Pod) *MockPodsProvider_GetPods_Call

Jump to

Keyboard shortcuts

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