Change:
We are lacking tests that exercise a full scheduler setup, all the way from config files and command line flags to what plugins end up instantiated. The best candidate for this is , but this needs tweaking. Basically, we need to split in two functions: and the already existing (which already has a test). Maybe we can have the test in as well. Configuration can be written to files just like we do in and args can be passed as parameters. /sig scheduling /help /kind cleanup
/assign I'm interested in e2e test. I can take it, too.
Just to avoid too much burden on you, let's leave this open to other contributors. WDYT?
Sure, I will unassign it.
/assign /remove-help
I have a question about what shoud be checked for the instantiated plugins, the name and weight or the args of the plugins?
Just names and weights to start. But args could be tested once is fixed
/reopen Could you add some tests for , and related?
Reopened this issue. <detailsIn response to : /reopen Instructions for interacting with me using PR comments are available . If you have questions or suggestions related to my behavior, please file an issue against the repository. </details
/cc
Sure
/reopen was finalized, so we can add one test to exercise plugin config
Reopened this issue. <detailsIn response to : /reopen Instructions for interacting with me using PR comments are available . If you have questions or suggestions related to my behavior, please file an issue against the repository. </details
Does that mean we can use to get the Plugin config? But we don't have direct acess to the unless we add this argument to
that's a good point. Maybe we can add an unexported package variable to do so.
can you do that?
Issues go stale after 90d of inactivity. Mark the issue as fresh with . Stale issues rot after an additional 30d of inactivity and eventually close. If this issue is safe to close now please do so with . Send feedback to sig-testing, kubernetes/test-infra and/or . /lifecycle stale
Stale issues rot after 30d of inactivity. Mark the issue as fresh with . Rotten issues close after an additional 30d of inactivity. If this issue is safe to close now please do so with . Send feedback to sig-testing, kubernetes/test-infra and/or . /lifecycle rotten
Rotten issues close after 30d of inactivity. Reopen the issue with . Mark the issue as fresh with . Send feedback to sig-testing, kubernetes/test-infra and/or . /close
Closing this issue. <detailsIn response to : Rotten issues close after 30d of inactivity. Reopen the issue with . Mark the issue as fresh with . /close Instructions for interacting with me using PR comments are available . If you have questions or suggestions related to my behavior, please file an issue against the repository. </details

Discussion:
t.Fatal(err) } <ins> // policy config file policyConfigFile := filepath.Join(tmpDir, "policy-config.yaml") if err := ioutil.WriteFile(policyConfigFile, []byte(`{ "kind": "Policy", "apiVersion": "v1", "predicates": [ {"name": "MatchInterPodAffinity"} ],"priorities": [ {"name": "InterPodAffinityPriority",   "weight": 2} ]}`), os.FileMode(0600)); err != nil { t.Fatal(err) } </ins> defaultPlugins := map[string][]kubeschedulerconfig.Plugin{ "QueueSortPlugin": { {Name: "PrioritySort"},

"my-scheduler": defaultPlugins, }, }, <ins> { name: "default algorithm provider", flags: []string{ "--kubeconfig", configKubeconfig, "--algorithm-provider", "DefaultProvider", }, wantPlugins: map[string]map[string][]kubeschedulerconfig.Plugin{ "default-scheduler": defaultPlugins, }, }, { name: "cluster autoscaler provider", flags: []string{ "--kubeconfig", configKubeconfig, "--algorithm-provider", "ClusterAutoscalerProvider", }, wantPlugins: map[string]map[string][]kubeschedulerconfig.Plugin{ "default-scheduler": { "QueueSortPlugin": { {Name: "PrioritySort"}, }, "PreFilterPlugin": { {Name: "NodeResourcesFit"}, {Name: "NodePorts"}, {Name: "InterPodAffinity"}, {Name: "PodTopologySpread"}, }, "FilterPlugin": { {Name: "NodeUnschedulable"}, {Name: "NodeResourcesFit"}, {Name: "NodeName"}, {Name: "NodePorts"}, {Name: "NodeAffinity"}, {Name: "VolumeRestrictions"}, {Name: "TaintToleration"}, {Name: "EBSLimits"}, {Name: "GCEPDLimits"}, {Name: "NodeVolumeLimits"}, {Name: "AzureDiskLimits"}, {Name: "VolumeBinding"}, {Name: "VolumeZone"}, {Name: "InterPodAffinity"}, {Name: "PodTopologySpread"}, }, "PreScorePlugin": { {Name: "InterPodAffinity"}, {Name: "DefaultPodTopologySpread"}, {Name: "TaintToleration"}, {Name: "PodTopologySpread"}, }, "ScorePlugin": { {Name: "NodeResourcesBalancedAllocation", Weight: 1}, {Name: "ImageLocality", Weight: 1}, {Name: "InterPodAffinity", Weight: 1}, {Name: "NodeResourcesMostAllocated", Weight: 1}, {Name: "NodeAffinity", Weight: 1}, {Name: "NodePreferAvoidPods", Weight: 10000}, {Name: "DefaultPodTopologySpread", Weight: 1}, {Name: "TaintToleration", Weight: 1}, {Name: "PodTopologySpread", Weight: 1}, }, "BindPlugin": {{Name: "DefaultBinder"}}, }, }, }, { name: "policy config file", flags: []string{ "--kubeconfig", configKubeconfig, "--policy-config-file", policyConfigFile, }, wantPlugins: map[string]map[string][]kubeschedulerconfig.Plugin{ "default-scheduler": { "QueueSortPlugin": {{Name: "PrioritySort"}}, "PreFilterPlugin": { {Name: "InterPodAffinity"}, }, "FilterPlugin": { {Name: "NodeUnschedulable"}, {Name: "TaintToleration"}, {Name: "InterPodAffinity"}, }, "PreScorePlugin": { {Name: "InterPodAffinity"}, }, "ScorePlugin": { {Name: "InterPodAffinity", Weight: 2}, }, "BindPlugin": {{Name: "DefaultBinder"}}, }, }, }, </ins> } for _, tc := range testcases {