Merge pull request #27192 from smarterclayton/signature_change

Automatic merge from submit-queue

Remove EncodeToStream(..., []unversioned.GroupVersion)

Was not being used. Is a signature change and is necessary for post 1.3 work on Templates and other objects that nest objects.

Extracted from #26044
This commit is contained in:
k8s-merge-robot
2016-06-19 16:13:07 -07:00
committed by GitHub
19 changed files with 108 additions and 101 deletions

View File

@@ -253,8 +253,8 @@ func (dynamicCodec) Decode(data []byte, gvk *unversioned.GroupVersionKind, obj r
return obj, gvk, nil
}
func (dynamicCodec) EncodeToStream(obj runtime.Object, w io.Writer, overrides ...unversioned.GroupVersion) error {
return runtime.UnstructuredJSONScheme.EncodeToStream(obj, w, overrides...)
func (dynamicCodec) Encode(obj runtime.Object, w io.Writer) error {
return runtime.UnstructuredJSONScheme.Encode(obj, w)
}
// paramaterCodec is a codec converts an API object to query

View File

@@ -235,7 +235,7 @@ func TestDelete(t *testing.T) {
}
w.Header().Set("Content-Type", runtime.ContentTypeJSON)
runtime.UnstructuredJSONScheme.EncodeToStream(statusOK, w)
runtime.UnstructuredJSONScheme.Encode(statusOK, w)
})
if err != nil {
t.Errorf("unexpected error when creating client: %v", err)
@@ -284,7 +284,7 @@ func TestDeleteCollection(t *testing.T) {
}
w.Header().Set("Content-Type", runtime.ContentTypeJSON)
runtime.UnstructuredJSONScheme.EncodeToStream(statusOK, w)
runtime.UnstructuredJSONScheme.Encode(statusOK, w)
})
if err != nil {
t.Errorf("unexpected error when creating client: %v", err)