Merge pull request #121632 from kerthcet/fix/runscoreplugins
Fix panic when process RunScorePlugins for cap out of range
This commit is contained in:
@@ -1385,6 +1385,22 @@ func TestRunScorePlugins(t *testing.T) {
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "skipped prescore plugin number greater than the number of score plugins",
|
||||
plugins: buildScoreConfigDefaultWeights(scorePlugin1),
|
||||
pluginConfigs: nil,
|
||||
skippedPlugins: sets.New(scorePlugin1, "score-plugin-unknown"),
|
||||
want: []framework.NodePluginScores{
|
||||
{
|
||||
Name: "node1",
|
||||
Scores: []framework.PluginScore{},
|
||||
},
|
||||
{
|
||||
Name: "node2",
|
||||
Scores: []framework.PluginScore{},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
for _, tt := range tests {
|
||||
|
Reference in New Issue
Block a user