kubernetes/pkg/kubelet/eviction/helpers_test.go

func quantityMustParse(value string) *resource.Quantity {}

func TestGetReclaimableThreshold(t *testing.T) {}

func TestParseThresholdConfig(t *testing.T) {}

func TestAddAllocatableThresholds(t *testing.T) {}

func TestFallbackResourcesUsage(t *testing.T) {}

func thresholdsEqual(expected []evictionapi.Threshold, actual []evictionapi.Threshold) bool {}

func thresholdEqual(a evictionapi.Threshold, b evictionapi.Threshold) bool {}

func TestOrderedByExceedsRequestMemory(t *testing.T) {}

func TestOrderedByExceedsRequestDisk(t *testing.T) {}

func TestOrderedByPriority(t *testing.T) {}

func TestOrderedbyDisk(t *testing.T) {}

func TestOrderedbyInodes(t *testing.T) {}

// TestOrderedByPriorityDisk ensures we order pods by priority and then greediest resource consumer
func TestOrderedByPriorityDisk(t *testing.T) {}

// TestOrderedByPriorityInodes ensures we order pods by priority and then greediest resource consumer
func TestOrderedByPriorityInodes(t *testing.T) {}

// TestOrderedByMemory ensures we order pods by greediest memory consumer relative to request.
func TestOrderedByMemory(t *testing.T) {}

// TestOrderedByPriorityMemory ensures we order by priority and then memory consumption relative to request.
func TestOrderedByPriorityMemory(t *testing.T) {}

// TestOrderedByPriorityProcess ensures we order by priority and then process consumption relative to request.
func TestOrderedByPriorityProcess(t *testing.T) {}

func TestSortByEvictionPriority(t *testing.T) {}

type fakeSummaryProvider

func (f *fakeSummaryProvider) Get(ctx context.Context, updateStats bool) (*statsapi.Summary, error) {}

func (f *fakeSummaryProvider) GetCPUAndMemoryStats(ctx context.Context) (*statsapi.Summary, error) {}

// newPodStats returns a pod stat where each container is using the specified working set
// each pod must have a Name, UID, Namespace
func newPodStats(pod *v1.Pod, podWorkingSetBytes uint64) statsapi.PodStats {}

func TestMakeSignalObservations(t *testing.T) {}

func TestThresholdsMet(t *testing.T) {}

func TestThresholdsUpdatedStats(t *testing.T) {}

func TestPercentageThresholdsMet(t *testing.T) {}

func TestThresholdsFirstObservedAt(t *testing.T) {}

func TestThresholdsMetGracePeriod(t *testing.T) {}

func TestNodeConditions(t *testing.T) {}

func TestNodeConditionsLastObservedAt(t *testing.T) {}

func TestNodeConditionsObservedSince(t *testing.T) {}

func TestHasNodeConditions(t *testing.T) {}

func TestParsePercentage(t *testing.T) {}

func TestCompareThresholdValue(t *testing.T) {}

func TestAddContainerFsThresholds(t *testing.T) {}

// newPodInodeStats returns stats with specified usage amounts.
func newPodInodeStats(pod *v1.Pod, rootFsInodesUsed, logsInodesUsed, perLocalVolumeInodesUsed resource.Quantity) statsapi.PodStats {}

// newPodDiskStats returns stats with specified usage amounts.
func newPodDiskStats(pod *v1.Pod, rootFsUsed, logsUsed, perLocalVolumeUsed resource.Quantity) statsapi.PodStats {}

func newPodMemoryStats(pod *v1.Pod, workingSet resource.Quantity) statsapi.PodStats {}

func newPodProcessStats(pod *v1.Pod, num uint64) statsapi.PodStats {}

func newResourceList(cpu, memory, disk string) v1.ResourceList {}

func newResourceRequirements(requests, limits v1.ResourceList) v1.ResourceRequirements {}

func newContainer(name string, requests v1.ResourceList, limits v1.ResourceList) v1.Container {}

func newRestartableInitContainer(name string, requests v1.ResourceList, limits v1.ResourceList) v1.Container {}

func newVolume(name string, volumeSource v1.VolumeSource) v1.Volume {}

// newPod uses the name as the uid.  Make names unique for testing.
func newPod(name string, priority int32, containers []v1.Container, volumes []v1.Volume) *v1.Pod {}

func newPodWithInitContainers(name string, priority int32, initContainers []v1.Container, containers []v1.Container, volumes []v1.Volume) *v1.Pod {}

type nodeConditionList

// Equal adds the ability to check equality between two lists of node conditions.
func (s1 nodeConditionList) Equal(s2 nodeConditionList) bool {}

type thresholdList

// Equal adds the ability to check equality between two lists of node conditions.
func (s1 thresholdList) Equal(s2 thresholdList) bool {}

func TestStatsNotFoundForPod(t *testing.T) {}

func TestEvictionMessage(t *testing.T) {}