Skip to content

test: raise coverage to ~83%#23

Merged
mastermanas805 merged 1 commit into
masterfrom
coverage/raise-to-95
May 21, 2026
Merged

test: raise coverage to ~83%#23
mastermanas805 merged 1 commit into
masterfrom
coverage/raise-to-95

Conversation

@mastermanas805
Copy link
Copy Markdown
Member

Summary

  • 9 new test files cover crypto/jwt (sign/verify roundtrip + bad-secret + future-iat + wrong-alg + typed-error Unwrap), crypto/fingerprint (IPv4 /24 collision, IPv6 /48, AS-prefix stripping), crypto/token (GenerateAPIKey prefix + uniqueness + ErrTokenGenerate), crypto/aes error-type wrapping + bad-key-len.
  • queueprovider/kafka, rabbitmq, legacyopen subpackages — every method on each skeleton (Name, Capabilities, builder defaults, IssueTenantCredentials, RevokeTenantCredentials no-op + error paths). All three now at 100%.
  • resourcetype: ToProto/FromProto for all 3 enum members + unknown roundtrip — now at 100%.
  • plans: StorageLimitMB / ConnectionsLimit / TeamMemberLimit / ThroughputLimit / Vault / Backup / QueueCount / CustomDomain / Promotions / CanonicalTier accessors (the 0%-line block in the prior coverage report).

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
  • All tests pass; queueprovider/kafka/legacyopen/rabbitmq and resourcetype now 100% covered
  • No production source modified — only _test.go additions

🤖 Generated with Claude Code

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>
@mastermanas805 mastermanas805 merged commit 5cb47ae into master May 21, 2026
9 checks passed
@mastermanas805 mastermanas805 deleted the coverage/raise-to-95 branch May 21, 2026 19:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant