update client.Config to use GroupVersion

This commit is contained in:
deads2k
2015-11-13 16:20:54 -05:00
committed by David Eads
parent 86ddc7592c
commit a87d927588
45 changed files with 314 additions and 224 deletions

View File

@@ -24,6 +24,7 @@ import (
"k8s.io/kubernetes/pkg/api"
_ "k8s.io/kubernetes/pkg/api/install"
"k8s.io/kubernetes/pkg/api/unversioned"
_ "k8s.io/kubernetes/pkg/apis/extensions/install"
_ "k8s.io/kubernetes/pkg/apis/metrics/install"
@@ -87,6 +88,14 @@ func (g TestGroup) GroupAndVersion() string {
return g.GroupVersionUnderTest
}
func (g TestGroup) GroupVersion() *unversioned.GroupVersion {
gv, err := unversioned.ParseGroupVersion(g.GroupVersionUnderTest)
if err != nil {
panic(err)
}
return &gv
}
// Codec returns the codec for the API version to test against, as set by the
// KUBE_TEST_API env var.
func (g TestGroup) Codec() runtime.Codec {