test

package
v1.4.0-2 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2023 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMockNamespaceInformer

func NewMockNamespaceInformer(errIfNotFound bool) informersV1.NamespaceInformer

func NewMockNamespaceLister

func NewMockNamespaceLister(errIfNotFound bool) listersV1.NamespaceLister

func NewMockPriorityClassInformer added in v1.2.0

func NewMockPriorityClassInformer() informersV1.PriorityClassInformer

func NewMockPriorityClassLister added in v1.2.0

func NewMockPriorityClassLister() listersV1.PriorityClassLister

Types

type ConfigMapInformerMock

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

func NewMockedConfigMapInformer

func NewMockedConfigMapInformer() *ConfigMapInformerMock

func (ConfigMapInformerMock) Informer

func (ConfigMapInformerMock) Lister

type ConfigMapListerMock

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

func NewConfigMapListerMock

func NewConfigMapListerMock() *ConfigMapListerMock

func (ConfigMapListerMock) ConfigMaps

func (ConfigMapListerMock) List

func (c ConfigMapListerMock) List(selector labels.Selector) (ret []*v1.ConfigMap, err error)

type MockNamespaceInformer

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

func (*MockNamespaceInformer) Informer

func (*MockNamespaceInformer) Lister

type MockNamespaceLister

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

func (*MockNamespaceLister) Add

func (nsl *MockNamespaceLister) Add(ns *v1.Namespace)

func (*MockNamespaceLister) Get

func (nsl *MockNamespaceLister) Get(name string) (*v1.Namespace, error)

func (*MockNamespaceLister) List

func (nsl *MockNamespaceLister) List(labels.Selector) (ret []*v1.Namespace, err error)

type MockPriorityClassInformer added in v1.2.0

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

func (*MockPriorityClassInformer) Informer added in v1.2.0

func (*MockPriorityClassInformer) Lister added in v1.2.0

type MockPriorityClassLister added in v1.2.0

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

func (*MockPriorityClassLister) Add added in v1.2.0

func (*MockPriorityClassLister) Get added in v1.2.0

func (*MockPriorityClassLister) List added in v1.2.0

func (nsl *MockPriorityClassLister) List(labels.Selector) (ret []*v1.PriorityClass, err error)

type MockedNodeInformer

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

func NewMockedNodeInformer

func NewMockedNodeInformer() *MockedNodeInformer

func (*MockedNodeInformer) Informer

func (*MockedNodeInformer) Lister

func (m *MockedNodeInformer) Lister() v1.NodeLister

func (*MockedNodeInformer) SetLister

func (m *MockedNodeInformer) SetLister(lister v1.NodeLister)

type MockedPodInformer

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

func NewMockedPodInformer

func NewMockedPodInformer() *MockedPodInformer

func (*MockedPodInformer) Informer

func (*MockedPodInformer) Lister

func (m *MockedPodInformer) Lister() v1.PodLister

func (*MockedPodInformer) SetLister

func (m *MockedPodInformer) SetLister(lister v1.PodLister)

type MockedRecoverableAppManager

type MockedRecoverableAppManager struct {
}

func NewMockedRecoverableAppManager

func NewMockedRecoverableAppManager() *MockedRecoverableAppManager

func (*MockedRecoverableAppManager) GetExistingAllocation

func (m *MockedRecoverableAppManager) GetExistingAllocation(pod *v1.Pod) *si.Allocation

func (*MockedRecoverableAppManager) ListPods added in v1.1.0

func (m *MockedRecoverableAppManager) ListPods() ([]*v1.Pod, error)

type NodeListerMock

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

func NewNodeListerMock

func NewNodeListerMock() *NodeListerMock

func (*NodeListerMock) AddNode

func (n *NodeListerMock) AddNode(node *v1.Node)

func (*NodeListerMock) Get

func (n *NodeListerMock) Get(name string) (*v1.Node, error)

func (*NodeListerMock) List

func (n *NodeListerMock) List(selector labels.Selector) (ret []*v1.Node, err error)

func (*NodeListerMock) RemoveNode added in v1.4.0

func (n *NodeListerMock) RemoveNode(node *v1.Node)

type PodListerMock

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

func NewPodListerMock

func NewPodListerMock() *PodListerMock

func (*PodListerMock) AddPod

func (n *PodListerMock) AddPod(pod *v1.Pod)

func (*PodListerMock) DeletePod added in v1.4.0

func (n *PodListerMock) DeletePod(pod *v1.Pod)

func (*PodListerMock) Get

func (n *PodListerMock) Get(name string) (*v1.Pod, error)

func (*PodListerMock) List

func (n *PodListerMock) List(selector labels.Selector) (ret []*v1.Pod, err error)

func (*PodListerMock) Pods

func (n *PodListerMock) Pods(namespace string) clientv1.PodNamespaceLister

type SchedulerAPIMock

type SchedulerAPIMock struct {
	UpdateAllocationCount  int32
	UpdateApplicationCount int32
	UpdateNodeCount        int32

	UpdateAllocationFn  func(request *si.AllocationRequest) error
	UpdateApplicationFn func(request *si.ApplicationRequest) error
	UpdateNodeFn        func(request *si.NodeRequest) error
	// contains filtered or unexported fields
}

func NewSchedulerAPIMock

func NewSchedulerAPIMock() *SchedulerAPIMock

func (*SchedulerAPIMock) GetRegisterCount

func (api *SchedulerAPIMock) GetRegisterCount() int32

func (*SchedulerAPIMock) GetUpdateAllocationCount

func (api *SchedulerAPIMock) GetUpdateAllocationCount() int32

func (*SchedulerAPIMock) GetUpdateApplicationCount

func (api *SchedulerAPIMock) GetUpdateApplicationCount() int32

func (*SchedulerAPIMock) GetUpdateNodeCount

func (api *SchedulerAPIMock) GetUpdateNodeCount() int32

func (*SchedulerAPIMock) RegisterFunction

func (*SchedulerAPIMock) RegisterResourceManager

func (*SchedulerAPIMock) ResetAllCounters

func (api *SchedulerAPIMock) ResetAllCounters()

func (*SchedulerAPIMock) UpdateAllocation

func (api *SchedulerAPIMock) UpdateAllocation(request *si.AllocationRequest) error

func (*SchedulerAPIMock) UpdateAllocationFunction

func (api *SchedulerAPIMock) UpdateAllocationFunction(ufn func(request *si.AllocationRequest) error) *SchedulerAPIMock

func (*SchedulerAPIMock) UpdateApplication

func (api *SchedulerAPIMock) UpdateApplication(request *si.ApplicationRequest) error

func (*SchedulerAPIMock) UpdateApplicationFunction

func (api *SchedulerAPIMock) UpdateApplicationFunction(ufn func(request *si.ApplicationRequest) error) *SchedulerAPIMock

func (*SchedulerAPIMock) UpdateConfiguration

func (api *SchedulerAPIMock) UpdateConfiguration(request *si.UpdateConfigurationRequest) error

func (*SchedulerAPIMock) UpdateNode

func (api *SchedulerAPIMock) UpdateNode(request *si.NodeRequest) error

func (*SchedulerAPIMock) UpdateNodeFunction

func (api *SchedulerAPIMock) UpdateNodeFunction(ufn func(request *si.NodeRequest) error) *SchedulerAPIMock

Jump to

Keyboard shortcuts

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