|
|
@@ -225,7 +225,6 @@ func TestOCSPResponse(t *testing.T) {
|
|
|
},
|
|
|
}
|
|
|
|
|
|
- producedAt := time.Now().Truncate(time.Minute)
|
|
|
thisUpdate := time.Date(2010, 7, 7, 15, 1, 5, 0, time.UTC)
|
|
|
nextUpdate := time.Date(2010, 7, 7, 18, 35, 17, 0, time.UTC)
|
|
|
template := Response{
|
|
|
@@ -284,8 +283,9 @@ func TestOCSPResponse(t *testing.T) {
|
|
|
t.Errorf("resp.Extensions: got %v, want %v", resp.Extensions, template.ExtraExtensions)
|
|
|
}
|
|
|
|
|
|
- if !resp.ProducedAt.Equal(producedAt) {
|
|
|
- t.Errorf("resp.ProducedAt: got %d, want %d", resp.ProducedAt, producedAt)
|
|
|
+ delay := time.Since(resp.ProducedAt)
|
|
|
+ if delay < -time.Hour || delay > time.Hour {
|
|
|
+ t.Errorf("resp.ProducedAt: got %s, want close to current time (%s)", resp.ProducedAt, time.Now())
|
|
|
}
|
|
|
|
|
|
if resp.Status != template.Status {
|