replacing handwritten client in several controllers

This commit is contained in:
Chao Xu
2016-01-14 21:00:58 -08:00
parent 55f039fd53
commit c72d234bbf
64 changed files with 648 additions and 531 deletions

View File

@@ -30,6 +30,7 @@ import (
"k8s.io/kubernetes/pkg/api/testapi"
"k8s.io/kubernetes/pkg/api/unversioned"
"k8s.io/kubernetes/pkg/client/cache"
clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_1"
"k8s.io/kubernetes/pkg/client/record"
client "k8s.io/kubernetes/pkg/client/unversioned"
"k8s.io/kubernetes/pkg/runtime"
@@ -192,10 +193,10 @@ func TestCreatePods(t *testing.T) {
testServer := httptest.NewServer(&fakeHandler)
// TODO: Uncomment when fix #19254
// defer testServer.Close()
client := client.NewOrDie(&client.Config{Host: testServer.URL, ContentConfig: client.ContentConfig{GroupVersion: testapi.Default.GroupVersion()}})
clientset := clientset.NewForConfigOrDie(&client.Config{Host: testServer.URL, ContentConfig: client.ContentConfig{GroupVersion: testapi.Default.GroupVersion()}})
podControl := RealPodControl{
KubeClient: client,
KubeClient: clientset,
Recorder: &record.FakeRecorder{},
}