Merge pull request #121954 from AxeZhan/nodeInfo

Sched framework: expose NodeInfo in all functions of PluginsRunner interface
This commit is contained in:
Kubernetes Prow Robot
2023-12-15 18:33:00 +01:00
committed by GitHub
31 changed files with 185 additions and 148 deletions

View File

@@ -35,6 +35,7 @@ import (
"k8s.io/kubernetes/pkg/scheduler/framework/runtime"
"k8s.io/kubernetes/pkg/scheduler/internal/cache"
st "k8s.io/kubernetes/pkg/scheduler/testing"
tf "k8s.io/kubernetes/pkg/scheduler/testing/framework"
)
var (
@@ -952,7 +953,7 @@ func TestFitScore(t *testing.T) {
var gotPriorities framework.NodeScoreList
for _, n := range test.nodes {
if test.runPreScore {
status := p.(framework.PreScorePlugin).PreScore(ctx, state, test.requestedPod, test.nodes)
status := p.(framework.PreScorePlugin).PreScore(ctx, state, test.requestedPod, tf.BuildNodeInfos(test.nodes))
if !status.IsSuccess() {
t.Errorf("PreScore is expected to return success, but didn't. Got status: %v", status)
}