Skip to content

test(queue): drive NATS provisioner backend to 96.8% coverage#23

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

test(queue): drive NATS provisioner backend to 96.8% coverage#23
mastermanas805 merged 1 commit into
masterfrom
coverage/prov-backend-queue-95

Conversation

@mastermanas805
Copy link
Copy Markdown
Member

Summary

  • Add unit/integration tests for provisioner/internal/backend/queue (NATS), raising statement coverage from 24% to 96.8% (≥95% target met).
  • Cover the isolated dedicated-pod provisioning ladder (namespace + networkpolicy + quota + PVC + deployment + service + wait-ready), legacy NodePort URL fallback, public-host proxy URL shape, deprovision, every rollback branch, route-registry wiring, and the local shared-cluster path.
  • Introduce minimal interface seams so no real kube-apiserver or nats-server is needed: K8sBackend.cs is now kubernetes.Interface (fake clientset injection, mirroring redis/k8s.go), and LocalBackend.monitorPort is configurable for httptest.

Test plan

  • go build ./... clean
  • go vet ./internal/backend/queue clean
  • go test ./internal/backend/queue -coverprofile=cov.out -count=1 -p 1 → 96.8%
  • Rebased on latest origin/master, retested green

🤖 Generated with Claude Code

Add unit/integration tests for the provisioner NATS queue backend covering
the isolated dedicated-pod provisioning ladder, legacy NodePort URL fallback,
deprovision, every rollback branch, and the local shared-cluster path.

Introduce interface seams (kubernetes.Interface on K8sBackend, configurable
monitorPort on LocalBackend) so the fake clientset and an httptest server can
be injected without a real kube-apiserver or NATS server.

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