Rename ID -> Name

This commit is contained in:
Clayton Coleman
2014-10-22 13:02:02 -04:00
parent bdebff5b28
commit bb77a5d15f
107 changed files with 777 additions and 777 deletions

View File

@@ -104,8 +104,8 @@ func TestClient(t *testing.T) {
if err != nil {
t.Fatalf("unexpected error: %v", err)
}
if got.ID == "" {
t.Errorf("unexpected empty pod ID %v", got)
if got.Name == "" {
t.Errorf("unexpected empty pod Name %v", got)
}
// pod is shown, but not scheduled
@@ -117,7 +117,7 @@ func TestClient(t *testing.T) {
t.Errorf("expected one pod, got %#v", pods)
}
actual := pods.Items[0]
if actual.ID != got.ID {
if actual.Name != got.Name {
t.Errorf("expected pod %#v, got %#v", got, actual)
}
if actual.CurrentState.Host != "" {

View File

@@ -95,7 +95,7 @@ func TestWatch(t *testing.T) {
client := newEtcdClient()
helper := tools.EtcdHelper{Client: client, Codec: latest.Codec, ResourceVersioner: tools.RuntimeVersionAdapter{latest.ResourceVersioner}}
withEtcdKey(func(key string) {
resp, err := client.Set(key, runtime.EncodeOrDie(v1beta1.Codec, &api.Pod{TypeMeta: api.TypeMeta{ID: "foo"}}), 0)
resp, err := client.Set(key, runtime.EncodeOrDie(v1beta1.Codec, &api.Pod{TypeMeta: api.TypeMeta{Name: "foo"}}), 0)
if err != nil {
t.Fatalf("unexpected error: %v", err)
}