Add e2e aggregator test.
What this PR does / why we need it: This adds an e2e test for aggregation based on the sample-apiserver. Currently is uses a sample-apiserver built as of 1.7. This should ensure that the aggregation system works end-to-end. It will also help detect if we break "old" extension api servers. Which issue this PR fixes (optional, in fixes #<issue number>(, fixes fixes #43714 Fixed bazel for the change. Fixed # of args issue from govet. Added code to test dynamic.Client.
This commit is contained in:
@@ -43,6 +43,7 @@ import (
|
||||
clientreporestclient "k8s.io/client-go/rest"
|
||||
restclient "k8s.io/client-go/rest"
|
||||
"k8s.io/client-go/tools/clientcmd"
|
||||
aggregatorclient "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset"
|
||||
"k8s.io/kubernetes/pkg/api"
|
||||
"k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset"
|
||||
"k8s.io/kubernetes/pkg/kubemark"
|
||||
@@ -71,6 +72,7 @@ type Framework struct {
|
||||
|
||||
InternalClientset *internalclientset.Clientset
|
||||
StagingClient *staging.Clientset
|
||||
AggregatorClient *aggregatorclient.Clientset
|
||||
ClientPool dynamic.ClientPool
|
||||
|
||||
SkipNamespaceCreation bool // Whether to skip creating a namespace
|
||||
@@ -195,6 +197,8 @@ func (f *Framework) BeforeEach() {
|
||||
Expect(err).NotTo(HaveOccurred())
|
||||
f.InternalClientset, err = internalclientset.NewForConfig(config)
|
||||
Expect(err).NotTo(HaveOccurred())
|
||||
f.AggregatorClient, err = aggregatorclient.NewForConfig(config)
|
||||
Expect(err).NotTo(HaveOccurred())
|
||||
clientRepoConfig := getClientRepoConfig(config)
|
||||
f.StagingClient, err = staging.NewForConfig(clientRepoConfig)
|
||||
Expect(err).NotTo(HaveOccurred())
|
||||
|
Reference in New Issue
Block a user