Rename masterConfig to controlPlaneConfig

This commit is contained in:
Mengjiao Liu
2021-06-04 20:55:08 +08:00
parent a4e5239bdc
commit 6871b2b3c7
30 changed files with 224 additions and 224 deletions

View File

@@ -84,15 +84,15 @@ func setupWithResources(t *testing.T, groupVersions []schema.GroupVersion, resou
}
func setupWithResourcesWithOptions(t *testing.T, opts *framework.MasterConfigOptions, groupVersions []schema.GroupVersion, resources []schema.GroupVersionResource) (*httptest.Server, clientset.Interface, framework.CloseFunc) {
masterConfig := framework.NewIntegrationTestControlPlaneConfigWithOptions(opts)
controlPlaneConfig := framework.NewIntegrationTestControlPlaneConfigWithOptions(opts)
if len(groupVersions) > 0 || len(resources) > 0 {
resourceConfig := controlplane.DefaultAPIResourceConfigSource()
resourceConfig.EnableVersions(groupVersions...)
resourceConfig.EnableResources(resources...)
masterConfig.ExtraConfig.APIResourceConfigSource = resourceConfig
controlPlaneConfig.ExtraConfig.APIResourceConfigSource = resourceConfig
}
masterConfig.GenericConfig.OpenAPIConfig = framework.DefaultOpenAPIConfig()
_, s, closeFn := framework.RunAnAPIServer(masterConfig)
controlPlaneConfig.GenericConfig.OpenAPIConfig = framework.DefaultOpenAPIConfig()
_, s, closeFn := framework.RunAnAPIServer(controlPlaneConfig)
clientSet, err := clientset.NewForConfig(&restclient.Config{Host: s.URL, QPS: -1})
if err != nil {
@@ -224,9 +224,9 @@ func Test4xxStatusCodeInvalidPatch(t *testing.T) {
}
func TestCacheControl(t *testing.T) {
masterConfig := framework.NewIntegrationTestControlPlaneConfigWithOptions(&framework.MasterConfigOptions{})
masterConfig.GenericConfig.OpenAPIConfig = framework.DefaultOpenAPIConfig()
master, _, closeFn := framework.RunAnAPIServer(masterConfig)
controlPlaneConfig := framework.NewIntegrationTestControlPlaneConfigWithOptions(&framework.MasterConfigOptions{})
controlPlaneConfig.GenericConfig.OpenAPIConfig = framework.DefaultOpenAPIConfig()
master, _, closeFn := framework.RunAnAPIServer(controlPlaneConfig)
defer closeFn()
rt, err := restclient.TransportFor(master.GenericAPIServer.LoopbackClientConfig)