mirror of
https://github.com/kubernetes/client-go.git
synced 2025-09-04 16:40:21 +00:00
dynamic: The dynamic client no longer needs a special cased watch
By correctly handling content type negotiation, we can avoid the need for a special version of watch and use the same code path as typed clients. Kubernetes-commit: 3f94f80b0a79293e54d7080aaf7a64d7df8b1d4a
This commit is contained in:
committed by
Kubernetes Publisher
parent
4b146a95cd
commit
881cd219a8
@@ -537,6 +537,8 @@ func TestWatch(t *testing.T) {
|
||||
t.Errorf("Watch(%q) got query %s. wanted %s", tc.name, r.URL.RawQuery, tc.query)
|
||||
}
|
||||
|
||||
w.Header().Set("Content-Type", "application/json")
|
||||
|
||||
enc := restclientwatch.NewEncoder(streaming.NewEncoder(w, unstructured.UnstructuredJSONScheme), unstructured.UnstructuredJSONScheme)
|
||||
for _, e := range tc.events {
|
||||
enc.Encode(&e)
|
||||
|
Reference in New Issue
Block a user