client/restclient/fake move to client-go

This commit is contained in:
deads2k
2017-01-24 10:00:24 -05:00
parent 3eeecb0848
commit 502bfdf944
54 changed files with 170 additions and 229 deletions

View File

@@ -37,6 +37,7 @@ import (
"k8s.io/apimachinery/pkg/runtime/serializer/streaming"
utilerrors "k8s.io/apimachinery/pkg/util/errors"
"k8s.io/apimachinery/pkg/watch"
"k8s.io/client-go/rest/fake"
restclientwatch "k8s.io/client-go/rest/watch"
utiltesting "k8s.io/client-go/util/testing"
"k8s.io/kubernetes/pkg/api"
@@ -44,7 +45,6 @@ import (
"k8s.io/kubernetes/pkg/api/testapi"
apitesting "k8s.io/kubernetes/pkg/api/testing"
"k8s.io/kubernetes/pkg/api/v1"
"k8s.io/kubernetes/pkg/client/restclient/fake"
)
func stringBody(body string) io.ReadCloser {
@@ -70,6 +70,7 @@ func fakeClient() ClientMapper {
func fakeClientWith(testName string, t *testing.T, data map[string]string) ClientMapper {
return ClientMapperFunc(func(*meta.RESTMapping) (RESTClient, error) {
return &fake.RESTClient{
APIRegistry: api.Registry,
NegotiatedSerializer: testapi.Default.NegotiatedSerializer(),
Client: fake.CreateHTTPClient(func(req *http.Request) (*http.Response, error) {
p := req.URL.Path