Use util.Time consistently in types.go

This commit is contained in:
Jordan Liggitt
2014-12-10 17:00:41 -05:00
parent a299287ae8
commit 51bfb50698
8 changed files with 29 additions and 47 deletions

View File

@@ -23,7 +23,6 @@ import (
"reflect"
"strconv"
"testing"
"time"
"github.com/GoogleCloudPlatform/kubernetes/pkg/api"
"github.com/GoogleCloudPlatform/kubernetes/pkg/api/latest"
@@ -137,14 +136,6 @@ var apiObjectFuzzer = fuzz.New().NilChance(.5).NumElements(1, 1).Funcs(
c.RandString(): c.RandString(),
}
},
func(t *time.Time, c fuzz.Continue) {
// This is necessary because the standard fuzzed time.Time object is
// completely nil, but when JSON unmarshals dates it fills in the
// unexported loc field with the time.UTC object, resulting in
// reflect.DeepEqual returning false in the round trip tests. We solve it
// by using a date that will be identical to the one JSON unmarshals.
*t = time.Date(2000, 1, 1, 1, 1, 1, 0, time.UTC)
},
)
func runTest(t *testing.T, codec runtime.Codec, source runtime.Object) {