ObjectDiff moved after rebase

This commit is contained in:
Daniel Smith
2014-10-09 15:55:15 -07:00
parent 15680731f7
commit d3d9f7ac8b
3 changed files with 14 additions and 13 deletions

View File

@@ -26,6 +26,7 @@ import (
"github.com/GoogleCloudPlatform/kubernetes/pkg/registry/generic" "github.com/GoogleCloudPlatform/kubernetes/pkg/registry/generic"
"github.com/GoogleCloudPlatform/kubernetes/pkg/runtime" "github.com/GoogleCloudPlatform/kubernetes/pkg/runtime"
"github.com/GoogleCloudPlatform/kubernetes/pkg/tools" "github.com/GoogleCloudPlatform/kubernetes/pkg/tools"
"github.com/GoogleCloudPlatform/kubernetes/pkg/util"
"github.com/coreos/go-etcd/etcd" "github.com/coreos/go-etcd/etcd"
) )
@@ -98,7 +99,7 @@ func TestEventCreate(t *testing.T) {
} }
if e, a := item.expect, fakeClient.Data[path]; !reflect.DeepEqual(e, a) { if e, a := item.expect, fakeClient.Data[path]; !reflect.DeepEqual(e, a) {
t.Errorf("%v:\n%s", name, runtime.ObjectDiff(e, a)) t.Errorf("%v:\n%s", name, util.ObjectDiff(e, a))
} }
} }
} }

View File

@@ -24,7 +24,7 @@ import (
"github.com/GoogleCloudPlatform/kubernetes/pkg/api/testapi" "github.com/GoogleCloudPlatform/kubernetes/pkg/api/testapi"
"github.com/GoogleCloudPlatform/kubernetes/pkg/labels" "github.com/GoogleCloudPlatform/kubernetes/pkg/labels"
"github.com/GoogleCloudPlatform/kubernetes/pkg/registry/registrytest" "github.com/GoogleCloudPlatform/kubernetes/pkg/registry/registrytest"
"github.com/GoogleCloudPlatform/kubernetes/pkg/runtime" "github.com/GoogleCloudPlatform/kubernetes/pkg/util"
"github.com/GoogleCloudPlatform/kubernetes/pkg/watch" "github.com/GoogleCloudPlatform/kubernetes/pkg/watch"
) )
@@ -48,7 +48,7 @@ func TestRESTCreate(t *testing.T) {
t.Fatalf("Unexpected error %v", err) t.Fatalf("Unexpected error %v", err)
} }
if e, a := eventA, <-c; !reflect.DeepEqual(e, a) { if e, a := eventA, <-c; !reflect.DeepEqual(e, a) {
t.Errorf("diff: %s", runtime.ObjectDiff(e, a)) t.Errorf("diff: %s", util.ObjectDiff(e, a))
} }
} }
@@ -88,7 +88,7 @@ func TestRESTGet(t *testing.T) {
t.Fatalf("Unexpected error %v", err) t.Fatalf("Unexpected error %v", err)
} }
if e, a := eventA, got; !reflect.DeepEqual(e, a) { if e, a := eventA, got; !reflect.DeepEqual(e, a) {
t.Errorf("diff: %s", runtime.ObjectDiff(e, a)) t.Errorf("diff: %s", util.ObjectDiff(e, a))
} }
} }
@@ -111,7 +111,7 @@ func TestRESTgetAttrs(t *testing.T) {
t.Fatalf("Unexpected error %v", err) t.Fatalf("Unexpected error %v", err)
} }
if e, a := label, (labels.Set{}); !reflect.DeepEqual(e, a) { if e, a := label, (labels.Set{}); !reflect.DeepEqual(e, a) {
t.Errorf("diff: %s", runtime.ObjectDiff(e, a)) t.Errorf("diff: %s", util.ObjectDiff(e, a))
} }
expect := labels.Set{ expect := labels.Set{
"InvolvedObject.Kind": "Pod", "InvolvedObject.Kind": "Pod",
@@ -124,7 +124,7 @@ func TestRESTgetAttrs(t *testing.T) {
"Reason": "forTesting", "Reason": "forTesting",
} }
if e, a := expect, field; !reflect.DeepEqual(e, a) { if e, a := expect, field; !reflect.DeepEqual(e, a) {
t.Errorf("diff: %s", runtime.ObjectDiff(e, a)) t.Errorf("diff: %s", util.ObjectDiff(e, a))
} }
} }
@@ -194,7 +194,7 @@ func TestRESTList(t *testing.T) {
Items: []api.Event{*eventA, *eventB}, Items: []api.Event{*eventA, *eventB},
} }
if e, a := expect, got; !reflect.DeepEqual(e, a) { if e, a := expect, got; !reflect.DeepEqual(e, a) {
t.Errorf("diff: %s", runtime.ObjectDiff(e, a)) t.Errorf("diff: %s", util.ObjectDiff(e, a))
} }
} }
@@ -221,6 +221,6 @@ func TestRESTWatch(t *testing.T) {
}() }()
got := <-wi.ResultChan() got := <-wi.ResultChan()
if e, a := eventA, got.Object; !reflect.DeepEqual(e, a) { if e, a := eventA, got.Object; !reflect.DeepEqual(e, a) {
t.Errorf("diff: %s", runtime.ObjectDiff(e, a)) t.Errorf("diff: %s", util.ObjectDiff(e, a))
} }
} }

View File

@@ -209,7 +209,7 @@ func TestEtcdCreate(t *testing.T) {
} }
if e, a := item.expect, fakeClient.Data[path]; !reflect.DeepEqual(e, a) { if e, a := item.expect, fakeClient.Data[path]; !reflect.DeepEqual(e, a) {
t.Errorf("%v:\n%s", name, runtime.ObjectDiff(e, a)) t.Errorf("%v:\n%s", name, util.ObjectDiff(e, a))
} }
} }
} }
@@ -284,7 +284,7 @@ func TestEtcdUpdate(t *testing.T) {
} }
if e, a := item.expect, fakeClient.Data[path]; !reflect.DeepEqual(e, a) { if e, a := item.expect, fakeClient.Data[path]; !reflect.DeepEqual(e, a) {
t.Errorf("%v:\n%s", name, runtime.ObjectDiff(e, a)) t.Errorf("%v:\n%s", name, util.ObjectDiff(e, a))
} }
} }
} }
@@ -340,7 +340,7 @@ func TestEtcdGet(t *testing.T) {
} }
if e, a := item.expect, got; !reflect.DeepEqual(e, a) { if e, a := item.expect, got; !reflect.DeepEqual(e, a) {
t.Errorf("%v:\n%s", name, runtime.ObjectDiff(e, a)) t.Errorf("%v:\n%s", name, util.ObjectDiff(e, a))
} }
} }
} }
@@ -396,7 +396,7 @@ func TestEtcdDelete(t *testing.T) {
} }
if e, a := item.expect, fakeClient.Data[path]; !reflect.DeepEqual(e, a) { if e, a := item.expect, fakeClient.Data[path]; !reflect.DeepEqual(e, a) {
t.Errorf("%v:\n%s", name, runtime.ObjectDiff(e, a)) t.Errorf("%v:\n%s", name, util.ObjectDiff(e, a))
} }
} }
} }
@@ -432,6 +432,6 @@ func TestEtcdWatch(t *testing.T) {
} }
if e, a := podA, got.Object; !reflect.DeepEqual(e, a) { if e, a := podA, got.Object; !reflect.DeepEqual(e, a) {
t.Errorf("difference: %s", runtime.ObjectDiff(e, a)) t.Errorf("difference: %s", util.ObjectDiff(e, a))
} }
} }