Rename masterConfig to controlPlaneConfig
This commit is contained in:
@@ -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)
|
||||
|
Reference in New Issue
Block a user