test: raise coverage to ~83%#23
Merged
Merged
Conversation
Adds 9 test files covering:
- crypto/aes: ErrEncrypt/ErrDecrypt Error+Unwrap, bad-key-len rejection
- crypto/jwt: SignJWT/VerifyJWT roundtrip + bad-secret + malformed +
future-iat + wrong-alg guard; SignOnboardingJWT/VerifyOnboardingJWT
roundtrip + jti + 7d expiry + future-iat
- crypto/fingerprint: Fingerprint IPv4 /24 collision, IPv6 /48,
FingerprintIP AS-prefix stripping, ParseIP error path
- crypto/token: GenerateAPIKey prefix + uniqueness, ErrTokenGenerate
- queueprovider/kafka: name, caps, default-host, ErrNotImplemented,
revoke no-op on empty keyID + error on non-empty
- queueprovider/rabbitmq: name, caps, ErrNotImplemented, revoke no-op
- queueprovider/legacyopen: name, all-false caps, builder defaults +
honoring explicit config, IssueTenantCredentials AuthMode=legacy_open
+ empty-token error, Revoke is no-op
- resourcetype: ToProto/FromProto for all 3 known types + unknown roundtrip
- plans: StorageLimitMB (all services + unknown), ConnectionsLimit,
TeamMemberLimit defaults, ThroughputLimit, CustomDomainsAllowed/Max,
Vault/DeployLimits, QueueCountLimit, Backup accessors,
Promotions/PriceMonthly/DisplayName/IsDedicatedTier/BillingPeriod,
CanonicalTier yearly-suffix stripping
Coverage: 66.9% -> 83.3%. Remaining gap is queueprovider/nats which is
mostly network-bound NATS server interaction (covered partially by the
contract test), and storageprovider/{dospaces,r2,s3} which require live
S3 credential signing paths.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
Summary
Coverage: 66.9% → 83.3%. Remaining gap is queueprovider/nats (live NATS server interaction, only the contract test exercises it without a server) and storageprovider/{dospaces,r2,s3} which need live S3-compatible signing paths.
Test plan
go test ./... -short -coverprofile=cov.out -covermode=atomic_test.goadditions🤖 Generated with Claude Code