test/integration: Rename MasterConfigOptions to ControlPlaneConfigOptions

This commit is contained in:
Mengjiao Liu
2021-06-08 16:53:15 +08:00
parent f7cff077d5
commit ac5535c949
5 changed files with 16 additions and 16 deletions

View File

@@ -75,15 +75,15 @@ func setup(t *testing.T, groupVersions ...schema.GroupVersion) (*httptest.Server
return setupWithResources(t, groupVersions, nil)
}
func setupWithOptions(t *testing.T, opts *framework.MasterConfigOptions, groupVersions ...schema.GroupVersion) (*httptest.Server, clientset.Interface, framework.CloseFunc) {
func setupWithOptions(t *testing.T, opts *framework.ControlPlaneConfigOptions, groupVersions ...schema.GroupVersion) (*httptest.Server, clientset.Interface, framework.CloseFunc) {
return setupWithResourcesWithOptions(t, opts, groupVersions, nil)
}
func setupWithResources(t *testing.T, groupVersions []schema.GroupVersion, resources []schema.GroupVersionResource) (*httptest.Server, clientset.Interface, framework.CloseFunc) {
return setupWithResourcesWithOptions(t, &framework.MasterConfigOptions{}, groupVersions, resources)
return setupWithResourcesWithOptions(t, &framework.ControlPlaneConfigOptions{}, groupVersions, resources)
}
func setupWithResourcesWithOptions(t *testing.T, opts *framework.MasterConfigOptions, groupVersions []schema.GroupVersion, resources []schema.GroupVersionResource) (*httptest.Server, clientset.Interface, framework.CloseFunc) {
func setupWithResourcesWithOptions(t *testing.T, opts *framework.ControlPlaneConfigOptions, groupVersions []schema.GroupVersion, resources []schema.GroupVersionResource) (*httptest.Server, clientset.Interface, framework.CloseFunc) {
controlPlaneConfig := framework.NewIntegrationTestControlPlaneConfigWithOptions(opts)
if len(groupVersions) > 0 || len(resources) > 0 {
resourceConfig := controlplane.DefaultAPIResourceConfigSource()
@@ -224,7 +224,7 @@ func Test4xxStatusCodeInvalidPatch(t *testing.T) {
}
func TestCacheControl(t *testing.T) {
controlPlaneConfig := framework.NewIntegrationTestControlPlaneConfigWithOptions(&framework.MasterConfigOptions{})
controlPlaneConfig := framework.NewIntegrationTestControlPlaneConfigWithOptions(&framework.ControlPlaneConfigOptions{})
controlPlaneConfig.GenericConfig.OpenAPIConfig = framework.DefaultOpenAPIConfig()
master, _, closeFn := framework.RunAnAPIServer(controlPlaneConfig)
defer closeFn()
@@ -331,7 +331,7 @@ func TestListOptions(t *testing.T) {
defer featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, features.APIListChunking, true)()
etcdOptions := framework.DefaultEtcdOptions()
etcdOptions.EnableWatchCache = watchCacheEnabled
s, clientSet, closeFn := setupWithOptions(t, &framework.MasterConfigOptions{EtcdOptions: etcdOptions})
s, clientSet, closeFn := setupWithOptions(t, &framework.ControlPlaneConfigOptions{EtcdOptions: etcdOptions})
defer closeFn()
ns := framework.CreateTestingNamespace("list-options", s, t)
@@ -563,7 +563,7 @@ func TestListResourceVersion0(t *testing.T) {
defer featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, features.APIListChunking, true)()
etcdOptions := framework.DefaultEtcdOptions()
etcdOptions.EnableWatchCache = tc.watchCacheEnabled
s, clientSet, closeFn := setupWithOptions(t, &framework.MasterConfigOptions{EtcdOptions: etcdOptions})
s, clientSet, closeFn := setupWithOptions(t, &framework.ControlPlaneConfigOptions{EtcdOptions: etcdOptions})
defer closeFn()
ns := framework.CreateTestingNamespace("list-paging", s, t)