Tolerate multiple registered versions in a single group

This commit is contained in:
Jordan Liggitt
2016-03-11 11:41:18 -05:00
parent c9250bba2a
commit d008283942
9 changed files with 30 additions and 16 deletions

View File

@@ -80,7 +80,7 @@ func TestRESTMapper(t *testing.T) {
rcGVK := gv.WithKind("ReplicationController")
podTemplateGVK := gv.WithKind("PodTemplate")
if gvk, err := registered.GroupOrDie(internal.GroupName).RESTMapper.KindFor(internal.SchemeGroupVersion.WithResource("replicationcontrollers")); err != nil || gvk != rcGVK {
if gvk, err := registered.RESTMapper().KindFor(internal.SchemeGroupVersion.WithResource("replicationcontrollers")); err != nil || gvk != rcGVK {
t.Errorf("unexpected version mapping: %v %v", gvk, err)
}