Skip to content

Commit

Permalink
Merge pull request #329 from Huang-Wei/miss-capacityscheduling-test
Browse files Browse the repository at this point in the history
missing capacitySchedulingConfig config test
  • Loading branch information
k8s-ci-robot authored Feb 7, 2022
2 parents 844e0d4 + e95c8b8 commit d4adbb9
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions cmd/scheduler/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ import (
"k8s.io/kubernetes/pkg/scheduler/apis/config"
"k8s.io/kubernetes/pkg/scheduler/apis/config/testing/defaults"

"sigs.k8s.io/scheduler-plugins/pkg/capacityscheduling"
"sigs.k8s.io/scheduler-plugins/pkg/coscheduling"
"sigs.k8s.io/scheduler-plugins/pkg/noderesources"
"sigs.k8s.io/scheduler-plugins/pkg/noderesourcetopology"
Expand Down Expand Up @@ -526,6 +527,28 @@ profiles:
},
},
},
{
name: "single profile config - Capacityscheduling",
flags: []string{"--config", capacitySchedulingConfigWithArgsFile},
registryOptions: []app.Option{app.WithPlugin(capacityscheduling.Name, capacityscheduling.New)},
wantPlugins: map[string]*config.Plugins{
"default-scheduler": {
QueueSort: defaults.PluginsV1beta2.QueueSort,
Bind: defaults.PluginsV1beta2.Bind,
PreFilter: config.PluginSet{
Enabled: append(defaults.PluginsV1beta2.PreFilter.Enabled, config.Plugin{Name: capacityscheduling.Name}),
},
Filter: defaults.PluginsV1beta2.Filter,
PostFilter: config.PluginSet{Enabled: []config.Plugin{{Name: capacityscheduling.Name}}},
PreScore: defaults.PluginsV1beta2.PreScore,
Score: defaults.PluginsV1beta2.Score,
Reserve: config.PluginSet{
Enabled: append(defaults.PluginsV1beta2.Reserve.Enabled, config.Plugin{Name: capacityscheduling.Name}),
},
PreBind: defaults.PluginsV1beta2.PreBind,
},
},
},
{
name: "single profile config - TargetLoadPacking with args",
flags: []string{"--config", targetLoadPackingConfigWithArgsFile},
Expand Down

0 comments on commit d4adbb9

Please sign in to comment.