kubernetes/pkg/scheduler/framework/preemption/preemption_test.go

var (
	midPriority
	highPriority
)

var veryLargeRes

type FakePostFilterPlugin

func (pl *FakePostFilterPlugin) SelectVictimsOnNode(
	ctx context.Context, state *framework.CycleState, pod *v1.Pod,
	nodeInfo *framework.NodeInfo, pdbs []*policy.PodDisruptionBudget) (victims []*v1.Pod, numViolatingVictim int, status *framework.Status) {}

func (pl *FakePostFilterPlugin) GetOffsetAndNumCandidates(nodes int32) (int32, int32) {}

func (pl *FakePostFilterPlugin) CandidatesToVictimsMap(candidates []Candidate) map[string]*extenderv1.Victims {}

func (pl *FakePostFilterPlugin) PodEligibleToPreemptOthers(_ context.Context, pod *v1.Pod, nominatedNodeStatus *framework.Status) (bool, string) {}

func (pl *FakePostFilterPlugin) OrderedScoreFuncs(ctx context.Context, nodesToVictims map[string]*extenderv1.Victims) []func(node string) int64 {}

type FakePreemptionScorePostFilterPlugin

func (pl *FakePreemptionScorePostFilterPlugin) SelectVictimsOnNode(
	ctx context.Context, state *framework.CycleState, pod *v1.Pod,
	nodeInfo *framework.NodeInfo, pdbs []*policy.PodDisruptionBudget) (victims []*v1.Pod, numViolatingVictim int, status *framework.Status) {}

func (pl *FakePreemptionScorePostFilterPlugin) GetOffsetAndNumCandidates(nodes int32) (int32, int32) {}

func (pl *FakePreemptionScorePostFilterPlugin) CandidatesToVictimsMap(candidates []Candidate) map[string]*extenderv1.Victims {}

func (pl *FakePreemptionScorePostFilterPlugin) PodEligibleToPreemptOthers(_ context.Context, pod *v1.Pod, nominatedNodeStatus *framework.Status) (bool, string) {}

func (pl *FakePreemptionScorePostFilterPlugin) OrderedScoreFuncs(ctx context.Context, nodesToVictims map[string]*extenderv1.Victims) []func(node string) int64 {}

func TestDryRunPreemption(t *testing.T) {}

func TestSelectCandidate(t *testing.T) {}

type fakeCandidate

// Victims returns s.victims.
func (s *fakeCandidate) Victims() *extenderv1.Victims {}

// Name returns s.name.
func (s *fakeCandidate) Name() string {}

func TestPrepareCandidate(t *testing.T) {}

type fakeExtender

func newFakeExtender() *fakeExtender {}

func (f *fakeExtender) WithIgnorable(ignorable bool) *fakeExtender {}

func (f *fakeExtender) WithErrProcessPreemption(errProcessPreemption bool) *fakeExtender {}

func (f *fakeExtender) WithSupportsPreemption(supportsPreemption bool) *fakeExtender {}

func (f *fakeExtender) WithReturnNoVictims(returnsNoVictims bool) *fakeExtender {}

func (f *fakeExtender) Name() string {}

func (f *fakeExtender) IsIgnorable() bool {}

func (f *fakeExtender) ProcessPreemption(
	_ *v1.Pod,
	victims map[string]*extenderv1.Victims,
	_ framework.NodeInfoLister,
) (map[string]*extenderv1.Victims, error) {}

func (f *fakeExtender) SupportsPreemption() bool {}

func (f *fakeExtender) IsInterested(pod *v1.Pod) bool {}

func (f *fakeExtender) Filter(_ *v1.Pod, _ []*framework.NodeInfo) ([]*framework.NodeInfo, extenderv1.FailedNodesMap, extenderv1.FailedNodesMap, error) {}

func (f *fakeExtender) Prioritize(
	_ *v1.Pod,
	_ []*framework.NodeInfo,
) (hostPriorities *extenderv1.HostPriorityList, weight int64, err error) {}

func (f *fakeExtender) Bind(_ *v1.Binding) error {}

func (f *fakeExtender) IsBinder() bool {}

func (f *fakeExtender) IsPrioritizer() bool {}

func (f *fakeExtender) IsFilter() bool {}

func TestCallExtenders(t *testing.T) {}