Refactor the API registration and installation

This commit is contained in:
Chao Xu
2015-12-18 21:08:34 -08:00
parent be235e8754
commit 2b5b708b70
30 changed files with 332 additions and 141 deletions

View File

@@ -71,7 +71,7 @@ func TestDecodeSinglePod(t *testing.T) {
t.Errorf("expected:\n%#v\ngot:\n%#v\n%s", pod, podOut, string(json))
}
for _, gv := range registered.GroupVersionsForGroup("") {
for _, gv := range registered.EnabledVersionsForGroup(api.GroupName) {
externalPod, err := testapi.Default.Converter().ConvertToVersion(pod, gv.String())
if err != nil {
t.Errorf("unexpected error: %v", err)
@@ -137,7 +137,7 @@ func TestDecodePodList(t *testing.T) {
t.Errorf("expected:\n%#v\ngot:\n%#v\n%s", podList, &podListOut, string(json))
}
for _, gv := range registered.GroupVersionsForGroup("") {
for _, gv := range registered.EnabledVersionsForGroup(api.GroupName) {
externalPodList, err := testapi.Default.Converter().ConvertToVersion(podList, gv.String())
if err != nil {
t.Errorf("unexpected error: %v", err)