Skip to content

Commit 6e90caa

Browse files
authored
Refactor CA unittests to focus on top-level IssueCertificate (#8422)
Rewrite the vast majority of the CA unittests so that they test the exported functions (NewCertificateAuthorityImpl and IssueCertificate) rather than the non-exported helper functions (issuePrecertificate and issueCertificateForPrecertificate). This makes the tests more robust to future refactoring of the CA code itself, and will increase confidence in the correctness of those refactors. Part of #8390
1 parent 9874dcc commit 6e90caa

File tree

4 files changed

+605
-696
lines changed

4 files changed

+605
-696
lines changed

ca/ca.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ func (ca *certificateAuthorityImpl) issuePrecertificate(ctx context.Context, cer
295295
}
296296

297297
func (ca *certificateAuthorityImpl) IssueCertificate(ctx context.Context, issueReq *capb.IssueCertificateRequest) (*capb.IssueCertificateResponse, error) {
298-
if core.IsAnyNilOrZero(issueReq, issueReq.Csr, issueReq.RegistrationID, issueReq.OrderID) {
298+
if core.IsAnyNilOrZero(issueReq, issueReq.RegistrationID, issueReq.OrderID, issueReq.CertProfileName, issueReq.Csr) {
299299
return nil, berrors.InternalServerError("Incomplete issue certificate request")
300300
}
301301

0 commit comments

Comments
 (0)