kubernetes/pkg/kubelet/preemption/preemption_test.go

const clusterCritical

const nodeCritical

const bestEffort

const burstable

const highRequestBurstable

const guaranteed

const highRequestGuaranteed

const tinyBurstable

const maxPods

type fakePodKiller

func newFakePodKiller(errPodKilling bool) *fakePodKiller {}

func (f *fakePodKiller) clear() {}

func (f *fakePodKiller) getKilledPods() []*v1.Pod {}

func (f *fakePodKiller) killPodNow(pod *v1.Pod, evict bool, gracePeriodOverride *int64, fn func(status *v1.PodStatus)) error {}

type fakePodProvider

func newFakePodProvider() *fakePodProvider {}

func (f *fakePodProvider) setPods(pods []*v1.Pod) {}

func (f *fakePodProvider) getPods() []*v1.Pod {}

func getTestCriticalPodAdmissionHandler(podProvider *fakePodProvider, podKiller *fakePodKiller) *CriticalPodAdmissionHandler {}

func TestEvictPodsToFreeRequests(t *testing.T) {}

func BenchmarkGetPodsToPreempt(t *testing.B) {}

func TestGetPodsToPreempt(t *testing.T) {}

func TestAdmissionRequirementsDistance(t *testing.T) {}

func TestAdmissionRequirementsSubtract(t *testing.T) {}

func getTestPods() map[string]*v1.Pod {}

func getPodWithResources(name string, requests v1.ResourceRequirements) *v1.Pod {}

func parseCPUToInt64(res string) int64 {}

func parseNonCPUResourceToInt64(res string) int64 {}

func getAdmissionRequirementList(cpu, memory, pods int) admissionRequirementList {}

// this checks if the lists contents contain all of the same elements.
// this is not correct if there are duplicate pods in the list.
// for example: podListEqual([a, a, b], [a, b, b]) will return true
func admissionRequirementListEqual(list1 admissionRequirementList, list2 admissionRequirementList) bool {}

// podListEqual checks if the lists contents contain all of the same elements.
func podListEqual(list1 []*v1.Pod, list2 []*v1.Pod) bool {}