From 12553c9b918c8b872a13189f740098c555b8a29b Mon Sep 17 00:00:00 2001 From: CJ Cullen Date: Tue, 30 Jun 2015 16:43:33 -0700 Subject: [PATCH 1/3] Fix errors test --- pkg/api/errors/errors_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/api/errors/errors_test.go b/pkg/api/errors/errors_test.go index b950e329ec4..78c6d01fe67 100644 --- a/pkg/api/errors/errors_test.go +++ b/pkg/api/errors/errors_test.go @@ -149,7 +149,7 @@ func TestNewInvalid(t *testing.T) { } for i, testCase := range testCases { vErr, expected := testCase.Err, testCase.Details - expected.Causes[0].Message = vErr.Error() + expected.Causes[0].Message = vErr.ErrorBody() err := NewInvalid("kind", "name", fielderrors.ValidationErrorList{vErr}) status := err.(*StatusError).ErrStatus if status.Code != 422 || status.Reason != api.StatusReasonInvalid { From 2a803769fc666bdddf6b4f91504c1c90b7569310 Mon Sep 17 00:00:00 2001 From: CJ Cullen Date: Tue, 30 Jun 2015 17:01:15 -0700 Subject: [PATCH 2/3] Fix gofmt in replication_controller_test.go --- pkg/controller/replication_controller_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/controller/replication_controller_test.go b/pkg/controller/replication_controller_test.go index f7f49a76993..c0ba80d8eea 100644 --- a/pkg/controller/replication_controller_test.go +++ b/pkg/controller/replication_controller_test.go @@ -1136,7 +1136,7 @@ func TestOverlappingRCs(t *testing.T) { controllers = append(controllers, controllerSpec) } shuffledControllers := shuffle(controllers) - for j, _ := range shuffledControllers { + for j := range shuffledControllers { manager.controllerStore.Store.Add(shuffledControllers[j]) } // Add a pod and make sure only the oldest rc is synced From 0e2be0d320273c2d5b70ee749c6e8b0340202b20 Mon Sep 17 00:00:00 2001 From: CJ Cullen Date: Tue, 30 Jun 2015 17:08:27 -0700 Subject: [PATCH 3/3] Fix record tests --- pkg/client/record/event_test.go | 2 +- pkg/client/record/events_cache_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/client/record/event_test.go b/pkg/client/record/event_test.go index 0fac709f3cf..1f5dd714572 100644 --- a/pkg/client/record/event_test.go +++ b/pkg/client/record/event_test.go @@ -316,7 +316,7 @@ func validateEvent(actualEvent *api.Event, expectedEvent *api.Event, t *testing. if actualEvent.FirstTimestamp.IsZero() || actualEvent.LastTimestamp.IsZero() { t.Errorf("timestamp wasn't set: %#v", *actualEvent) } - if actualEvent.FirstTimestamp.Equal(actualEvent.LastTimestamp.Time) { + if actualEvent.FirstTimestamp.Equal(actualEvent.LastTimestamp) { if expectCompression { t.Errorf("FirstTimestamp (%q) and LastTimestamp (%q) must be equal to indicate only one occurance of the event, but were different. Actual Event: %#v", actualEvent.FirstTimestamp, actualEvent.LastTimestamp, *actualEvent) } diff --git a/pkg/client/record/events_cache_test.go b/pkg/client/record/events_cache_test.go index 3adbd9cf44b..de1e37b092d 100644 --- a/pkg/client/record/events_cache_test.go +++ b/pkg/client/record/events_cache_test.go @@ -173,7 +173,7 @@ func compareEventWithHistoryEntry(expected *api.Event, actual *history, t *testi t.Fatalf("There should be one existing instance of this event in the hash table.") } - if !actual.FirstTimestamp.Equal(expected.FirstTimestamp.Time) { + if !actual.FirstTimestamp.Equal(expected.FirstTimestamp) { t.Fatalf("Unexpected FirstTimestamp. Expected: <%v> Actual: <%v>", expected.FirstTimestamp, actual.FirstTimestamp) }