package testing

import "k8s.io/kubernetes/pkg/kubelet/apis/podresources/testing"

Index

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

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

func (*MockCPUsProvider_Expecter) GetAllocatableCPUs

GetAllocatableCPUs is a helper method to define mock.On call

func (*MockCPUsProvider_Expecter) GetCPUs

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

GetCPUs is a helper method to define mock.On call

type MockCPUsProvider_GetAllocatableCPUs_Call

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

func (*MockCPUsProvider_GetAllocatableCPUs_Call) Run

func (*MockCPUsProvider_GetAllocatableCPUs_Call) RunAndReturn

type MockCPUsProvider_GetCPUs_Call

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

func (*MockCPUsProvider_GetCPUs_Call) Run

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

func (*MockCPUsProvider_GetCPUs_Call) RunAndReturn

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

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

func (*MockDevicesProvider_Expecter) GetAllocatableDevices

GetAllocatableDevices is a helper method to define mock.On call

func (*MockDevicesProvider_Expecter) GetDevices

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

GetDevices is a helper method to define mock.On call

func (*MockDevicesProvider_Expecter) UpdateAllocatedDevices

UpdateAllocatedDevices is a helper method to define mock.On call

type MockDevicesProvider_GetAllocatableDevices_Call

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

func (*MockDevicesProvider_GetAllocatableDevices_Call) Run

func (*MockDevicesProvider_GetAllocatableDevices_Call) RunAndReturn

type MockDevicesProvider_GetDevices_Call

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

func (*MockDevicesProvider_GetDevices_Call) Run

func (*MockDevicesProvider_GetDevices_Call) RunAndReturn

type MockDevicesProvider_UpdateAllocatedDevices_Call

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

func (*MockDevicesProvider_UpdateAllocatedDevices_Call) Run

func (*MockDevicesProvider_UpdateAllocatedDevices_Call) RunAndReturn

type MockDynamicResourcesProvider

type MockDynamicResourcesProvider struct {
	mock.Mock
}

MockDynamicResourcesProvider is an autogenerated mock type for the DynamicResourcesProvider type

func NewMockDynamicResourcesProvider

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

func (*MockDynamicResourcesProvider) GetDynamicResources

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

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

func (*MockDynamicResourcesProvider_Expecter) GetDynamicResources

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

GetDynamicResources is a helper method to define mock.On call

type MockDynamicResourcesProvider_GetDynamicResources_Call

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

func (*MockDynamicResourcesProvider_GetDynamicResources_Call) Run

func (*MockDynamicResourcesProvider_GetDynamicResources_Call) RunAndReturn

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

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

func (*MockMemoryProvider_Expecter) GetAllocatableMemory

GetAllocatableMemory is a helper method to define mock.On call

func (*MockMemoryProvider_Expecter) GetMemory

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

GetMemory is a helper method to define mock.On call

type MockMemoryProvider_GetAllocatableMemory_Call

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

func (*MockMemoryProvider_GetAllocatableMemory_Call) Run

func (*MockMemoryProvider_GetAllocatableMemory_Call) RunAndReturn

type MockMemoryProvider_GetMemory_Call

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

func (*MockMemoryProvider_GetMemory_Call) Run

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

func (*MockMemoryProvider_GetMemory_Call) RunAndReturn

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

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

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

func (*MockPodsProvider_Expecter) GetPodByName

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

GetPodByName is a helper method to define mock.On call

func (*MockPodsProvider_Expecter) GetPods

GetPods is a helper method to define mock.On call

type MockPodsProvider_GetPodByName_Call

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

func (*MockPodsProvider_GetPodByName_Call) Run

func (*MockPodsProvider_GetPodByName_Call) RunAndReturn

type MockPodsProvider_GetPods_Call

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

func (*MockPodsProvider_GetPods_Call) Run

func (*MockPodsProvider_GetPods_Call) RunAndReturn

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

Source Files

cpus_provider.go devices_provider.go dynamic_resources_provider.go memory_provider.go pods_provider.go

Version
v1.33.0 (latest)
Published
Apr 23, 2025
Platform
linux/amd64
Imports
3 packages
Last checked
3 hours ago

Tools for package owners.