Remove Configurator interface
The Configurator has been used as a holder for listers that tests need, which is not its purpose. By making the tests obtain listers from more appropriate places, such as informers, there is no need for various accessors to the Configurator. Also, FakeConfigurator is not being used anymore, so there's no need for an interface instead of a plain pointer. Signed-off-by: Aldo Culquicondor <acondor@google.com>
This commit is contained in:
@@ -31,7 +31,7 @@ import (
|
||||
// remove resources after finished.
|
||||
// Notes on rate limiter:
|
||||
// - client rate limit is set to 5000.
|
||||
func mustSetupScheduler() (factory.Configurator, util.ShutdownFunc) {
|
||||
func mustSetupScheduler() (*factory.ConfigFactoryArgs, util.ShutdownFunc) {
|
||||
apiURL, apiShutdown := util.StartApiserver()
|
||||
clientSet := clientset.NewForConfigOrDie(&restclient.Config{
|
||||
Host: apiURL,
|
||||
@@ -39,11 +39,11 @@ func mustSetupScheduler() (factory.Configurator, util.ShutdownFunc) {
|
||||
QPS: 5000.0,
|
||||
Burst: 5000,
|
||||
})
|
||||
schedulerConfig, schedulerShutdown := util.StartScheduler(clientSet)
|
||||
schedulerConfigArgs, schedulerShutdown := util.StartScheduler(clientSet)
|
||||
|
||||
shutdownFunc := func() {
|
||||
schedulerShutdown()
|
||||
apiShutdown()
|
||||
}
|
||||
return schedulerConfig, shutdownFunc
|
||||
return schedulerConfigArgs, shutdownFunc
|
||||
}
|
||||
|
Reference in New Issue
Block a user