@@ -419,6 +419,11 @@ func TestLoadConfig(t *testing.T) {
419419 configText : successWithNoProfileHandlersText ,
420420 wantErr : false ,
421421 },
422+ {
423+ name : "successPickerWeightUnsetScorerText" ,
424+ configText : successPickerWeightUnsetScorerText ,
425+ wantErr : false ,
426+ },
422427 {
423428 name : "errorBadYaml" ,
424429 configText : errorBadYamlText ,
@@ -472,7 +477,7 @@ func TestLoadConfig(t *testing.T) {
472477 t .Errorf ("LoadConfigPhaseOne returned an unexpected error. error %v" , err )
473478 }
474479 t .Logf ("error was %s" , err )
475- } else if test . wantErr {
480+ } else {
476481 handle := utils .NewTestHandle (context .Background ())
477482 _ , err = LoadConfigPhaseTwo (rawConfig , handle , logger )
478483 if err != nil {
@@ -945,6 +950,22 @@ schedulingProfiles:
945950 - pluginRef: maxScore
946951`
947952
953+ // success with picker and unset weight scorer
954+ //
955+ //nolint:dupword
956+ const successPickerWeightUnsetScorerText = `
957+ apiVersion: inference.networking.x-k8s.io/v1alpha1
958+ kind: EndpointPickerConfig
959+ plugins:
960+ - type: random-picker
961+ - type: prefix-cache-scorer
962+ schedulingProfiles:
963+ - name: default
964+ plugins:
965+ - pluginRef: random-picker
966+ - pluginRef: prefix-cache-scorer
967+ `
968+
948969// invalid parameter configuration for plugin (string passed, in expected)
949970//
950971//nolint:dupword
0 commit comments