Migrate api.Registry to testapi.Groups in tests.

This commit is contained in:
Jacob Simpson
2017-07-10 18:10:34 -07:00
parent a765b8cfca
commit 8bcbbd4d08
49 changed files with 113 additions and 98 deletions

View File

@@ -19,6 +19,7 @@ go_library(
],
deps = [
"//pkg/api:go_default_library",
"//pkg/api/testapi:go_default_library",
"//plugin/pkg/scheduler:go_default_library",
"//plugin/pkg/scheduler/algorithmprovider:go_default_library",
"//plugin/pkg/scheduler/factory:go_default_library",

View File

@@ -29,6 +29,7 @@ import (
restclient "k8s.io/client-go/rest"
"k8s.io/client-go/tools/record"
"k8s.io/kubernetes/pkg/api"
"k8s.io/kubernetes/pkg/api/testapi"
"k8s.io/kubernetes/plugin/pkg/scheduler"
_ "k8s.io/kubernetes/plugin/pkg/scheduler/algorithmprovider"
"k8s.io/kubernetes/plugin/pkg/scheduler/factory"
@@ -54,7 +55,7 @@ func mustSetupScheduler() (schedulerConfigurator scheduler.Configurator, destroy
clientSet := clientset.NewForConfigOrDie(&restclient.Config{
Host: s.URL,
ContentConfig: restclient.ContentConfig{GroupVersion: &api.Registry.GroupOrDie(v1.GroupName).GroupVersion},
ContentConfig: restclient.ContentConfig{GroupVersion: testapi.Groups[v1.GroupName].GroupVersion()},
QPS: 5000.0,
Burst: 5000,
})