Skip to content

test(certtest): make TestCertRotation actually verify hot cert reload#3169

Merged
miparnisari merged 1 commit into
authzed:mainfrom
ivanauth:fix/issue-3164-cert-rotation-test
Jun 11, 2026
Merged

test(certtest): make TestCertRotation actually verify hot cert reload#3169
miparnisari merged 1 commit into
authzed:mainfrom
ivanauth:fix/issue-3164-cert-rotation-test

Conversation

@ivanauth

Copy link
Copy Markdown
Contributor

Description

TestCertRotation passed even with updateCachedCertificate disabled: it
reused a single connection for all post-rotation requests, and TLS never
renegotiates mid-connection, so the test could never observe whether the
server was presenting the rotated cert.

Rewrite uses VerifyConnection on fresh per-dial ClientConns to assert
the server presents the rotated certificate serial after reload.

Closes #3164

@ivanauth ivanauth requested a review from a team as a code owner June 10, 2026 19:16
@github-actions github-actions Bot added the area/tooling Affects the dev or user toolchain (e.g. tests, ci, build tools) label Jun 10, 2026
@codecov

codecov Bot commented Jun 10, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

The old test reused a single connection post-rotation; TLS never
renegotiates, so it passed even with updateCachedCertificate disabled.

Rewrite uses VerifyConnection on fresh per-dial ClientConns to assert
the server presents the rotated certificate serial after reload.
@miparnisari miparnisari force-pushed the fix/issue-3164-cert-rotation-test branch from 7cd4405 to c43fb70 Compare June 11, 2026 22:36
@miparnisari miparnisari merged commit fd5d8a7 into authzed:main Jun 11, 2026
44 of 45 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 11, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area/tooling Affects the dev or user toolchain (e.g. tests, ci, build tools) Skip-Changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

TestCertRotation is not useful

2 participants