Commit 418ee04d authored by Geoff Simmons's avatar Geoff Simmons

Use Equal() for time.Time comparisons in unit test code.

parent 6e40f025
......@@ -240,7 +240,7 @@ func TestFQVersion(t *testing.T) {
}
if created, err := time.Parse(RFC3339Micro, versionSlice[3]); err != nil {
t.Fatal("FQVersion(): cannot parse timestamp", err)
} else if testSpec.Created != created {
} else if !testSpec.Created.Equal(created) {
t.Fatalf("FQVersion(): timestamp != Spec.Created (%s) "+
"got %s want %s", versionSlice[3], testSpec.Created,
created)
......@@ -262,7 +262,7 @@ func TestFQVersion(t *testing.T) {
versionSlice = strings.SplitN(fqVersion, "-", 3)
if created, err := time.Parse(RFC3339Micro, versionSlice[2]); err != nil {
t.Fatal("FQVersion(): cannot parse timestamp", err)
} else if noversionSpec.Created != created {
} else if !noversionSpec.Created.Equal(created) {
t.Fatal("FQVersion(): timestamp != Spec.Created", fqVersion)
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment