Revert "support patch list of primitives"
This reverts commit 34891ad9f6
.
This commit is contained in:
@@ -34,12 +34,6 @@ func TestPatchObject(t *testing.T) {
|
||||
NegotiatedSerializer: ns,
|
||||
Client: fake.CreateHTTPClient(func(req *http.Request) (*http.Response, error) {
|
||||
switch p, m := req.URL.Path, req.Method; {
|
||||
case p == "/version" && m == "GET":
|
||||
resp, err := genResponseWithJsonEncodedBody(serverVersion_1_5_0)
|
||||
if err != nil {
|
||||
t.Fatalf("error: failed to generate server version response: %#v\n", serverVersion_1_5_0)
|
||||
}
|
||||
return resp, nil
|
||||
case p == "/namespaces/test/services/frontend" && (m == "PATCH" || m == "GET"):
|
||||
return &http.Response{StatusCode: 200, Header: defaultHeader(), Body: objBody(codec, &svc.Items[0])}, nil
|
||||
default:
|
||||
@@ -49,7 +43,6 @@ func TestPatchObject(t *testing.T) {
|
||||
}),
|
||||
}
|
||||
tf.Namespace = "test"
|
||||
tf.ClientConfig = defaultClientConfig()
|
||||
buf := bytes.NewBuffer([]byte{})
|
||||
|
||||
cmd := NewCmdPatch(f, buf)
|
||||
@@ -73,12 +66,6 @@ func TestPatchObjectFromFile(t *testing.T) {
|
||||
NegotiatedSerializer: ns,
|
||||
Client: fake.CreateHTTPClient(func(req *http.Request) (*http.Response, error) {
|
||||
switch p, m := req.URL.Path, req.Method; {
|
||||
case p == "/version" && m == "GET":
|
||||
resp, err := genResponseWithJsonEncodedBody(serverVersion_1_5_0)
|
||||
if err != nil {
|
||||
t.Fatalf("error: failed to generate server version response: %#v\n", serverVersion_1_5_0)
|
||||
}
|
||||
return resp, nil
|
||||
case p == "/namespaces/test/services/frontend" && (m == "PATCH" || m == "GET"):
|
||||
return &http.Response{StatusCode: 200, Header: defaultHeader(), Body: objBody(codec, &svc.Items[0])}, nil
|
||||
default:
|
||||
@@ -88,7 +75,6 @@ func TestPatchObjectFromFile(t *testing.T) {
|
||||
}),
|
||||
}
|
||||
tf.Namespace = "test"
|
||||
tf.ClientConfig = defaultClientConfig()
|
||||
buf := bytes.NewBuffer([]byte{})
|
||||
|
||||
cmd := NewCmdPatch(f, buf)
|
||||
|
Reference in New Issue
Block a user