testing

package
v1.10.6-lite5 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2018 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FakeCache

type FakeCache struct {
	AssumeFunc       func(*v1.Pod)
	ForgetFunc       func(*v1.Pod)
	IsAssumedPodFunc func(*v1.Pod) bool
	GetPodFunc       func(*v1.Pod) *v1.Pod
}

FakeCache is used for testing

func (*FakeCache) AddNode

func (f *FakeCache) AddNode(node *v1.Node) error

AddNode is a fake method for testing.

func (*FakeCache) AddPDB

func (f *FakeCache) AddPDB(pdb *policy.PodDisruptionBudget) error

AddPDB is a fake method for testing.

func (*FakeCache) AddPod

func (f *FakeCache) AddPod(pod *v1.Pod) error

AddPod is a fake method for testing.

func (*FakeCache) AssumePod

func (f *FakeCache) AssumePod(pod *v1.Pod) error

AssumePod is a fake method for testing.

func (*FakeCache) FilteredList

func (f *FakeCache) FilteredList(filter schedulercache.PodFilter, selector labels.Selector) ([]*v1.Pod, error)

FilteredList is a fake method for testing.

func (*FakeCache) FinishBinding

func (f *FakeCache) FinishBinding(pod *v1.Pod) error

FinishBinding is a fake method for testing.

func (*FakeCache) ForgetPod

func (f *FakeCache) ForgetPod(pod *v1.Pod) error

ForgetPod is a fake method for testing.

func (*FakeCache) GetPod

func (f *FakeCache) GetPod(pod *v1.Pod) (*v1.Pod, error)

GetPod is a fake method for testing.

func (*FakeCache) IsAssumedPod

func (f *FakeCache) IsAssumedPod(pod *v1.Pod) (bool, error)

IsAssumedPod is a fake method for testing.

func (*FakeCache) List

func (f *FakeCache) List(s labels.Selector) ([]*v1.Pod, error)

List is a fake method for testing.

func (*FakeCache) ListPDBs

func (f *FakeCache) ListPDBs(selector labels.Selector) ([]*policy.PodDisruptionBudget, error)

ListPDBs is a fake method for testing.

func (*FakeCache) RemoveNode

func (f *FakeCache) RemoveNode(node *v1.Node) error

RemoveNode is a fake method for testing.

func (*FakeCache) RemovePDB

func (f *FakeCache) RemovePDB(pdb *policy.PodDisruptionBudget) error

RemovePDB is a fake method for testing.

func (*FakeCache) RemovePod

func (f *FakeCache) RemovePod(pod *v1.Pod) error

RemovePod is a fake method for testing.

func (*FakeCache) UpdateNode

func (f *FakeCache) UpdateNode(oldNode, newNode *v1.Node) error

UpdateNode is a fake method for testing.

func (*FakeCache) UpdateNodeNameToInfoMap

func (f *FakeCache) UpdateNodeNameToInfoMap(infoMap map[string]*schedulercache.NodeInfo) error

UpdateNodeNameToInfoMap is a fake method for testing.

func (*FakeCache) UpdatePDB

func (f *FakeCache) UpdatePDB(oldPDB, newPDB *policy.PodDisruptionBudget) error

UpdatePDB is a fake method for testing.

func (*FakeCache) UpdatePod

func (f *FakeCache) UpdatePod(oldPod, newPod *v1.Pod) error

UpdatePod is a fake method for testing.

type FakeControllerLister

type FakeControllerLister []*v1.ReplicationController

FakeControllerLister implements ControllerLister on []v1.ReplicationController for test purposes.

func (FakeControllerLister) GetPodControllers

func (f FakeControllerLister) GetPodControllers(pod *v1.Pod) (controllers []*v1.ReplicationController, err error)

GetPodControllers gets the ReplicationControllers that have the selector that match the labels on the given pod

func (FakeControllerLister) List

List returns []v1.ReplicationController, the list of all ReplicationControllers.

type FakeNodeLister

type FakeNodeLister []*v1.Node

FakeNodeLister implements NodeLister on a []string for test purposes.

func (FakeNodeLister) List

func (f FakeNodeLister) List() ([]*v1.Node, error)

List returns nodes as a []string.

type FakePersistentVolumeClaimLister

type FakePersistentVolumeClaimLister []*v1.PersistentVolumeClaim

FakePersistentVolumeClaimLister implements PersistentVolumeClaimLister on []*v1.PersistentVolumeClaim for test purposes.

func (FakePersistentVolumeClaimLister) List

List returns not implemented error.

func (FakePersistentVolumeClaimLister) PersistentVolumeClaims

PersistentVolumeClaims returns a FakePersistentVolumeClaimLister object.

type FakePodLister

type FakePodLister []*v1.Pod

FakePodLister implements PodLister on an []v1.Pods for test purposes.

func (FakePodLister) FilteredList

func (f FakePodLister) FilteredList(podFilter schedulercache.PodFilter, s labels.Selector) (selected []*v1.Pod, err error)

FilteredList returns pods matching a pod filter and a label selector.

func (FakePodLister) List

func (f FakePodLister) List(s labels.Selector) (selected []*v1.Pod, err error)

List returns []*v1.Pod matching a query.

type FakeReplicaSetLister

type FakeReplicaSetLister []*extensions.ReplicaSet

FakeReplicaSetLister implements ControllerLister on []extensions.ReplicaSet for test purposes.

func (FakeReplicaSetLister) GetPodReplicaSets

func (f FakeReplicaSetLister) GetPodReplicaSets(pod *v1.Pod) (rss []*extensions.ReplicaSet, err error)

GetPodReplicaSets gets the ReplicaSets that have the selector that match the labels on the given pod

type FakeServiceLister

type FakeServiceLister []*v1.Service

FakeServiceLister implements ServiceLister on []v1.Service for test purposes.

func (FakeServiceLister) GetPodServices

func (f FakeServiceLister) GetPodServices(pod *v1.Pod) (services []*v1.Service, err error)

GetPodServices gets the services that have the selector that match the labels on the given pod.

func (FakeServiceLister) List

List returns v1.ServiceList, the list of all services.

type FakeStatefulSetLister

type FakeStatefulSetLister []*apps.StatefulSet

FakeStatefulSetLister implements ControllerLister on []apps.StatefulSet for testing purposes.

func (FakeStatefulSetLister) GetPodStatefulSets

func (f FakeStatefulSetLister) GetPodStatefulSets(pod *v1.Pod) (sss []*apps.StatefulSet, err error)

GetPodStatefulSets gets the StatefulSets that have the selector that match the labels on the given pod.

type PodsToCache

type PodsToCache []*v1.Pod

PodsToCache is used for testing

func (PodsToCache) AddNode

func (p PodsToCache) AddNode(node *v1.Node) error

AddNode returns nil.

func (PodsToCache) AddPod

func (p PodsToCache) AddPod(pod *v1.Pod) error

AddPod returns nil.

func (PodsToCache) AssumePod

func (p PodsToCache) AssumePod(pod *v1.Pod) error

AssumePod returns nil.

func (PodsToCache) ForgetPod

func (p PodsToCache) ForgetPod(pod *v1.Pod) error

ForgetPod returns nil.

func (PodsToCache) List

func (p PodsToCache) List(s labels.Selector) (selected []*v1.Pod, err error)

List returns pods matching the label selector.

func (PodsToCache) RemoveNode

func (p PodsToCache) RemoveNode(node *v1.Node) error

RemoveNode returns nil.

func (PodsToCache) RemovePod

func (p PodsToCache) RemovePod(pod *v1.Pod) error

RemovePod returns nil.

func (PodsToCache) UpdateNode

func (p PodsToCache) UpdateNode(oldNode, newNode *v1.Node) error

UpdateNode returns nil.

func (PodsToCache) UpdateNodeNameToInfoMap

func (p PodsToCache) UpdateNodeNameToInfoMap(infoMap map[string]*schedulercache.NodeInfo) error

UpdateNodeNameToInfoMap returns nil.

func (PodsToCache) UpdatePod

func (p PodsToCache) UpdatePod(oldPod, newPod *v1.Pod) error

UpdatePod returns nil.

Jump to

Keyboard shortcuts

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