Repository navigation
test: give the hardening grab-bags subject-named homes - #50
Merged
Merged
Conversation
hardening_test.go and hardening3_test.go were named after the PRs that
produced them, not what they cover — and the 3 had no 2, so the numbering
told the reader nothing. Every other test file in the package is named for
its subject (bodycap, listmemo, tenant_visibility), which is what makes a
failing test name locatable.
The 13 tests move to the files that already own their subject:
security_test.go host/origin validation tables, the malformed-port
rebinding case, and -32041 redaction
health_test.go (new) fan-out single-flight, cache invalidation across
reload, and the /healthz removal record
discovery_test.go redirect refusal and poll-interval clamp
ema_test.go token-exchange audit
loadbalance_test.go bounded failover walk
ssehang_test.go idle-timeout body
listen_test.go orphaned subscription reaped
readAuditEvents moves to gateway_test.go alongside the other shared
fixtures — bodycap_test.go already depended on it across files, so it was
never hardening3's to hold. getString goes to health_test.go, its only
caller.
Test bodies are unchanged; this is a move, not a rewrite.
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
hardening_test.goandhardening3_test.gowere named after the PRs that produced them, not what they cover — and the3had no2, so the numbering told the reader nothing. Every other test file in the package is named for its subject (bodycap,listmemo,tenant_visibility), which is what makes a failing test name locatable.The 13 tests move to the files that already own their subject:
security_test.go-32041redactionhealth_test.go(new)/healthzremoval recorddiscovery_test.goema_test.goloadbalance_test.gossehang_test.golisten_test.goreadAuditEventsmoves togateway_test.goalongside the other shared fixtures —bodycap_test.goalready depended on it across files, so it was neverhardening3's to hold.getStringgoes tohealth_test.go, its only caller.Test bodies are unchanged; this is a move, not a rewrite. No production code is touched.
Verification
go test ./... -race— all 14 packages passgo vet ./gateway,gofmt -l .,go mod tidy -diff— cleanmake lintnot run locally (golangci-lintnot installed on this machine); CI covers it🤖 Generated with Claude Code