Skip to content

Commit

Permalink
Add a unit test to exercise watch
Browse files Browse the repository at this point in the history
  • Loading branch information
derekwaynecarr committed Feb 12, 2015
1 parent e76dcbd commit 73aa0cc
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions pkg/client/namespaces_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ limitations under the License.
package client

import (
"net/url"
"testing"

"github.com/GoogleCloudPlatform/kubernetes/pkg/api"
Expand Down Expand Up @@ -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)
}

0 comments on commit 73aa0cc

Please sign in to comment.