mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 11:50:44 +00:00
Allow setting GroupVersion in e2e tests
This commit is contained in:
parent
fe53ec34cf
commit
be928af9b3
@ -35,6 +35,7 @@ import (
|
||||
"k8s.io/kubernetes/federation/client/clientset_generated/federation_release_1_4"
|
||||
"k8s.io/kubernetes/pkg/api"
|
||||
apierrs "k8s.io/kubernetes/pkg/api/errors"
|
||||
"k8s.io/kubernetes/pkg/api/unversioned"
|
||||
"k8s.io/kubernetes/pkg/client/clientset_generated/release_1_2"
|
||||
"k8s.io/kubernetes/pkg/client/clientset_generated/release_1_3"
|
||||
"k8s.io/kubernetes/pkg/client/restclient"
|
||||
@ -103,8 +104,9 @@ type TestDataSummary interface {
|
||||
}
|
||||
|
||||
type FrameworkOptions struct {
|
||||
ClientQPS float32
|
||||
ClientBurst int
|
||||
ClientQPS float32
|
||||
ClientBurst int
|
||||
GroupVersion *unversioned.GroupVersion
|
||||
}
|
||||
|
||||
// NewFramework makes a new framework and sets up a BeforeEach/AfterEach for
|
||||
@ -180,6 +182,9 @@ func (f *Framework) BeforeEach() {
|
||||
Expect(err).NotTo(HaveOccurred())
|
||||
config.QPS = f.options.ClientQPS
|
||||
config.Burst = f.options.ClientBurst
|
||||
if f.options.GroupVersion != nil {
|
||||
config.GroupVersion = f.options.GroupVersion
|
||||
}
|
||||
if TestContext.KubeAPIContentType != "" {
|
||||
config.ContentType = TestContext.KubeAPIContentType
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user