Drop NewDefultGroupVersionFramework in favor of client automatically handling proper GroupVersions

This commit is contained in:
Maciej Szulik
2017-02-27 18:21:23 +01:00
parent 7cba9d9c92
commit 6c0cd24865
3 changed files with 2 additions and 9 deletions

View File

@@ -46,11 +46,10 @@ const (
var (
CronJobGroupVersionResource = schema.GroupVersionResource{Group: batchv2alpha1.GroupName, Version: "v2alpha1", Resource: "cronjobs"}
ScheduledJobGroupVersionResource = schema.GroupVersionResource{Group: batchv2alpha1.GroupName, Version: "v2alpha1", Resource: "scheduledjobs"}
BatchV2Alpha1GroupVersion = schema.GroupVersion{Group: batchv2alpha1.GroupName, Version: "v2alpha1"}
)
var _ = framework.KubeDescribe("CronJob", func() {
f := framework.NewDefaultGroupVersionFramework("cronjob", BatchV2Alpha1GroupVersion)
f := framework.NewDefaultFramework("cronjob")
sleepCommand := []string{"sleep", "300"}

View File

@@ -108,12 +108,6 @@ func NewDefaultFramework(baseName string) *Framework {
return NewFramework(baseName, options, nil)
}
func NewDefaultGroupVersionFramework(baseName string, groupVersion schema.GroupVersion) *Framework {
f := NewDefaultFramework(baseName)
f.Options.GroupVersion = &groupVersion
return f
}
func NewFramework(baseName string, options FrameworkOptions, client clientset.Interface) *Framework {
f := &Framework{
BaseName: baseName,

View File

@@ -178,7 +178,7 @@ func runKubectlRetryOrDie(args ...string) string {
// duplicated setup to avoid polluting "normal" clients with alpha features which confuses the generated clients
var _ = framework.KubeDescribe("Kubectl alpha client", func() {
defer GinkgoRecover()
f := framework.NewDefaultGroupVersionFramework("kubectl", BatchV2Alpha1GroupVersion)
f := framework.NewDefaultFramework("kubectl")
var c clientset.Interface
var ns string