Migrate RuntimeClass E2E to typed client

This commit is contained in:
Tim Allclair
2019-01-24 11:08:19 -08:00
parent 291d0cbd2f
commit 954f43a10d
5 changed files with 12 additions and 24 deletions

View File

@@ -52,6 +52,7 @@ import (
"k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset"
"k8s.io/kubernetes/test/e2e/framework/metrics"
testutils "k8s.io/kubernetes/test/utils"
nodeapiclient "k8s.io/node-api/pkg/client/clientset/versioned"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
@@ -78,6 +79,7 @@ type Framework struct {
KubemarkExternalClusterClientSet clientset.Interface
APIExtensionsClientSet apiextensionsclient.Interface
CSIClientSet csi.Interface
NodeAPIClientSet nodeapiclient.Interface
InternalClientset *internalclientset.Clientset
AggregatorClient *aggregatorclient.Clientset
@@ -197,6 +199,9 @@ func (f *Framework) BeforeEach() {
jsonConfig.ContentType = "application/json"
f.CSIClientSet, err = csi.NewForConfig(jsonConfig)
Expect(err).NotTo(HaveOccurred())
// node.k8s.io is also based on CRD
f.NodeAPIClientSet, err = nodeapiclient.NewForConfig(jsonConfig)
Expect(err).NotTo(HaveOccurred())
// create scales getter, set GroupVersion and NegotiatedSerializer to default values
// as they are required when creating a REST client.