RESTMapper should take into account multiple versions
When a CLI command `kubectl get rc --api-version=v1beta3` is called, the API resource name should match v1beta3, not whatever the default RESTMapper version is. This allows the correct resource name to be returned ("replicationcontrollers", instead of "replicationControllers").
This commit is contained in:
@@ -228,7 +228,7 @@ func TestRESTMapper(t *testing.T) {
|
||||
}
|
||||
|
||||
for _, version := range Versions {
|
||||
mapping, err := RESTMapper.RESTMapping(version, "ReplicationController")
|
||||
mapping, err := RESTMapper.RESTMapping("ReplicationController", version)
|
||||
if err != nil {
|
||||
t.Errorf("unexpected error: %v", err)
|
||||
}
|
||||
|
Reference in New Issue
Block a user