test(jobs): quota/storage job coverage to 97.4% aggregate#52
Merged
Conversation
Adds quota_coverage_test.go covering the suspend/unsuspend loop error and edge branches, the per-tenant Redis eviction algorithm (empty-token, scan-error, DEL fail-soft, prefix-violation abort, coldest-first delete), the quota-wall-nudge axis/query-error/scan-error paths, and the quota_infra mongo connect/RunCommand fail-open plus success arm. Per-file: quota.go 100%, quota_redis_eviction.go 96.6%, quota_wall_nudge.go 98.2%, storage.go 98.3%, storage_minio.go 96.4%, quota_infra.go 93.5% — aggregate 97.4%. The residual quota_infra.go lines are provably unreachable defensive guards (duplicate-token identifier validation; lib/pq's lazy sql.Open never erroring at Open time). 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
internal/jobs/quota_coverage_test.godriving the 6 quota/storage job files to ≥95% (aggregate 97.4%).sql.Openthat never errors at Open time.Test plan
go build ./...+go vet ./internal/jobs/cleango test ./internal/jobs -count=1 -p 1green (Docker pg/redis/mongo on 127.0.0.1; the unrelatedTestPropagation_ForUpdateSkipLockedIntegrationis pre-existing and gated on a seededTEST_DATABASE_URL)🤖 Generated with Claude Code