explicitly enable apps/v1beta1, apps/v1beta2, extensions/v1beta1 for print,etcd,storage tests

This commit is contained in:
Jordan Liggitt
2019-01-08 14:08:20 -05:00
parent 4fc63fd014
commit b64075dbd0
8 changed files with 61 additions and 16 deletions

View File

@@ -54,7 +54,7 @@ import (
)
// StartRealMasterOrDie starts an API master that is appropriate for use in tests that require one of every resource
func StartRealMasterOrDie(t *testing.T) *Master {
func StartRealMasterOrDie(t *testing.T, configFuncs ...func(*options.ServerRunOptions)) *Master {
certDir, err := ioutil.TempDir("", t.Name())
if err != nil {
t.Fatal(err)
@@ -79,13 +79,14 @@ func StartRealMasterOrDie(t *testing.T) *Master {
kubeAPIServerOptions.ServiceClusterIPRange = *defaultServiceClusterIPRange
kubeAPIServerOptions.Authorization.Modes = []string{"RBAC"}
kubeAPIServerOptions.Admission.GenericAdmission.DisablePlugins = []string{"ServiceAccount"}
kubeAPIServerOptions.APIEnablement.RuntimeConfig["api/all"] = "true"
for _, f := range configFuncs {
f(kubeAPIServerOptions)
}
completedOptions, err := app.Complete(kubeAPIServerOptions)
if err != nil {
t.Fatal(err)
}
if err := completedOptions.APIEnablement.RuntimeConfig.Set("api/all=true"); err != nil {
t.Fatal(err)
}
// get etcd client before starting API server
rawClient, kvClient, err := integration.GetEtcdClients(completedOptions.Etcd.StorageConfig.Transport)