Skip to content

test(coverage): drive providers/queue to 100% (was 75%)#154

Merged
mastermanas805 merged 1 commit into
masterfrom
coverage/api-providers-queue-95
May 22, 2026
Merged

test(coverage): drive providers/queue to 100% (was 75%)#154
mastermanas805 merged 1 commit into
masterfrom
coverage/api-providers-queue-95

Conversation

@mastermanas805
Copy link
Copy Markdown
Member

Summary

  • Drives internal/providers/queue coverage from 75.0% → 100% (missed by the earlier providers swarm which did db/cache/nosql only).
  • Provision was only 42.9% covered — the happy path and the unhealthy-status branch previously required a real NATS pod.
  • Adds a minimal monitorHealthURL package-var seam (defaults to the real http://{host}:8222/healthz form) so tests can point at an httptest.Server.

New test coverage

  • Provision happy path (both auth_mode arms: pro + anonymous/legacy_open)
  • Unhealthy-status (non-200) branch
  • Build-request error branch (malformed monitor URL)
  • Conn-refused branch (closed port)
  • Existing subjident + deprovision tests remain green

Test plan

  • go test ./internal/providers/queue -coverprofile -count=1 -p 1 → 100.0%
  • go vet + go build clean
  • no-filter total verified ≥ 95%

🤖 Generated with Claude Code

Provision was only 42.9% covered — the happy path and the
unhealthy-status branch needed a real NATS pod to exercise. Add a
minimal monitorHealthURL package-var seam (defaults to the real
:8222/healthz form) so tests point at an httptest.Server and cover:
provision happy path (both auth_mode arms), unhealthy-status,
build-request error, and conn-refused. Package now 100%.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@mastermanas805 mastermanas805 merged commit 06f8202 into master May 22, 2026
10 of 11 checks passed
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