Populate OpenAPI in all integration tests

This commit is contained in:
Jefftree
2022-01-25 12:08:52 -08:00
parent 804630ed24
commit eb8f6fe0f9
7 changed files with 5 additions and 10 deletions

View File

@@ -93,7 +93,6 @@ func setupWithResourcesWithOptions(t testing.TB, opts *framework.ControlPlaneCon
resourceConfig.EnableResources(resources...)
controlPlaneConfig.ExtraConfig.APIResourceConfigSource = resourceConfig
}
controlPlaneConfig.GenericConfig.OpenAPIConfig = framework.DefaultOpenAPIConfig()
_, s, closeFn := framework.RunAnAPIServer(controlPlaneConfig)
clientSet, err := clientset.NewForConfig(&restclient.Config{Host: s.URL, QPS: -1})
@@ -227,7 +226,6 @@ func Test4xxStatusCodeInvalidPatch(t *testing.T) {
func TestCacheControl(t *testing.T) {
controlPlaneConfig := framework.NewIntegrationTestControlPlaneConfigWithOptions(&framework.ControlPlaneConfigOptions{})
controlPlaneConfig.GenericConfig.OpenAPIConfig = framework.DefaultOpenAPIConfig()
instanceConfig, _, closeFn := framework.RunAnAPIServer(controlPlaneConfig)
defer closeFn()
@@ -274,7 +272,6 @@ func TestCacheControl(t *testing.T) {
// Tests that the apiserver returns HSTS headers as expected.
func TestHSTS(t *testing.T) {
controlPlaneConfig := framework.NewIntegrationTestControlPlaneConfigWithOptions(&framework.ControlPlaneConfigOptions{})
controlPlaneConfig.GenericConfig.OpenAPIConfig = framework.DefaultOpenAPIConfig()
controlPlaneConfig.GenericConfig.HSTSDirectives = []string{"max-age=31536000", "includeSubDomains"}
instanceConfig, _, closeFn := framework.RunAnAPIServer(controlPlaneConfig)
defer closeFn()