mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-30 15:05:27 +00:00
Add a unit test to exercise watch
This commit is contained in:
parent
e76dcbdfa2
commit
73aa0cc192
@ -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)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user