Merge pull request #102272 from mengjiao-liu/term-NewIntegrationTestMasterConfig
Part2: master to controlplane in test/integration(1.22)
This commit is contained in:
@@ -84,7 +84,7 @@ 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.NewIntegrationTestMasterConfigWithOptions(opts)
|
||||
masterConfig := framework.NewIntegrationTestControlPlaneConfigWithOptions(opts)
|
||||
if len(groupVersions) > 0 || len(resources) > 0 {
|
||||
resourceConfig := controlplane.DefaultAPIResourceConfigSource()
|
||||
resourceConfig.EnableVersions(groupVersions...)
|
||||
@@ -224,7 +224,7 @@ func Test4xxStatusCodeInvalidPatch(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestCacheControl(t *testing.T) {
|
||||
masterConfig := framework.NewIntegrationTestMasterConfigWithOptions(&framework.MasterConfigOptions{})
|
||||
masterConfig := framework.NewIntegrationTestControlPlaneConfigWithOptions(&framework.MasterConfigOptions{})
|
||||
masterConfig.GenericConfig.OpenAPIConfig = framework.DefaultOpenAPIConfig()
|
||||
master, _, closeFn := framework.RunAMaster(masterConfig)
|
||||
defer closeFn()
|
||||
|
@@ -52,7 +52,7 @@ import (
|
||||
func setup(t testing.TB, groupVersions ...schema.GroupVersion) (*httptest.Server, clientset.Interface, framework.CloseFunc) {
|
||||
opts := framework.MasterConfigOptions{EtcdOptions: framework.DefaultEtcdOptions()}
|
||||
opts.EtcdOptions.DefaultStorageMediaType = "application/vnd.kubernetes.protobuf"
|
||||
masterConfig := framework.NewIntegrationTestMasterConfigWithOptions(&opts)
|
||||
masterConfig := framework.NewIntegrationTestControlPlaneConfigWithOptions(&opts)
|
||||
if len(groupVersions) > 0 {
|
||||
resourceConfig := controlplane.DefaultAPIResourceConfigSource()
|
||||
resourceConfig.EnableVersions(groupVersions...)
|
||||
@@ -2819,7 +2819,7 @@ spec:
|
||||
|
||||
func TestStopTrackingManagedFieldsOnFeatureDisabled(t *testing.T) {
|
||||
sharedEtcd := framework.DefaultEtcdOptions()
|
||||
masterConfig := framework.NewIntegrationTestMasterConfigWithOptions(&framework.MasterConfigOptions{
|
||||
masterConfig := framework.NewIntegrationTestControlPlaneConfigWithOptions(&framework.MasterConfigOptions{
|
||||
EtcdOptions: sharedEtcd,
|
||||
})
|
||||
masterConfig.GenericConfig.OpenAPIConfig = framework.DefaultOpenAPIConfig()
|
||||
|
@@ -52,7 +52,7 @@ const (
|
||||
func setup(t testing.TB, maxReadonlyRequestsInFlight, MaxMutatingRequestsInFlight int) (*httptest.Server, *rest.Config, framework.CloseFunc) {
|
||||
opts := framework.MasterConfigOptions{EtcdOptions: framework.DefaultEtcdOptions()}
|
||||
opts.EtcdOptions.DefaultStorageMediaType = "application/vnd.kubernetes.protobuf"
|
||||
masterConfig := framework.NewIntegrationTestMasterConfigWithOptions(&opts)
|
||||
masterConfig := framework.NewIntegrationTestControlPlaneConfigWithOptions(&opts)
|
||||
resourceConfig := controlplane.DefaultAPIResourceConfigSource()
|
||||
resourceConfig.EnableVersions(schema.GroupVersion{
|
||||
Group: "flowcontrol.apiserver.k8s.io",
|
||||
|
@@ -55,7 +55,7 @@ func multiEtcdSetup(t testing.TB) (clientset.Interface, framework.CloseFunc) {
|
||||
etcdOptions.EnableWatchCache = true
|
||||
|
||||
opts := framework.MasterConfigOptions{EtcdOptions: etcdOptions}
|
||||
masterConfig := framework.NewIntegrationTestMasterConfigWithOptions(&opts)
|
||||
masterConfig := framework.NewIntegrationTestControlPlaneConfigWithOptions(&opts)
|
||||
// Switch off endpoints reconciler to avoid unnecessary operations.
|
||||
masterConfig.ExtraConfig.EndpointReconcilerType = reconcilers.NoneEndpointReconcilerType
|
||||
_, s, stopMaster := framework.RunAMaster(masterConfig)
|
||||
|
Reference in New Issue
Block a user