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

@@ -31,6 +31,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"
)
func TestNodeResourcesBalancedAllocation(t *testing.T) {
@@ -393,7 +394,7 @@ func TestNodeResourcesBalancedAllocation(t *testing.T) {
state := framework.NewCycleState()
for i := range test.nodes {
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("PreScore is expected to return success, but didn't. Got status: %v", status)
}