Sched framework: expose NodeInfo in all functions of PluginsRunner interface

This commit is contained in:
AxeZhan
2023-11-18 18:21:58 +08:00
parent ae185414f4
commit be48c93689
31 changed files with 185 additions and 148 deletions

View File

@@ -30,6 +30,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"
)
// TODO: Add test case for RequiredDuringSchedulingRequiredDuringExecution after it's implemented.
@@ -1148,7 +1149,7 @@ func TestNodeAffinityPriority(t *testing.T) {
}
var status *framework.Status
if test.runPreScore {
status = p.(framework.PreScorePlugin).PreScore(ctx, state, test.pod, test.nodes)
status = p.(framework.PreScorePlugin).PreScore(ctx, state, test.pod, tf.BuildNodeInfos(test.nodes))
if !status.IsSuccess() {
t.Errorf("unexpected error: %v", status)
}