Combine pkg/apitools and pkg/api/common and call the result pkg/runtime

This commit is contained in:
Daniel Smith
2014-09-02 10:55:27 -07:00
parent 099c8fd36f
commit a63966e73c
44 changed files with 218 additions and 237 deletions

View File

@@ -24,10 +24,10 @@ import (
"time"
"github.com/GoogleCloudPlatform/kubernetes/pkg/api"
"github.com/GoogleCloudPlatform/kubernetes/pkg/apitools"
"github.com/GoogleCloudPlatform/kubernetes/pkg/client"
"github.com/GoogleCloudPlatform/kubernetes/pkg/client/cache"
"github.com/GoogleCloudPlatform/kubernetes/pkg/labels"
"github.com/GoogleCloudPlatform/kubernetes/pkg/runtime"
"github.com/GoogleCloudPlatform/kubernetes/pkg/util"
"github.com/GoogleCloudPlatform/kubernetes/pkg/watch"
)
@@ -113,7 +113,7 @@ func TestPollMinions(t *testing.T) {
ml := &api.MinionList{Items: item.minions}
handler := util.FakeHandler{
StatusCode: 200,
ResponseBody: apitools.EncodeOrDie(ml),
ResponseBody: runtime.EncodeOrDie(ml),
T: t,
}
mux := http.NewServeMux()
@@ -140,7 +140,7 @@ func TestDefaultErrorFunc(t *testing.T) {
testPod := &api.Pod{JSONBase: api.JSONBase{ID: "foo"}}
handler := util.FakeHandler{
StatusCode: 200,
ResponseBody: apitools.EncodeOrDie(testPod),
ResponseBody: runtime.EncodeOrDie(testPod),
T: t,
}
mux := http.NewServeMux()
@@ -259,7 +259,7 @@ func TestBind(t *testing.T) {
t.Errorf("Unexpected error: %v", err)
continue
}
expectedBody := apitools.EncodeOrDie(item.binding)
expectedBody := runtime.EncodeOrDie(item.binding)
handler.ValidateRequest(t, "/api/v1beta1/bindings", "POST", &expectedBody)
}
}