Commit 6062e8e
committed
fix(dcv): run post-DCV issuance wait when DCV is already validated
Closes the cached-DCV gap surfaced during live testing on the new sandbox:
when CERTInext has cached a prior DCV validation for the parent domain (e.g.
scrup.org used across many test runs), the plugin's TrackOrder check sees
domainVerification already in a validated state and PerformDcvIfNeededAsync
used to return false ("skipped"). That left WaitForIssuanceAfterDcvAsync
unreachable, so Enroll() returned a pending result even though CERTInext
was about to generate the cert within seconds — forcing the gateway to wait
for the next sync cycle.
Changes:
- PerformDcvIfNeededAsync now returns true when DCV is functionally done,
defined as either (a) the aggregate domainVerification.Status == "1"
OR (b) every per-domain dcvStatus == "1" (the per-domain field has been
observed flipping to validated slightly before the parent aggregate).
- WaitForIssuanceAfterDcvAsync short-circuits when its budget <= 0,
avoiding a wasted GetCertificate call and keeping Strict-mock unit tests
that intentionally disable the wait passing without re-wiring mocks.
- Rename dcvRan -> dcvDone at the three call sites (EnrollNewAsync,
Synchronize, GetSingleRecord) to reflect the new "DCV is done, by us or
CERTInext" semantics.
Tests:
- Rename Dcv_Skipped_WhenAllDomainsAlreadyValidated to
Dcv_SkipsStaging_AndDoesNotIssuancePoll_WhenAllDomainsAlreadyValidated_AndIssuanceBudgetZero
and assert GetCertificateAsync is never called in that path.
- Add Dcv_RunsIssuanceWait_WhenDcvAlreadyValidated_AndIssuanceBudgetPositive
pinning the new cached-DCV happy path (pending then issued via the
issuance poll).
- Bump issuance budget on Dcv_HappyPath_* and
Dcv_WaitsForChallenge_WhenDomainVerificationAppearsLate so they continue
to exercise the post-DCV fetch.
137/137 unit tests pass.1 parent 6a2db50 commit 6062e8e
2 files changed
Lines changed: 103 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
116 | 116 | | |
117 | 117 | | |
118 | 118 | | |
119 | | - | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
120 | 123 | | |
121 | 124 | | |
122 | 125 | | |
| |||
144 | 147 | | |
145 | 148 | | |
146 | 149 | | |
147 | | - | |
| 150 | + | |
| 151 | + | |
148 | 152 | | |
149 | 153 | | |
150 | 154 | | |
| |||
211 | 215 | | |
212 | 216 | | |
213 | 217 | | |
214 | | - | |
| 218 | + | |
215 | 219 | | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
216 | 223 | | |
217 | 224 | | |
218 | 225 | | |
| |||
239 | 246 | | |
240 | 247 | | |
241 | 248 | | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
242 | 297 | | |
243 | 298 | | |
244 | 299 | | |
| |||
484 | 539 | | |
485 | 540 | | |
486 | 541 | | |
| 542 | + | |
487 | 543 | | |
488 | 544 | | |
489 | 545 | | |
490 | | - | |
| 546 | + | |
491 | 547 | | |
492 | 548 | | |
493 | 549 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
520 | 520 | | |
521 | 521 | | |
522 | 522 | | |
523 | | - | |
524 | | - | |
| 523 | + | |
| 524 | + | |
525 | 525 | | |
526 | 526 | | |
527 | 527 | | |
| |||
693 | 693 | | |
694 | 694 | | |
695 | 695 | | |
696 | | - | |
697 | | - | |
| 696 | + | |
| 697 | + | |
698 | 698 | | |
699 | 699 | | |
700 | 700 | | |
| |||
823 | 823 | | |
824 | 824 | | |
825 | 825 | | |
826 | | - | |
827 | | - | |
| 826 | + | |
| 827 | + | |
828 | 828 | | |
829 | 829 | | |
830 | 830 | | |
| |||
1149 | 1149 | | |
1150 | 1150 | | |
1151 | 1151 | | |
1152 | | - | |
1153 | | - | |
1154 | | - | |
| 1152 | + | |
| 1153 | + | |
| 1154 | + | |
| 1155 | + | |
| 1156 | + | |
| 1157 | + | |
| 1158 | + | |
| 1159 | + | |
| 1160 | + | |
| 1161 | + | |
| 1162 | + | |
| 1163 | + | |
| 1164 | + | |
| 1165 | + | |
| 1166 | + | |
| 1167 | + | |
| 1168 | + | |
| 1169 | + | |
| 1170 | + | |
| 1171 | + | |
| 1172 | + | |
| 1173 | + | |
| 1174 | + | |
| 1175 | + | |
1155 | 1176 | | |
1156 | 1177 | | |
1157 | 1178 | | |
| |||
1332 | 1353 | | |
1333 | 1354 | | |
1334 | 1355 | | |
| 1356 | + | |
| 1357 | + | |
| 1358 | + | |
| 1359 | + | |
| 1360 | + | |
| 1361 | + | |
| 1362 | + | |
| 1363 | + | |
| 1364 | + | |
| 1365 | + | |
| 1366 | + | |
| 1367 | + | |
| 1368 | + | |
1335 | 1369 | | |
1336 | 1370 | | |
1337 | 1371 | | |
| |||
0 commit comments