testing

package
v1.31.3 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockProvider added in v1.23.0

type MockProvider struct {
	mock.Mock
}

MockProvider is an autogenerated mock type for the Provider type

func NewMockProvider added in v1.23.0

func NewMockProvider(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockProvider

NewMockProvider creates a new instance of MockProvider. 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 (*MockProvider) EXPECT added in v1.23.0

func (_m *MockProvider) EXPECT() *MockProvider_Expecter

func (*MockProvider) GetCgroupCPUAndMemoryStats added in v1.23.0

func (_m *MockProvider) GetCgroupCPUAndMemoryStats(cgroupName string, updateStats bool) (*v1alpha1.ContainerStats, error)

GetCgroupCPUAndMemoryStats provides a mock function with given fields: cgroupName, updateStats

func (*MockProvider) GetCgroupStats added in v1.23.0

func (_m *MockProvider) GetCgroupStats(cgroupName string, updateStats bool) (*v1alpha1.ContainerStats, *v1alpha1.NetworkStats, error)

GetCgroupStats provides a mock function with given fields: cgroupName, updateStats

func (*MockProvider) GetNode added in v1.23.0

func (_m *MockProvider) GetNode() (*v1.Node, error)

GetNode provides a mock function with given fields:

func (*MockProvider) GetNodeConfig added in v1.23.0

func (_m *MockProvider) GetNodeConfig() cm.NodeConfig

GetNodeConfig provides a mock function with given fields:

func (*MockProvider) GetPodByCgroupfs added in v1.23.0

func (_m *MockProvider) GetPodByCgroupfs(cgroupfs string) (*v1.Pod, bool)

GetPodByCgroupfs provides a mock function with given fields: cgroupfs

func (*MockProvider) GetPodByName added in v1.23.0

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

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

func (*MockProvider) GetPodCgroupRoot added in v1.23.0

func (_m *MockProvider) GetPodCgroupRoot() string

GetPodCgroupRoot provides a mock function with given fields:

func (*MockProvider) GetPods added in v1.23.0

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

GetPods provides a mock function with given fields:

func (*MockProvider) GetRequestedContainersInfo added in v1.23.0

func (_m *MockProvider) GetRequestedContainersInfo(containerName string, options v2.RequestOptions) (map[string]*infov1.ContainerInfo, error)

GetRequestedContainersInfo provides a mock function with given fields: containerName, options

func (*MockProvider) ImageFsStats added in v1.23.0

func (_m *MockProvider) ImageFsStats(ctx context.Context) (*v1alpha1.FsStats, *v1alpha1.FsStats, error)

ImageFsStats provides a mock function with given fields: ctx

func (*MockProvider) ListBlockVolumesForPod added in v1.23.0

func (_m *MockProvider) ListBlockVolumesForPod(podUID types.UID) (map[string]volume.BlockVolume, bool)

ListBlockVolumesForPod provides a mock function with given fields: podUID

func (*MockProvider) ListPodCPUAndMemoryStats added in v1.23.0

func (_m *MockProvider) ListPodCPUAndMemoryStats(ctx context.Context) ([]v1alpha1.PodStats, error)

ListPodCPUAndMemoryStats provides a mock function with given fields: ctx

func (*MockProvider) ListPodStats added in v1.23.0

func (_m *MockProvider) ListPodStats(ctx context.Context) ([]v1alpha1.PodStats, error)

ListPodStats provides a mock function with given fields: ctx

func (*MockProvider) ListPodStatsAndUpdateCPUNanoCoreUsage added in v1.23.0

func (_m *MockProvider) ListPodStatsAndUpdateCPUNanoCoreUsage(ctx context.Context) ([]v1alpha1.PodStats, error)

ListPodStatsAndUpdateCPUNanoCoreUsage provides a mock function with given fields: ctx

func (*MockProvider) ListVolumesForPod added in v1.23.0

func (_m *MockProvider) ListVolumesForPod(podUID types.UID) (map[string]volume.Volume, bool)

ListVolumesForPod provides a mock function with given fields: podUID

func (*MockProvider) RlimitStats added in v1.23.0

func (_m *MockProvider) RlimitStats() (*v1alpha1.RlimitStats, error)

RlimitStats provides a mock function with given fields:

func (*MockProvider) RootFsStats added in v1.23.0

func (_m *MockProvider) RootFsStats() (*v1alpha1.FsStats, error)

RootFsStats provides a mock function with given fields:

type MockProvider_Expecter added in v1.31.0

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

func (*MockProvider_Expecter) GetCgroupCPUAndMemoryStats added in v1.31.0

func (_e *MockProvider_Expecter) GetCgroupCPUAndMemoryStats(cgroupName interface{}, updateStats interface{}) *MockProvider_GetCgroupCPUAndMemoryStats_Call

GetCgroupCPUAndMemoryStats is a helper method to define mock.On call

  • cgroupName string
  • updateStats bool

func (*MockProvider_Expecter) GetCgroupStats added in v1.31.0

func (_e *MockProvider_Expecter) GetCgroupStats(cgroupName interface{}, updateStats interface{}) *MockProvider_GetCgroupStats_Call

GetCgroupStats is a helper method to define mock.On call

  • cgroupName string
  • updateStats bool

func (*MockProvider_Expecter) GetNode added in v1.31.0

GetNode is a helper method to define mock.On call

func (*MockProvider_Expecter) GetNodeConfig added in v1.31.0

GetNodeConfig is a helper method to define mock.On call

func (*MockProvider_Expecter) GetPodByCgroupfs added in v1.31.0

func (_e *MockProvider_Expecter) GetPodByCgroupfs(cgroupfs interface{}) *MockProvider_GetPodByCgroupfs_Call

GetPodByCgroupfs is a helper method to define mock.On call

  • cgroupfs string

func (*MockProvider_Expecter) GetPodByName added in v1.31.0

func (_e *MockProvider_Expecter) GetPodByName(namespace interface{}, name interface{}) *MockProvider_GetPodByName_Call

GetPodByName is a helper method to define mock.On call

  • namespace string
  • name string

func (*MockProvider_Expecter) GetPodCgroupRoot added in v1.31.0

GetPodCgroupRoot is a helper method to define mock.On call

func (*MockProvider_Expecter) GetPods added in v1.31.0

GetPods is a helper method to define mock.On call

func (*MockProvider_Expecter) GetRequestedContainersInfo added in v1.31.0

func (_e *MockProvider_Expecter) GetRequestedContainersInfo(containerName interface{}, options interface{}) *MockProvider_GetRequestedContainersInfo_Call

GetRequestedContainersInfo is a helper method to define mock.On call

  • containerName string
  • options v2.RequestOptions

func (*MockProvider_Expecter) ImageFsStats added in v1.31.0

func (_e *MockProvider_Expecter) ImageFsStats(ctx interface{}) *MockProvider_ImageFsStats_Call

ImageFsStats is a helper method to define mock.On call

  • ctx context.Context

func (*MockProvider_Expecter) ListBlockVolumesForPod added in v1.31.0

func (_e *MockProvider_Expecter) ListBlockVolumesForPod(podUID interface{}) *MockProvider_ListBlockVolumesForPod_Call

ListBlockVolumesForPod is a helper method to define mock.On call

  • podUID types.UID

func (*MockProvider_Expecter) ListPodCPUAndMemoryStats added in v1.31.0

func (_e *MockProvider_Expecter) ListPodCPUAndMemoryStats(ctx interface{}) *MockProvider_ListPodCPUAndMemoryStats_Call

ListPodCPUAndMemoryStats is a helper method to define mock.On call

  • ctx context.Context

func (*MockProvider_Expecter) ListPodStats added in v1.31.0

func (_e *MockProvider_Expecter) ListPodStats(ctx interface{}) *MockProvider_ListPodStats_Call

ListPodStats is a helper method to define mock.On call

  • ctx context.Context

func (*MockProvider_Expecter) ListPodStatsAndUpdateCPUNanoCoreUsage added in v1.31.0

func (_e *MockProvider_Expecter) ListPodStatsAndUpdateCPUNanoCoreUsage(ctx interface{}) *MockProvider_ListPodStatsAndUpdateCPUNanoCoreUsage_Call

ListPodStatsAndUpdateCPUNanoCoreUsage is a helper method to define mock.On call

  • ctx context.Context

func (*MockProvider_Expecter) ListVolumesForPod added in v1.31.0

func (_e *MockProvider_Expecter) ListVolumesForPod(podUID interface{}) *MockProvider_ListVolumesForPod_Call

ListVolumesForPod is a helper method to define mock.On call

  • podUID types.UID

func (*MockProvider_Expecter) RlimitStats added in v1.31.0

RlimitStats is a helper method to define mock.On call

func (*MockProvider_Expecter) RootFsStats added in v1.31.0

RootFsStats is a helper method to define mock.On call

type MockProvider_GetCgroupCPUAndMemoryStats_Call added in v1.31.0

type MockProvider_GetCgroupCPUAndMemoryStats_Call struct {
	*mock.Call
}

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

func (*MockProvider_GetCgroupCPUAndMemoryStats_Call) Return added in v1.31.0

func (*MockProvider_GetCgroupCPUAndMemoryStats_Call) Run added in v1.31.0

func (*MockProvider_GetCgroupCPUAndMemoryStats_Call) RunAndReturn added in v1.31.0

type MockProvider_GetCgroupStats_Call added in v1.31.0

type MockProvider_GetCgroupStats_Call struct {
	*mock.Call
}

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

func (*MockProvider_GetCgroupStats_Call) Return added in v1.31.0

func (*MockProvider_GetCgroupStats_Call) Run added in v1.31.0

func (_c *MockProvider_GetCgroupStats_Call) Run(run func(cgroupName string, updateStats bool)) *MockProvider_GetCgroupStats_Call

func (*MockProvider_GetCgroupStats_Call) RunAndReturn added in v1.31.0

type MockProvider_GetNodeConfig_Call added in v1.31.0

type MockProvider_GetNodeConfig_Call struct {
	*mock.Call
}

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

func (*MockProvider_GetNodeConfig_Call) Return added in v1.31.0

func (*MockProvider_GetNodeConfig_Call) Run added in v1.31.0

func (*MockProvider_GetNodeConfig_Call) RunAndReturn added in v1.31.0

type MockProvider_GetNode_Call added in v1.31.0

type MockProvider_GetNode_Call struct {
	*mock.Call
}

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

func (*MockProvider_GetNode_Call) Return added in v1.31.0

func (*MockProvider_GetNode_Call) Run added in v1.31.0

func (*MockProvider_GetNode_Call) RunAndReturn added in v1.31.0

func (_c *MockProvider_GetNode_Call) RunAndReturn(run func() (*v1.Node, error)) *MockProvider_GetNode_Call

type MockProvider_GetPodByCgroupfs_Call added in v1.31.0

type MockProvider_GetPodByCgroupfs_Call struct {
	*mock.Call
}

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

func (*MockProvider_GetPodByCgroupfs_Call) Return added in v1.31.0

func (*MockProvider_GetPodByCgroupfs_Call) Run added in v1.31.0

func (*MockProvider_GetPodByCgroupfs_Call) RunAndReturn added in v1.31.0

type MockProvider_GetPodByName_Call added in v1.31.0

type MockProvider_GetPodByName_Call struct {
	*mock.Call
}

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

func (*MockProvider_GetPodByName_Call) Return added in v1.31.0

func (*MockProvider_GetPodByName_Call) Run added in v1.31.0

func (_c *MockProvider_GetPodByName_Call) Run(run func(namespace string, name string)) *MockProvider_GetPodByName_Call

func (*MockProvider_GetPodByName_Call) RunAndReturn added in v1.31.0

type MockProvider_GetPodCgroupRoot_Call added in v1.31.0

type MockProvider_GetPodCgroupRoot_Call struct {
	*mock.Call
}

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

func (*MockProvider_GetPodCgroupRoot_Call) Return added in v1.31.0

func (*MockProvider_GetPodCgroupRoot_Call) Run added in v1.31.0

func (*MockProvider_GetPodCgroupRoot_Call) RunAndReturn added in v1.31.0

type MockProvider_GetPods_Call added in v1.31.0

type MockProvider_GetPods_Call struct {
	*mock.Call
}

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

func (*MockProvider_GetPods_Call) Return added in v1.31.0

func (*MockProvider_GetPods_Call) Run added in v1.31.0

func (*MockProvider_GetPods_Call) RunAndReturn added in v1.31.0

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

type MockProvider_GetRequestedContainersInfo_Call added in v1.31.0

type MockProvider_GetRequestedContainersInfo_Call struct {
	*mock.Call
}

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

func (*MockProvider_GetRequestedContainersInfo_Call) Return added in v1.31.0

func (*MockProvider_GetRequestedContainersInfo_Call) Run added in v1.31.0

func (*MockProvider_GetRequestedContainersInfo_Call) RunAndReturn added in v1.31.0

type MockProvider_ImageFsStats_Call added in v1.31.0

type MockProvider_ImageFsStats_Call struct {
	*mock.Call
}

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

func (*MockProvider_ImageFsStats_Call) Return added in v1.31.0

func (*MockProvider_ImageFsStats_Call) Run added in v1.31.0

func (*MockProvider_ImageFsStats_Call) RunAndReturn added in v1.31.0

type MockProvider_ListBlockVolumesForPod_Call added in v1.31.0

type MockProvider_ListBlockVolumesForPod_Call struct {
	*mock.Call
}

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

func (*MockProvider_ListBlockVolumesForPod_Call) Return added in v1.31.0

func (*MockProvider_ListBlockVolumesForPod_Call) Run added in v1.31.0

func (*MockProvider_ListBlockVolumesForPod_Call) RunAndReturn added in v1.31.0

type MockProvider_ListPodCPUAndMemoryStats_Call added in v1.31.0

type MockProvider_ListPodCPUAndMemoryStats_Call struct {
	*mock.Call
}

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

func (*MockProvider_ListPodCPUAndMemoryStats_Call) Return added in v1.31.0

func (*MockProvider_ListPodCPUAndMemoryStats_Call) Run added in v1.31.0

func (*MockProvider_ListPodCPUAndMemoryStats_Call) RunAndReturn added in v1.31.0

type MockProvider_ListPodStatsAndUpdateCPUNanoCoreUsage_Call added in v1.31.0

type MockProvider_ListPodStatsAndUpdateCPUNanoCoreUsage_Call struct {
	*mock.Call
}

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

func (*MockProvider_ListPodStatsAndUpdateCPUNanoCoreUsage_Call) Return added in v1.31.0

func (*MockProvider_ListPodStatsAndUpdateCPUNanoCoreUsage_Call) Run added in v1.31.0

func (*MockProvider_ListPodStatsAndUpdateCPUNanoCoreUsage_Call) RunAndReturn added in v1.31.0

type MockProvider_ListPodStats_Call added in v1.31.0

type MockProvider_ListPodStats_Call struct {
	*mock.Call
}

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

func (*MockProvider_ListPodStats_Call) Return added in v1.31.0

func (*MockProvider_ListPodStats_Call) Run added in v1.31.0

func (*MockProvider_ListPodStats_Call) RunAndReturn added in v1.31.0

type MockProvider_ListVolumesForPod_Call added in v1.31.0

type MockProvider_ListVolumesForPod_Call struct {
	*mock.Call
}

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

func (*MockProvider_ListVolumesForPod_Call) Return added in v1.31.0

func (*MockProvider_ListVolumesForPod_Call) Run added in v1.31.0

func (*MockProvider_ListVolumesForPod_Call) RunAndReturn added in v1.31.0

type MockProvider_RlimitStats_Call added in v1.31.0

type MockProvider_RlimitStats_Call struct {
	*mock.Call
}

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

func (*MockProvider_RlimitStats_Call) Return added in v1.31.0

func (*MockProvider_RlimitStats_Call) Run added in v1.31.0

func (*MockProvider_RlimitStats_Call) RunAndReturn added in v1.31.0

type MockProvider_RootFsStats_Call added in v1.31.0

type MockProvider_RootFsStats_Call struct {
	*mock.Call
}

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

func (*MockProvider_RootFsStats_Call) Return added in v1.31.0

func (*MockProvider_RootFsStats_Call) Run added in v1.31.0

func (*MockProvider_RootFsStats_Call) RunAndReturn added in v1.31.0

type MockSummaryProvider added in v1.23.0

type MockSummaryProvider struct {
	mock.Mock
}

MockSummaryProvider is an autogenerated mock type for the SummaryProvider type

func NewMockSummaryProvider added in v1.23.0

func NewMockSummaryProvider(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockSummaryProvider

NewMockSummaryProvider creates a new instance of MockSummaryProvider. 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 (*MockSummaryProvider) EXPECT added in v1.23.0

func (*MockSummaryProvider) Get added in v1.23.0

func (_m *MockSummaryProvider) Get(ctx context.Context, updateStats bool) (*v1alpha1.Summary, error)

Get provides a mock function with given fields: ctx, updateStats

func (*MockSummaryProvider) GetCPUAndMemoryStats added in v1.23.0

func (_m *MockSummaryProvider) GetCPUAndMemoryStats(ctx context.Context) (*v1alpha1.Summary, error)

GetCPUAndMemoryStats provides a mock function with given fields: ctx

type MockSummaryProvider_Expecter added in v1.31.0

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

func (*MockSummaryProvider_Expecter) Get added in v1.31.0

func (_e *MockSummaryProvider_Expecter) Get(ctx interface{}, updateStats interface{}) *MockSummaryProvider_Get_Call

Get is a helper method to define mock.On call

  • ctx context.Context
  • updateStats bool

func (*MockSummaryProvider_Expecter) GetCPUAndMemoryStats added in v1.31.0

func (_e *MockSummaryProvider_Expecter) GetCPUAndMemoryStats(ctx interface{}) *MockSummaryProvider_GetCPUAndMemoryStats_Call

GetCPUAndMemoryStats is a helper method to define mock.On call

  • ctx context.Context

type MockSummaryProvider_GetCPUAndMemoryStats_Call added in v1.31.0

type MockSummaryProvider_GetCPUAndMemoryStats_Call struct {
	*mock.Call
}

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

func (*MockSummaryProvider_GetCPUAndMemoryStats_Call) Return added in v1.31.0

func (*MockSummaryProvider_GetCPUAndMemoryStats_Call) Run added in v1.31.0

func (*MockSummaryProvider_GetCPUAndMemoryStats_Call) RunAndReturn added in v1.31.0

type MockSummaryProvider_Get_Call added in v1.31.0

type MockSummaryProvider_Get_Call struct {
	*mock.Call
}

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

func (*MockSummaryProvider_Get_Call) Return added in v1.31.0

func (*MockSummaryProvider_Get_Call) Run added in v1.31.0

func (_c *MockSummaryProvider_Get_Call) Run(run func(ctx context.Context, updateStats bool)) *MockSummaryProvider_Get_Call

func (*MockSummaryProvider_Get_Call) RunAndReturn added in v1.31.0

Jump to

Keyboard shortcuts

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