Repository navigation
test(testcerts): cover NewKeyPair default SANs - Testing Hunter - #38
github-actions[bot] wants to merge 1 commit into
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Important Review skippedBot user detected. To trigger a single review, invoke the
|
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are blocking approval.
No open issues 🎉
What changed in this PR
Adds regression tests for the NewKeyPair subject alternative name (SAN) behavior documented in #36, without changing production code.
Changes:
- Verifies that no domains produces
localhost,127.0.0.1, and::1. - Verifies that explicit domains are preserved without adding default IP addresses.
| File | Description |
|---|---|
testcerts_test.go |
Adds TestNewKeyPairSANs covering default and explicit-domain certificate SANs. |
Review effort: Balanced
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #38 +/- ##
=======================================
Coverage 82.11% 82.11%
=======================================
Files 3 3
Lines 218 218
=======================================
Hits 179 179
Misses 21 21
Partials 18 18 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Adds
TestNewKeyPairSANs, protecting the documentedNewKeyPaircontract (recently documented in #36): no domains yieldslocalhost,127.0.0.1,::1; explicit domains yield no default IPs. Previously no test asserted the actual SANs.Evidence: removing
"::1"from the default config makes the new test fail; restored, it passes.Validation:
gofmt -l .(clean),go vet ./...,go test -race -run TestNewKeyPairSANs -count=3 .,go test ./...all pass.