test(coverage): drive providers/queue to 100% (was 75%)#154
Merged
Conversation
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>
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/providers/queuecoverage from 75.0% → 100% (missed by the earlier providers swarm which did db/cache/nosql only).Provisionwas only 42.9% covered — the happy path and the unhealthy-status branch previously required a real NATS pod.monitorHealthURLpackage-var seam (defaults to the realhttp://{host}:8222/healthzform) so tests can point at anhttptest.Server.New test coverage
Test plan
go test ./internal/providers/queue -coverprofile -count=1 -p 1→ 100.0%go vet+go buildclean🤖 Generated with Claude Code