Disable default paging in list watches

For 1.8 this will be off by default. In 1.9 it will be on by default.
Add tests and rename some fields to use the `chunking` terminology.

Note that the pager may be used for other things besides chunking.
This commit is contained in:
Clayton Coleman
2017-09-03 15:04:54 -04:00
parent 5f184c56b3
commit 8b571bb63b
6 changed files with 237 additions and 8 deletions

View File

@@ -104,7 +104,7 @@ func TestListWatchesCanList(t *testing.T) {
defer server.Close()
client := clientset.NewForConfigOrDie(&restclient.Config{Host: server.URL, ContentConfig: restclient.ContentConfig{GroupVersion: &api.Registry.GroupOrDie(v1.GroupName).GroupVersion}})
lw := NewListWatchFromClient(client.Core().RESTClient(), item.resource, item.namespace, item.fieldSelector)
lw.DisablePaging = true
lw.DisableChunking = true
// This test merely tests that the correct request is made.
lw.List(metav1.ListOptions{})
handler.ValidateRequest(t, item.location, "GET", nil)