mirror of
https://github.com/optim-enterprises-bv/kubernetes.git
synced 2025-11-02 03:08:15 +00:00
Expose NodeInfo to Score plugins
Co-authored-by: shenxin <rougang.hrg@alibaba-inc.com> Signed-off-by: saintube <saintube@foxmail.com>
This commit is contained in:
@@ -375,7 +375,11 @@ func TestMostAllocatedScoringStrategy(t *testing.T) {
|
||||
|
||||
var gotScores framework.NodeScoreList
|
||||
for _, n := range test.nodes {
|
||||
score, status := p.(framework.ScorePlugin).Score(ctx, state, test.requestedPod, n.Name)
|
||||
nodeInfo, err := snapshot.Get(n.Name)
|
||||
if err != nil {
|
||||
t.Errorf("failed to get node %q from snapshot: %v", n.Name, err)
|
||||
}
|
||||
score, status := p.(framework.ScorePlugin).Score(ctx, state, test.requestedPod, nodeInfo)
|
||||
if status.Code() != test.wantStatusCode {
|
||||
t.Errorf("unexpected status code, want: %v, got: %v", test.wantStatusCode, status.Code())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user