Make admission control plug-ins work from indexes

This commit is contained in:
derekwaynecarr
2015-02-16 10:54:29 -05:00
parent d4755704b1
commit 2ed8eed004
13 changed files with 148 additions and 19 deletions

View File

@@ -17,12 +17,12 @@ limitations under the License.
package client
import (
"net/url"
"testing"
"github.com/GoogleCloudPlatform/kubernetes/pkg/api"
"github.com/GoogleCloudPlatform/kubernetes/pkg/api/resource"
"github.com/GoogleCloudPlatform/kubernetes/pkg/labels"
//"github.com/GoogleCloudPlatform/kubernetes/pkg/util"
)
func TestLimitRangeCreate(t *testing.T) {
@@ -192,3 +192,12 @@ func TestLimitRangeDelete(t *testing.T) {
err := c.Setup().LimitRanges(ns).Delete("foo")
c.Validate(t, nil, err)
}
func TestLimitRangeWatch(t *testing.T) {
c := &testClient{
Request: testRequest{Method: "GET", Path: "/watch/limitRanges", Query: url.Values{"resourceVersion": []string{}}},
Response: Response{StatusCode: 200},
}
_, err := c.Setup().LimitRanges(api.NamespaceAll).Watch(labels.Everything(), labels.Everything(), "")
c.Validate(t, nil, err)
}