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

@@ -27,9 +27,9 @@ 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/labels"
"github.com/GoogleCloudPlatform/kubernetes/pkg/runtime"
"github.com/GoogleCloudPlatform/kubernetes/pkg/tools"
"github.com/GoogleCloudPlatform/kubernetes/pkg/util"
"github.com/GoogleCloudPlatform/kubernetes/pkg/watch"
@@ -109,7 +109,7 @@ func validateSyncReplication(t *testing.T, fakePodControl *FakePodControl, expec
}
func TestSyncReplicationControllerDoesNothing(t *testing.T) {
body, _ := apitools.Encode(newPodList(2))
body, _ := runtime.Encode(newPodList(2))
fakeHandler := util.FakeHandler{
StatusCode: 200,
ResponseBody: string(body),
@@ -129,7 +129,7 @@ func TestSyncReplicationControllerDoesNothing(t *testing.T) {
}
func TestSyncReplicationControllerDeletes(t *testing.T) {
body, _ := apitools.Encode(newPodList(2))
body, _ := runtime.Encode(newPodList(2))
fakeHandler := util.FakeHandler{
StatusCode: 200,
ResponseBody: string(body),
@@ -149,7 +149,7 @@ func TestSyncReplicationControllerDeletes(t *testing.T) {
}
func TestSyncReplicationControllerCreates(t *testing.T) {
body, _ := apitools.Encode(newPodList(0))
body, _ := runtime.Encode(newPodList(0))
fakeHandler := util.FakeHandler{
StatusCode: 200,
ResponseBody: string(body),
@@ -169,7 +169,7 @@ func TestSyncReplicationControllerCreates(t *testing.T) {
}
func TestCreateReplica(t *testing.T) {
body, _ := apitools.Encode(api.Pod{})
body, _ := runtime.Encode(api.Pod{})
fakeHandler := util.FakeHandler{
StatusCode: 200,
ResponseBody: string(body),
@@ -292,7 +292,7 @@ func TestSyncronize(t *testing.T) {
}
fakeControllerHandler := util.FakeHandler{
StatusCode: 200,
ResponseBody: apitools.EncodeOrDie(&api.ReplicationControllerList{
ResponseBody: runtime.EncodeOrDie(&api.ReplicationControllerList{
Items: []api.ReplicationController{
controllerSpec1,
controllerSpec2,