update tests to be specific about the versions they are testing instead of floating

This commit is contained in:
David Eads
2018-05-01 10:54:37 -04:00
parent f03f83a20a
commit 94e3d94d67
108 changed files with 270 additions and 418 deletions

View File

@@ -24,9 +24,9 @@ import (
"k8s.io/apimachinery/pkg/api/errors"
"k8s.io/apimachinery/pkg/api/resource"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime/schema"
clientset "k8s.io/client-go/kubernetes"
restclient "k8s.io/client-go/rest"
"k8s.io/kubernetes/pkg/api/testapi"
)
const (
@@ -57,7 +57,7 @@ func deleteNodes(apiURL string, config *Config) {
glog.Info("Deleting nodes")
clientSet := clientset.NewForConfigOrDie(&restclient.Config{
Host: apiURL,
ContentConfig: restclient.ContentConfig{GroupVersion: testapi.Groups[v1.GroupName].GroupVersion()},
ContentConfig: restclient.ContentConfig{GroupVersion: &schema.GroupVersion{Group: "", Version: "v1"}},
QPS: float32(config.CreateQPS),
Burst: config.CreateQPS,
})
@@ -70,7 +70,7 @@ func deleteNodes(apiURL string, config *Config) {
func createNodes(apiURL string, config *Config) error {
clientSet := clientset.NewForConfigOrDie(&restclient.Config{
Host: apiURL,
ContentConfig: restclient.ContentConfig{GroupVersion: testapi.Groups[v1.GroupName].GroupVersion()},
ContentConfig: restclient.ContentConfig{GroupVersion: &schema.GroupVersion{Group: "", Version: "v1"}},
QPS: float32(config.CreateQPS),
Burst: config.CreateQPS,
})