From d3d9f7ac8bfda807e2b5bf8a5043a273ee033b49 Mon Sep 17 00:00:00 2001 From: Daniel Smith Date: Thu, 9 Oct 2014 15:55:15 -0700 Subject: [PATCH] ObjectDiff moved after rebase --- pkg/registry/event/registry_test.go | 3 ++- pkg/registry/event/rest_test.go | 14 +++++++------- pkg/registry/generic/etcd_test.go | 10 +++++----- 3 files changed, 14 insertions(+), 13 deletions(-) diff --git a/pkg/registry/event/registry_test.go b/pkg/registry/event/registry_test.go index fa60b9d5297..db08b7e0bcc 100644 --- a/pkg/registry/event/registry_test.go +++ b/pkg/registry/event/registry_test.go @@ -26,6 +26,7 @@ import ( "github.com/GoogleCloudPlatform/kubernetes/pkg/registry/generic" "github.com/GoogleCloudPlatform/kubernetes/pkg/runtime" "github.com/GoogleCloudPlatform/kubernetes/pkg/tools" + "github.com/GoogleCloudPlatform/kubernetes/pkg/util" "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) { - t.Errorf("%v:\n%s", name, runtime.ObjectDiff(e, a)) + t.Errorf("%v:\n%s", name, util.ObjectDiff(e, a)) } } } diff --git a/pkg/registry/event/rest_test.go b/pkg/registry/event/rest_test.go index 9bb1b0c67c9..84c42727c9d 100644 --- a/pkg/registry/event/rest_test.go +++ b/pkg/registry/event/rest_test.go @@ -24,7 +24,7 @@ import ( "github.com/GoogleCloudPlatform/kubernetes/pkg/api/testapi" "github.com/GoogleCloudPlatform/kubernetes/pkg/labels" "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" ) @@ -48,7 +48,7 @@ func TestRESTCreate(t *testing.T) { t.Fatalf("Unexpected error %v", err) } 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) } 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) } 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{ "InvolvedObject.Kind": "Pod", @@ -124,7 +124,7 @@ func TestRESTgetAttrs(t *testing.T) { "Reason": "forTesting", } 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}, } 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() 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)) } } diff --git a/pkg/registry/generic/etcd_test.go b/pkg/registry/generic/etcd_test.go index 52571776b74..f34eeeaca05 100644 --- a/pkg/registry/generic/etcd_test.go +++ b/pkg/registry/generic/etcd_test.go @@ -209,7 +209,7 @@ func TestEtcdCreate(t *testing.T) { } 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) { - 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) { - 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) { - 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) { - t.Errorf("difference: %s", runtime.ObjectDiff(e, a)) + t.Errorf("difference: %s", util.ObjectDiff(e, a)) } }