mirror of
https://github.com/kubernetes/client-go.git
synced 2025-09-25 06:24:59 +00:00
published by bot
(https://github.com/kubernetes/contrib/tree/master/mungegithub) copied from https://github.com/kubernetes/kubernetes.git, branch master, last commit is ac857a5adefb894a8049ebf5295cabb719c9648d
This commit is contained in:
@@ -28,7 +28,7 @@ import (
|
||||
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
"k8s.io/apimachinery/pkg/runtime/schema"
|
||||
"k8s.io/client-go/pkg/api"
|
||||
"k8s.io/apimachinery/pkg/types"
|
||||
"k8s.io/client-go/pkg/util/flowcontrol"
|
||||
)
|
||||
|
||||
@@ -45,7 +45,7 @@ type Interface interface {
|
||||
Verb(verb string) *Request
|
||||
Post() *Request
|
||||
Put() *Request
|
||||
Patch(pt api.PatchType) *Request
|
||||
Patch(pt types.PatchType) *Request
|
||||
Get() *Request
|
||||
Delete() *Request
|
||||
APIVersion() schema.GroupVersion
|
||||
@@ -238,7 +238,7 @@ func (c *RESTClient) Put() *Request {
|
||||
}
|
||||
|
||||
// Patch begins a PATCH request. Short for c.Verb("Patch").
|
||||
func (c *RESTClient) Patch(pt api.PatchType) *Request {
|
||||
func (c *RESTClient) Patch(pt types.PatchType) *Request {
|
||||
return c.Verb("PATCH").SetHeader("Content-Type", string(pt))
|
||||
}
|
||||
|
||||
|
@@ -31,6 +31,7 @@ import (
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
"k8s.io/apimachinery/pkg/runtime/schema"
|
||||
"k8s.io/apimachinery/pkg/types"
|
||||
"k8s.io/apimachinery/pkg/util/diff"
|
||||
"k8s.io/client-go/pkg/api"
|
||||
"k8s.io/client-go/pkg/api/testapi"
|
||||
@@ -271,7 +272,7 @@ func TestHttpMethods(t *testing.T) {
|
||||
t.Errorf("Delete : Object returned should not be nil")
|
||||
}
|
||||
|
||||
request = c.Patch(api.JSONPatchType)
|
||||
request = c.Patch(types.JSONPatchType)
|
||||
if request == nil {
|
||||
t.Errorf("Patch : Object returned should not be nil")
|
||||
}
|
||||
|
@@ -24,6 +24,7 @@ import (
|
||||
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
"k8s.io/apimachinery/pkg/runtime/schema"
|
||||
"k8s.io/apimachinery/pkg/types"
|
||||
"k8s.io/client-go/pkg/api"
|
||||
"k8s.io/client-go/pkg/api/testapi"
|
||||
"k8s.io/client-go/pkg/util/flowcontrol"
|
||||
@@ -61,7 +62,7 @@ func (c *RESTClient) Put() *rest.Request {
|
||||
return c.request("PUT")
|
||||
}
|
||||
|
||||
func (c *RESTClient) Patch(_ api.PatchType) *rest.Request {
|
||||
func (c *RESTClient) Patch(_ types.PatchType) *rest.Request {
|
||||
return c.request("PATCH")
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user