kubernetes/pkg/scheduler/schedule_one_test.go

const testSchedulerName

const mb

var emptySnapshot

var podTopologySpreadFunc

var errPrioritize

type mockScheduleResult

type fakeExtender

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

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

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

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

func (f *fakeExtender) Filter(pod *v1.Pod, nodes []*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(binding *v1.Binding) error {}

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

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

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

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

type falseMapPlugin

func newFalseMapPlugin() frameworkruntime.PluginFactory {}

func (pl *falseMapPlugin) Name() string {}

func (pl *falseMapPlugin) Score(_ context.Context, _ *framework.CycleState, _ *v1.Pod, _ string) (int64, *framework.Status) {}

func (pl *falseMapPlugin) ScoreExtensions() framework.ScoreExtensions {}

type numericMapPlugin

func newNumericMapPlugin() frameworkruntime.PluginFactory {}

func (pl *numericMapPlugin) Name() string {}

func (pl *numericMapPlugin) Score(_ context.Context, _ *framework.CycleState, _ *v1.Pod, nodeName string) (int64, *framework.Status) {}

func (pl *numericMapPlugin) ScoreExtensions() framework.ScoreExtensions {}

// NewNoPodsFilterPlugin initializes a noPodsFilterPlugin and returns it.
func NewNoPodsFilterPlugin(_ context.Context, _ runtime.Object, _ framework.Handle) (framework.Plugin, error) {}

type reverseNumericMapPlugin

func (pl *reverseNumericMapPlugin) Name() string {}

func (pl *reverseNumericMapPlugin) Score(_ context.Context, _ *framework.CycleState, _ *v1.Pod, nodeName string) (int64, *framework.Status) {}

func (pl *reverseNumericMapPlugin) ScoreExtensions() framework.ScoreExtensions {}

func (pl *reverseNumericMapPlugin) NormalizeScore(_ context.Context, _ *framework.CycleState, _ *v1.Pod, nodeScores framework.NodeScoreList) *framework.Status {}

func newReverseNumericMapPlugin() frameworkruntime.PluginFactory {}

type trueMapPlugin

func (pl *trueMapPlugin) Name() string {}

func (pl *trueMapPlugin) Score(_ context.Context, _ *framework.CycleState, _ *v1.Pod, _ string) (int64, *framework.Status) {}

func (pl *trueMapPlugin) ScoreExtensions() framework.ScoreExtensions {}

func (pl *trueMapPlugin) NormalizeScore(_ context.Context, _ *framework.CycleState, _ *v1.Pod, nodeScores framework.NodeScoreList) *framework.Status {}

func newTrueMapPlugin() frameworkruntime.PluginFactory {}

type noPodsFilterPlugin

// Name returns name of the plugin.
func (pl *noPodsFilterPlugin) Name() string {}

// Filter invoked at the filter extension point.
func (pl *noPodsFilterPlugin) Filter(_ context.Context, _ *framework.CycleState, pod *v1.Pod, nodeInfo *framework.NodeInfo) *framework.Status {}

type fakeNodeSelectorArgs

type fakeNodeSelector

func (s *fakeNodeSelector) Name() string {}

func (s *fakeNodeSelector) Filter(_ context.Context, _ *framework.CycleState, _ *v1.Pod, nodeInfo *framework.NodeInfo) *framework.Status {}

func newFakeNodeSelector(_ context.Context, args runtime.Object, _ framework.Handle) (framework.Plugin, error) {}

const fakeSpecifiedNodeNameAnnotation

type fakeNodeSelectorDependOnPodAnnotation

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

// Filter selects the specified one node and rejects other non-specified nodes.
func (f *fakeNodeSelectorDependOnPodAnnotation) Filter(_ context.Context, _ *framework.CycleState, pod *v1.Pod, nodeInfo *framework.NodeInfo) *framework.Status {}

func newFakeNodeSelectorDependOnPodAnnotation(_ context.Context, _ runtime.Object, _ framework.Handle) (framework.Plugin, error) {}

type TestPlugin

var _

var _

func (t *TestPlugin) Name() string {}

func (t *TestPlugin) Score(ctx context.Context, state *framework.CycleState, p *v1.Pod, nodeName string) (int64, *framework.Status) {}

func (t *TestPlugin) ScoreExtensions() framework.ScoreExtensions {}

func (t *TestPlugin) Filter(ctx context.Context, state *framework.CycleState, pod *v1.Pod, nodeInfo *framework.NodeInfo) *framework.Status {}

func nodeToStatusDiff(want, got *framework.NodeToStatus) string {}

func TestSchedulerMultipleProfilesScheduling(t *testing.T) {}

// TestSchedulerGuaranteeNonNilNodeInSchedulingCycle is for detecting potential panic on nil Node when iterating Nodes.
func TestSchedulerGuaranteeNonNilNodeInSchedulingCycle(t *testing.T) {}

func TestSchedulerScheduleOne(t *testing.T) {}

func TestSchedulerNoPhantomPodAfterExpire(t *testing.T) {}

func TestSchedulerNoPhantomPodAfterDelete(t *testing.T) {}

func TestSchedulerFailedSchedulingReasons(t *testing.T) {}

func TestSchedulerWithVolumeBinding(t *testing.T) {}

func TestSchedulerBinding(t *testing.T) {}

func TestUpdatePod(t *testing.T) {}

func Test_SelectHost(t *testing.T) {}

func TestFindNodesThatPassExtenders(t *testing.T) {}

func TestSchedulerSchedulePod(t *testing.T) {}

func TestFindFitAllError(t *testing.T) {}

func TestFindFitSomeError(t *testing.T) {}

func TestFindFitPredicateCallCounts(t *testing.T) {}

// The point of this test is to show that you:
//   - get the same priority for a zero-request pod as for a pod with the defaults requests,
//     both when the zero-request pod is already on the node and when the zero-request pod
//     is the one being scheduled.
//   - don't get the same score no matter what we schedule.
func TestZeroRequest(t *testing.T) {}

func Test_prioritizeNodes(t *testing.T) {}

var (
	lowPriority
	midPriority
	highPriority
)

func TestNumFeasibleNodesToFind(t *testing.T) {}

func TestFairEvaluationForNodes(t *testing.T) {}

func TestPreferNominatedNodeFilterCallCounts(t *testing.T) {}

func podWithID(id, desiredHost string) *v1.Pod {}

func deletingPod(id string) *v1.Pod {}

func podWithPort(id, desiredHost string, port int) *v1.Pod {}

func podWithResources(id, desiredHost string, limits v1.ResourceList, requests v1.ResourceList) *v1.Pod {}

func makeNodeList(nodeNames []string) []*v1.Node {}

// makeScheduler makes a simple Scheduler for testing.
func makeScheduler(ctx context.Context, nodes []*v1.Node) *Scheduler {}

func makeNode(node string, milliCPU, memory int64, images ...v1.ContainerImage) *v1.Node {}

// queuedPodStore: pods queued before processing.
// cache: scheduler cache that might contain assumed pods.
func setupTestSchedulerWithOnePodOnNode(ctx context.Context, t *testing.T, queuedPodStore *clientcache.FIFO, scache internalcache.Cache,
	pod *v1.Pod, node *v1.Node, fns ...tf.RegisterPluginFunc) (*Scheduler, chan *v1.Binding, chan error) {}

// queuedPodStore: pods queued before processing.
// scache: scheduler cache that might contain assumed pods.
func setupTestScheduler(ctx context.Context, t *testing.T, queuedPodStore *clientcache.FIFO, cache internalcache.Cache, informerFactory informers.SharedInformerFactory, broadcaster events.EventBroadcaster, fns ...tf.RegisterPluginFunc) (*Scheduler, chan *v1.Binding, chan error) {}

func setupTestSchedulerWithVolumeBinding(ctx context.Context, t *testing.T, volumeBinder volumebinding.SchedulerVolumeBinder, broadcaster events.EventBroadcaster) (*Scheduler, chan *v1.Binding, chan error) {}

// This is a workaround because golint complains that errors cannot
// end with punctuation.  However, the real predicate error message does
// end with a period.
func makePredicateError(failReason string) error {}

func mustNewPodInfo(t *testing.T, pod *v1.Pod) *framework.PodInfo {}