Skip to content

Commit

Permalink
Adopt Kubernetes breaking change: requires effective version
Browse files Browse the repository at this point in the history
Signed-off-by: RainbowMango <[email protected]>
  • Loading branch information
RainbowMango committed Nov 11, 2024
1 parent d54da90 commit 67d7fce
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions pkg/aggregatedapiserver/apiserver_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ package aggregatedapiserver

import (
"errors"
"k8s.io/apiserver/pkg/util/version"
"net"
"net/http"
"strings"
Expand Down Expand Up @@ -65,7 +66,8 @@ func TestNewAggregatedAPIServer(t *testing.T) {
BuildHandlerChainFunc: func(http.Handler, *genericapiserver.Config) (secure http.Handler) {
return nil
},
ExternalAddress: "10.0.0.0:10000",
ExternalAddress: "10.0.0.0:10000",
EffectiveVersion: version.NewEffectiveVersion("1.0"),
},
client: fakeclientset.NewSimpleClientset(),
prep: func(cfg *completedConfig, genericAPIServerCfg *genericapiserver.Config, client clientset.Interface) error {
Expand Down Expand Up @@ -94,8 +96,9 @@ func TestNewAggregatedAPIServer(t *testing.T) {
BuildHandlerChainFunc: func(http.Handler, *genericapiserver.Config) (secure http.Handler) {
return nil
},
OpenAPIV3Config: genericapiserver.DefaultOpenAPIV3Config(generatedopenapi.GetOpenAPIDefinitions, openapi.NewDefinitionNamer(clusterscheme.Scheme)),
ExternalAddress: "10.0.0.0:10000",
OpenAPIV3Config: genericapiserver.DefaultOpenAPIV3Config(generatedopenapi.GetOpenAPIDefinitions, openapi.NewDefinitionNamer(clusterscheme.Scheme)),
ExternalAddress: "10.0.0.0:10000",
EffectiveVersion: version.NewEffectiveVersion("1.0"),
},
prep: func(cfg *completedConfig, genericAPIServerCfg *genericapiserver.Config, client clientset.Interface) error {
sharedInformer := informers.NewSharedInformerFactory(client, 0)
Expand Down Expand Up @@ -129,8 +132,9 @@ func TestNewAggregatedAPIServer(t *testing.T) {
BuildHandlerChainFunc: func(http.Handler, *genericapiserver.Config) (secure http.Handler) {
return nil
},
OpenAPIV3Config: genericapiserver.DefaultOpenAPIV3Config(generatedopenapi.GetOpenAPIDefinitions, openapi.NewDefinitionNamer(clusterscheme.Scheme)),
ExternalAddress: "10.0.0.0:10000",
OpenAPIV3Config: genericapiserver.DefaultOpenAPIV3Config(generatedopenapi.GetOpenAPIDefinitions, openapi.NewDefinitionNamer(clusterscheme.Scheme)),
ExternalAddress: "10.0.0.0:10000",
EffectiveVersion: version.NewEffectiveVersion("1.0"),
},
prep: func(cfg *completedConfig, genericAPIServerCfg *genericapiserver.Config, client clientset.Interface) error {
sharedInformer := informers.NewSharedInformerFactory(client, 0)
Expand Down

0 comments on commit 67d7fce

Please sign in to comment.