Merge pull request #1344 from concourse/pr/fix-conformance-time-comparison
fix bogus conformance failure due to time zones
This commit is contained in:
commit
13a1679892
1 changed files with 14 additions and 0 deletions
|
@ -341,6 +341,20 @@ func testRefreshTokenCRUD(t *testing.T, s storage.Storage) {
|
||||||
t.Errorf("get refresh: %v", err)
|
t.Errorf("get refresh: %v", err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if diff := pretty.Compare(gr.CreatedAt.UnixNano(), gr.CreatedAt.UnixNano()); diff != "" {
|
||||||
|
t.Errorf("refresh token created timestamp retrieved from storage did not match: %s", diff)
|
||||||
|
}
|
||||||
|
|
||||||
|
if diff := pretty.Compare(gr.LastUsed.UnixNano(), gr.LastUsed.UnixNano()); diff != "" {
|
||||||
|
t.Errorf("refresh token last used timestamp retrieved from storage did not match: %s", diff)
|
||||||
|
}
|
||||||
|
|
||||||
|
gr.CreatedAt = time.Time{}
|
||||||
|
gr.LastUsed = time.Time{}
|
||||||
|
want.CreatedAt = time.Time{}
|
||||||
|
want.LastUsed = time.Time{}
|
||||||
|
|
||||||
if diff := pretty.Compare(want, gr); diff != "" {
|
if diff := pretty.Compare(want, gr); diff != "" {
|
||||||
t.Errorf("refresh token retrieved from storage did not match: %s", diff)
|
t.Errorf("refresh token retrieved from storage did not match: %s", diff)
|
||||||
}
|
}
|
||||||
|
|
Reference in a new issue