Rename JSONBase -> TypeMeta in preparation for v1beta3

Will make subsequent refactor much easier
This commit is contained in:
Clayton Coleman
2014-10-07 11:12:16 -04:00
parent e294cef9d4
commit d3e51a0f24
69 changed files with 464 additions and 464 deletions

View File

@@ -141,8 +141,8 @@ func TestPollMinions(t *testing.T) {
}{
{
minions: []api.Minion{
{JSONBase: api.JSONBase{ID: "foo"}},
{JSONBase: api.JSONBase{ID: "bar"}},
{TypeMeta: api.TypeMeta{ID: "foo"}},
{TypeMeta: api.TypeMeta{ID: "bar"}},
},
},
}
@@ -175,7 +175,7 @@ func TestPollMinions(t *testing.T) {
}
func TestDefaultErrorFunc(t *testing.T) {
testPod := &api.Pod{JSONBase: api.JSONBase{ID: "foo"}}
testPod := &api.Pod{TypeMeta: api.TypeMeta{ID: "foo"}}
handler := util.FakeHandler{
StatusCode: 200,
ResponseBody: runtime.EncodeOrDie(latest.Codec, testPod),
@@ -215,7 +215,7 @@ func TestStoreToMinionLister(t *testing.T) {
store := cache.NewStore()
ids := util.NewStringSet("foo", "bar", "baz")
for id := range ids {
store.Add(id, &api.Minion{JSONBase: api.JSONBase{ID: id}})
store.Add(id, &api.Minion{TypeMeta: api.TypeMeta{ID: id}})
}
sml := storeToMinionLister{store}
@@ -233,7 +233,7 @@ func TestStoreToPodLister(t *testing.T) {
ids := []string{"foo", "bar", "baz"}
for _, id := range ids {
store.Add(id, &api.Pod{
JSONBase: api.JSONBase{ID: id},
TypeMeta: api.TypeMeta{ID: id},
Labels: map[string]string{"name": id},
})
}
@@ -259,9 +259,9 @@ func TestStoreToPodLister(t *testing.T) {
func TestMinionEnumerator(t *testing.T) {
testList := &api.MinionList{
Items: []api.Minion{
{JSONBase: api.JSONBase{ID: "foo"}},
{JSONBase: api.JSONBase{ID: "bar"}},
{JSONBase: api.JSONBase{ID: "baz"}},
{TypeMeta: api.TypeMeta{ID: "foo"}},
{TypeMeta: api.TypeMeta{ID: "bar"}},
{TypeMeta: api.TypeMeta{ID: "baz"}},
},
}
me := minionEnumerator{testList}

View File

@@ -32,7 +32,7 @@ type fakeBinder struct {
func (fb fakeBinder) Bind(binding *api.Binding) error { return fb.b(binding) }
func podWithID(id string) *api.Pod {
return &api.Pod{JSONBase: api.JSONBase{ID: "foo"}}
return &api.Pod{TypeMeta: api.TypeMeta{ID: "foo"}}
}
type mockScheduler struct {