mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-05 07:27:21 +00:00
simplify api registration
This commit is contained in:
@@ -154,7 +154,7 @@ func (tc *restClientTestCase) prepareTestClient(t *testing.T) (*metricsfake.Clie
|
||||
return true, &metrics, nil
|
||||
} else {
|
||||
name := getForAction.GetName()
|
||||
mapper := testrestmapper.TestOnlyStaticRESTMapper(legacyscheme.Registry, legacyscheme.Scheme)
|
||||
mapper := testrestmapper.TestOnlyStaticRESTMapper(legacyscheme.Scheme)
|
||||
assert.NotNil(t, tc.singleObject, "should have only requested a single-object metric when we asked for metrics for a single object")
|
||||
gk := schema.FromAPIVersionAndKind(tc.singleObject.APIVersion, tc.singleObject.Kind).GroupKind()
|
||||
mapping, err := mapper.RESTMapping(gk)
|
||||
|
||||
Reference in New Issue
Block a user