From d2f67b42b74fb178cf5e1cb58426eac8de5d76ae Mon Sep 17 00:00:00 2001 From: Carlos Eduardo Arango Gutierrez Date: Thu, 24 Mar 2022 07:56:10 -0400 Subject: [PATCH] Fix typos under pkg/scheduler ./scheduler/framework/plugins/noderesources/most_allocated_test.go:227: negtive ==> negative ./scheduler/framework/plugins/noderesources/most_allocated_test.go:228: negtive ==> negative ./scheduler/framework/plugins/volumebinding/binder.go:402: everytime ==> every time ./scheduler/framework/preemption/preemption_test.go:67: staus ==> status ./scheduler/framework/runtime/framework_test.go:1252: followings ==> following ./scheduler/internal/cache/cache_test.go:932: datas ==> data ./scheduler/internal/cache/node_tree_test.go:471: unknow ==> unknown ./scheduler/internal/queue/scheduling_queue_test.go:442: actived ==> activated ./scheduler/internal/queue/scheduling_queue_test.go:2209: covert ==> convert Signed-off-by: Carlos Eduardo Arango Gutierrez --- .../framework/plugins/noderesources/most_allocated_test.go | 4 ++-- pkg/scheduler/framework/plugins/volumebinding/binder.go | 2 +- pkg/scheduler/framework/preemption/preemption_test.go | 2 +- pkg/scheduler/framework/runtime/framework_test.go | 2 +- pkg/scheduler/internal/cache/cache_test.go | 2 +- pkg/scheduler/internal/cache/node_tree_test.go | 2 +- pkg/scheduler/internal/queue/scheduling_queue_test.go | 4 ++-- 7 files changed, 9 insertions(+), 9 deletions(-) diff --git a/pkg/scheduler/framework/plugins/noderesources/most_allocated_test.go b/pkg/scheduler/framework/plugins/noderesources/most_allocated_test.go index b5e9b14cdd5..5abd80d7211 100644 --- a/pkg/scheduler/framework/plugins/noderesources/most_allocated_test.go +++ b/pkg/scheduler/framework/plugins/noderesources/most_allocated_test.go @@ -224,8 +224,8 @@ func TestMostAllocatedScoringStrategy(t *testing.T) { resources: defaultResources, }, { - // resource with negtive weight is not allowed - name: "resource with negtive weight", + // resource with negative weight is not allowed + name: "resource with negative weight", requestedPod: st.MakePod(). Req(map[v1.ResourceName]string{"cpu": "1000", "memory": "2000"}). Req(map[v1.ResourceName]string{"cpu": "2000", "memory": "3000"}). diff --git a/pkg/scheduler/framework/plugins/volumebinding/binder.go b/pkg/scheduler/framework/plugins/volumebinding/binder.go index b55aaf6c80e..14d6a85e8d3 100644 --- a/pkg/scheduler/framework/plugins/volumebinding/binder.go +++ b/pkg/scheduler/framework/plugins/volumebinding/binder.go @@ -390,7 +390,7 @@ func (b *volumeBinder) AssumePodVolumes(assumedPod *v1.Pod, nodeName string, pod b.revertAssumedPVs(newBindings) return false, err } - // TODO: can we assume everytime? + // TODO: can we assume every time? if dirty { err = b.pvCache.Assume(newPV) if err != nil { diff --git a/pkg/scheduler/framework/preemption/preemption_test.go b/pkg/scheduler/framework/preemption/preemption_test.go index 3139995329a..14ecc9d8785 100644 --- a/pkg/scheduler/framework/preemption/preemption_test.go +++ b/pkg/scheduler/framework/preemption/preemption_test.go @@ -64,7 +64,7 @@ type FakePostFilterPlugin struct { func (pl *FakePostFilterPlugin) SelectVictimsOnNode( ctx context.Context, state *framework.CycleState, pod *v1.Pod, - nodeInfo *framework.NodeInfo, pdbs []*policy.PodDisruptionBudget) (victims []*v1.Pod, numViolatingVictim int, staus *framework.Status) { + nodeInfo *framework.NodeInfo, pdbs []*policy.PodDisruptionBudget) (victims []*v1.Pod, numViolatingVictim int, status *framework.Status) { return append(victims, nodeInfo.Pods[0].Pod), pl.numViolatingVictim, nil } diff --git a/pkg/scheduler/framework/runtime/framework_test.go b/pkg/scheduler/framework/runtime/framework_test.go index 823174bc70c..0d3ab4c8a39 100644 --- a/pkg/scheduler/framework/runtime/framework_test.go +++ b/pkg/scheduler/framework/runtime/framework_test.go @@ -1286,7 +1286,7 @@ func TestFilterPlugins(t *testing.T) { "TestPlugin": framework.NewStatus(framework.UnschedulableAndUnresolvable, "injected filter status").WithFailedPlugin("TestPlugin"), }, }, - // followings tests cover multiple-plugins scenarios + // following tests cover multiple-plugins scenarios { name: "ErrorAndErrorFilters", plugins: []*TestPlugin{ diff --git a/pkg/scheduler/internal/cache/cache_test.go b/pkg/scheduler/internal/cache/cache_test.go index 9e8c890f3b7..1c80bd31ffd 100644 --- a/pkg/scheduler/internal/cache/cache_test.go +++ b/pkg/scheduler/internal/cache/cache_test.go @@ -929,7 +929,7 @@ func buildNodeInfo(node *v1.Node, pods []*v1.Pod) *framework.NodeInfo { // TestNodeOperators tests node operations of cache, including add, update // and remove. func TestNodeOperators(t *testing.T) { - // Test datas + // Test data nodeName := "test-node" cpu1 := resource.MustParse("1000m") mem100m := resource.MustParse("100m") diff --git a/pkg/scheduler/internal/cache/node_tree_test.go b/pkg/scheduler/internal/cache/node_tree_test.go index 4a4abe9e6c9..a316a0ef4cf 100644 --- a/pkg/scheduler/internal/cache/node_tree_test.go +++ b/pkg/scheduler/internal/cache/node_tree_test.go @@ -468,7 +468,7 @@ func TestNodeTreeMultiOperations(t *testing.T) { removeIndex++ } default: - t.Errorf("unknow operation: %v", op) + t.Errorf("unknown operation: %v", op) } } output, err := nt.list() diff --git a/pkg/scheduler/internal/queue/scheduling_queue_test.go b/pkg/scheduler/internal/queue/scheduling_queue_test.go index 3bc4fb80b32..c07c477e3e7 100644 --- a/pkg/scheduler/internal/queue/scheduling_queue_test.go +++ b/pkg/scheduler/internal/queue/scheduling_queue_test.go @@ -439,7 +439,7 @@ func TestPriorityQueue_Activate(t *testing.T) { name: "pod already in activeQ", qPodInfoInActiveQ: []*framework.QueuedPodInfo{{PodInfo: highPriNominatedPodInfo}}, qPodInfoToActivate: &framework.QueuedPodInfo{PodInfo: highPriNominatedPodInfo}, - want: []*framework.QueuedPodInfo{{PodInfo: highPriNominatedPodInfo}}, // 1 already actived + want: []*framework.QueuedPodInfo{{PodInfo: highPriNominatedPodInfo}}, // 1 already active }, { name: "pod not in unschedulableQ/podBackoffQ", @@ -2206,7 +2206,7 @@ func TestMoveAllToActiveOrBackoffQueue_PreEnqueueChecks(t *testing.T) { } queuedPodInfo, ok := obj.(*framework.QueuedPodInfo) if !ok { - t.Fatalf("Fail to covert popped obj (type %T) to *framework.QueuedPodInfo", obj) + t.Fatalf("Fail to convert popped obj (type %T) to *framework.QueuedPodInfo", obj) } got = append(got, queuedPodInfo.Pod.Name) }