Merge pull request #63206 from deads2k/api-11-restmapper
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. remove incorrect static restmapper from type registry A RESTMapping can only be determined by inspecting a server since discovery is the authoritative source of mapping decisions. This removes a deceptive method from the type registry and makes the old logic available for existing tests in a separate, clearly labeled package. @kubernetes/sig-api-machinery-pr-reviews @kubernetes/sig-cli-maintainers ```release-note NONE ``` Kubernetes-commit: f03f83a20ad6bdda650a19f52f16102962ea17d9
This commit is contained in:
commit
bd62696dfb
File diff suppressed because it is too large
Load Diff
|
@ -34,7 +34,6 @@ import (
|
|||
// "github.com/go-openapi/spec"
|
||||
"github.com/stretchr/testify/assert"
|
||||
|
||||
"k8s.io/apimachinery/pkg/api/meta"
|
||||
"k8s.io/apimachinery/pkg/apimachinery"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
|
@ -153,13 +152,8 @@ func TestInstallAPIGroups(t *testing.T) {
|
|||
scheme.AddKnownTypes(v1GroupVersion, &metav1.Status{})
|
||||
metav1.AddToGroupVersion(scheme, v1GroupVersion)
|
||||
|
||||
mapper := meta.NewDefaultRESTMapper([]schema.GroupVersion{gv})
|
||||
for kind := range scheme.KnownTypes(gv) {
|
||||
mapper.Add(gv.WithKind(kind), meta.RESTScopeNamespace)
|
||||
}
|
||||
groupMeta := apimachinery.GroupMeta{
|
||||
GroupVersions: []schema.GroupVersion{gv},
|
||||
RESTMapper: mapper,
|
||||
}
|
||||
|
||||
return APIGroupInfo{
|
||||
|
|
Loading…
Reference in New Issue