Add version mapping in ComponentGlobalsRegistry.
Signed-off-by: Siyuan Zhang <sizhang@google.com>
This commit is contained in:
@@ -32,11 +32,9 @@ import (
|
||||
"k8s.io/apimachinery/pkg/types"
|
||||
"k8s.io/apimachinery/pkg/util/sets"
|
||||
"k8s.io/apimachinery/pkg/util/wait"
|
||||
utilversion "k8s.io/apiserver/pkg/util/version"
|
||||
"k8s.io/client-go/dynamic"
|
||||
apiregistrationv1 "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1"
|
||||
apiregistrationclient "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/typed/apiregistration/v1"
|
||||
"k8s.io/kubernetes/cmd/kube-apiserver/app/options"
|
||||
)
|
||||
|
||||
// TestOverlappingBuiltInResources ensures the list of group-resources the custom resource finalizer should skip is up to date
|
||||
@@ -71,9 +69,7 @@ func TestOverlappingBuiltInResources(t *testing.T) {
|
||||
|
||||
// TestOverlappingCustomResourceAPIService ensures creating and deleting a custom resource overlapping with APIServices does not destroy APIService data
|
||||
func TestOverlappingCustomResourceAPIService(t *testing.T) {
|
||||
apiServer := StartRealAPIServerOrDie(t, func(opts *options.ServerRunOptions) {
|
||||
opts.GenericServerRunOptions.EffectiveVersion = utilversion.NewEffectiveVersion("1.30")
|
||||
})
|
||||
apiServer := StartRealAPIServerOrDie(t)
|
||||
defer apiServer.Cleanup()
|
||||
|
||||
apiServiceClient, err := apiregistrationclient.NewForConfig(apiServer.Config)
|
||||
@@ -235,9 +231,7 @@ func TestOverlappingCustomResourceAPIService(t *testing.T) {
|
||||
|
||||
// TestOverlappingCustomResourceCustomResourceDefinition ensures creating and deleting a custom resource overlapping with CustomResourceDefinition does not destroy CustomResourceDefinition data
|
||||
func TestOverlappingCustomResourceCustomResourceDefinition(t *testing.T) {
|
||||
apiServer := StartRealAPIServerOrDie(t, func(opts *options.ServerRunOptions) {
|
||||
opts.GenericServerRunOptions.EffectiveVersion = utilversion.NewEffectiveVersion("1.30")
|
||||
})
|
||||
apiServer := StartRealAPIServerOrDie(t)
|
||||
defer apiServer.Cleanup()
|
||||
|
||||
crdClient, err := crdclient.NewForConfig(apiServer.Config)
|
||||
|
||||
@@ -39,7 +39,7 @@ import (
|
||||
func TestCrossGroupStorage(t *testing.T) {
|
||||
apiServer := StartRealAPIServerOrDie(t, func(opts *options.ServerRunOptions) {
|
||||
// force enable all resources so we can check storage.
|
||||
opts.GenericServerRunOptions.EffectiveVersion = utilversion.NewEffectiveVersion("1.30")
|
||||
opts.GenericServerRunOptions.EffectiveVersion = utilversion.NewEffectiveVersion("0.0")
|
||||
})
|
||||
defer apiServer.Cleanup()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user