mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-04 15:05:20 +00:00
client/restclient/fake move to client-go
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user