test

package
v1.0.0-2 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2022 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() informersV1.NamespaceInformer

func NewMockNamespaceLister

func NewMockNamespaceLister() listersV1.NamespaceLister

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 MockedAppInformer

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

func NewAppInformerMock

func NewAppInformerMock() *MockedAppInformer

func (MockedAppInformer) Informer

func (MockedAppInformer) Lister

type MockedAppLister

type MockedAppLister struct {
}

func (MockedAppLister) Applications

func (m MockedAppLister) Applications(namespace string) lister.ApplicationNamespaceLister

func (MockedAppLister) Get

func (MockedAppLister) List

func (m MockedAppLister) List(selector labels.Selector) (ret []*v1alpha1.Application, 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) ListApplications

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)

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) 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(rmID string) 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