find partial resource matches

This commit is contained in:
deads2k
2015-12-07 08:12:24 -05:00
parent 837a070d2f
commit 20f9c2c545
19 changed files with 698 additions and 130 deletions

View File

@@ -80,7 +80,7 @@ func TestRESTMapper(t *testing.T) {
hpaGVK := gv.WithKind("HorizontalPodAutoscaler")
daemonSetGVK := gv.WithKind("DaemonSet")
if gvk, err := latest.GroupOrDie(extensions.GroupName).RESTMapper.KindFor("horizontalpodautoscalers"); err != nil || gvk != hpaGVK {
if gvk, err := latest.GroupOrDie(extensions.GroupName).RESTMapper.KindFor(gv.WithResource("horizontalpodautoscalers")); err != nil || gvk != hpaGVK {
t.Errorf("unexpected version mapping: %v %v", gvk, err)
}