ocsp: fix test on TZ=UTC systems
If the system is using UTC, then time.Now().loc != time.UTC().loc, so it should not use reflect.DeepEqual to compare two times. While we're here, also fix some copy-paste errors. Change-Id: I1fef5f22f5b5eb978746d2695a1b43f153e4a408 Reviewed-on: https://go-review.googlesource.com/10335 Reviewed-by: Adam Langley <agl@golang.org>
This commit is contained in:
committed by
Adam Langley
parent
644910e6da
commit
ce6bda6918
+3
-3
@@ -194,11 +194,11 @@ func TestOCSPResponse(t *testing.T) {
|
||||
}
|
||||
|
||||
if !reflect.DeepEqual(resp.RevokedAt, template.RevokedAt) {
|
||||
t.Errorf("resp.NextUpdate: got %d, want %d", resp.NextUpdate, template.NextUpdate)
|
||||
t.Errorf("resp.RevokedAt: got %d, want %d", resp.RevokedAt, template.RevokedAt)
|
||||
}
|
||||
|
||||
if !reflect.DeepEqual(resp.ProducedAt, producedAt) {
|
||||
t.Errorf("resp.NextUpdate: got %d, want %d", resp.NextUpdate, template.NextUpdate)
|
||||
if !resp.ProducedAt.Equal(producedAt) {
|
||||
t.Errorf("resp.ProducedAt: got %d, want %d", resp.ProducedAt, producedAt)
|
||||
}
|
||||
|
||||
if resp.Status != template.Status {
|
||||
|
||||
Reference in New Issue
Block a user