From 73aa0cc19214e2b91ee18381685477b76cbcd020 Mon Sep 17 00:00:00 2001 From: derekwaynecarr Date: Thu, 12 Feb 2015 11:25:33 -0500 Subject: [PATCH] Add a unit test to exercise watch --- pkg/client/namespaces_test.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/pkg/client/namespaces_test.go b/pkg/client/namespaces_test.go index c70c2f369bd..6bc3dfe5291 100644 --- a/pkg/client/namespaces_test.go +++ b/pkg/client/namespaces_test.go @@ -17,6 +17,7 @@ limitations under the License. package client import ( + "net/url" "testing" "github.com/GoogleCloudPlatform/kubernetes/pkg/api" @@ -132,3 +133,12 @@ func TestNamespaceDelete(t *testing.T) { err := c.Setup().Namespaces().Delete("foo") c.Validate(t, nil, err) } + +func TestNamespaceWatch(t *testing.T) { + c := &testClient{ + Request: testRequest{Method: "GET", Path: "/watch/namespaces", Query: url.Values{"resourceVersion": []string{}}}, + Response: Response{StatusCode: 200}, + } + _, err := c.Setup().Namespaces().Watch(labels.Everything(), labels.Everything(), "") + c.Validate(t, nil, err) +}