@@ -61,7 +61,7 @@ func TestVerificationPolicyInherit(t *testing.T) {
6161 required := true
6262 global := & verificationPolicy {
6363 tolerance : new (2 * time.Second ),
64- maxAge : 30 * time .Second ,
64+ maxAge : new ( 30 * time.Second ) ,
6565 identifiers : globalIDs ,
6666 reqCreatedTS : & required ,
6767 reqExpiresTS : & required ,
@@ -74,7 +74,7 @@ func TestVerificationPolicyInherit(t *testing.T) {
7474 t .Run ("inherits global configuration" , func (t * testing.T ) {
7575 t .Parallel ()
7676
77- local := & verificationPolicy {maxAge : - 1 }
77+ local := & verificationPolicy {}
7878 require .NoError (t , local .inherit (global , "profile" ))
7979
8080 assert .Equal (t , global .tolerance , local .tolerance )
@@ -105,7 +105,7 @@ func TestVerificationPolicyInherit(t *testing.T) {
105105 localBuilder := & AcceptSignatureBuilder {label : "custom" }
106106 local := & verificationPolicy {
107107 tolerance : new (time.Second ),
108- maxAge : 5 * time .Second ,
108+ maxAge : new ( 5 * time.Second ) ,
109109 identifiers : localIDs ,
110110 reqCreatedTS : & created ,
111111 reqExpiresTS : & expires ,
@@ -115,7 +115,8 @@ func TestVerificationPolicyInherit(t *testing.T) {
115115
116116 require .NotNil (t , local .tolerance )
117117 assert .Equal (t , time .Second , * local .tolerance )
118- assert .Equal (t , 5 * time .Second , local .maxAge )
118+ require .NotNil (t , local .maxAge )
119+ assert .Equal (t , 5 * time .Second , * local .maxAge )
119120 assert .Equal (t , localIDs , local .identifiers )
120121 assert .False (t , * local .reqCreatedTS )
121122 assert .False (t , * local .reqExpiresTS )
@@ -140,7 +141,6 @@ func TestVerificationPolicyInherit(t *testing.T) {
140141 t .Run (uc , func (t * testing.T ) {
141142 t .Parallel ()
142143
143- local .maxAge = - 1
144144 require .ErrorIs (t , local .inherit (global , "profile" ), ErrParameter )
145145 })
146146 }
@@ -262,7 +262,7 @@ func TestVerificationPolicyAssertMetadata(t *testing.T) {
262262 }(),
263263 },
264264 exp : verificationPolicy {
265- maxAge : 30 * time .Second ,
265+ maxAge : new ( 30 * time.Second ) ,
266266 reqCreatedTS : & falseVal ,
267267 reqExpiresTS : & falseVal ,
268268 },
@@ -281,7 +281,11 @@ func TestVerificationPolicyAssertMetadata(t *testing.T) {
281281 return params
282282 }(),
283283 },
284- exp : verificationPolicy {reqCreatedTS : & falseVal , reqExpiresTS : & falseVal },
284+ exp : verificationPolicy {
285+ maxAge : new (time.Second ),
286+ reqCreatedTS : & falseVal ,
287+ reqExpiresTS : & falseVal ,
288+ },
285289 assert : func (t * testing.T , err error ) {
286290 t .Helper ()
287291
@@ -377,7 +381,7 @@ func TestVerificationPolicyAssertMetadata(t *testing.T) {
377381
378382 return verificationPolicy {
379383 identifiers : ids ,
380- maxAge : 5 * time .Second ,
384+ maxAge : new ( 5 * time.Second ) ,
381385 }
382386 }(),
383387 assert : func (t * testing.T , err error ) {
0 commit comments