Add a unit test to exercise watch

This commit is contained in:
derekwaynecarr 2015-02-12 11:25:33 -05:00
parent e76dcbdfa2
commit 73aa0cc192

View File

@ -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)
}