Skip to content

test(ledger): reach full backend coverage#15

Open
roncodes wants to merge 1 commit into
feature/gnu-taler-refund-verificationfrom
feature/server-tests-coverage
Open

test(ledger): reach full backend coverage#15
roncodes wants to merge 1 commit into
feature/gnu-taler-refund-verificationfrom
feature/server-tests-coverage

Conversation

@roncodes

Copy link
Copy Markdown
Member

Summary

  • Add deterministic Pest coverage across Ledger services, gateways, controllers, listeners, models, observers, resources, routes, provider wiring, notifications, and console commands.
  • Cover success, failure, validation, API contract, persistence, webhook, external-provider, and accounting lifecycle behavior without live external dependencies.
  • Correct small production issues exposed by behavior tests, including controller return contracts, chunked transaction backfill, webhook/listener query paths, and testability seams for seeders and command environment reads.
  • Improve the isolated package harness without adding Orchestra, and derive class coverage from per-class statement metrics when Clover omits aggregate covered-class counts.

Coverage

  • Lines: 100.00% (6655/6655)
  • Methods: 100.00% (548/548)
  • Classes: 100.00% (73/73)
  • Raw Clover uncovered statements: 0

Validation

  • composer test:unit — 302 passed
  • XDEBUG_MODE=coverage composer coverage:baseline
  • composer coverage:summary
  • Raw coverage/clover.xml uncovered-statement scan
  • composer lint
  • git diff --check

Covered areas

  • Payment gateway contracts and Stripe, QPay, and GNU Taler success and failure paths
  • Invoice, wallet, payment, ledger, revenue lifecycle, refund verification, and settlement services
  • Internal, public, accounting, gateway, reporting, search, settings, wallet, and webhook controllers
  • Payment/refund listeners, model lifecycle and contracts, observers, notifications, API resources, filters, and route registration
  • Provisioning, repair, overdue invoice, direction backfill, Taler refund/settlement verification, and sandbox commands

Narrow coverage exclusions

  • Purchase-rate observer fallback when the required Fleet-Ops API package class is absent; the package is a required Composer dependency in supported runtime installations.
  • Revenue-lifecycle repair warning when the required Fleet-Ops order class is absent; the same required dependency contract applies.
  • Service-provider guard when the required core template rendering service is absent; supported installations always provide it.
  • Invoice resource generic fallback when resource lookup returns null; core resource lookup always returns a registered resource or FleetbaseResource.

Each exclusion is limited to the unreachable defensive branch and documented inline.

@roncodes
roncodes changed the base branch from main to feature/gnu-taler-refund-verification July 26, 2026 16:30
@roncodes

Copy link
Copy Markdown
Member Author

CI status: the backend/package build and all CodeQL checks pass. The remaining repository-wide build failure is inherited from parent PR #14 and occurs before backend validation in JavaScript lint: addon/components/customer-taler-refund.js:63 and addon/components/gateway/form.js:85 require Prettier-only parenthesis removal. Those files are not part of this stacked PR diff and remain unchanged to preserve the backend-only scope.

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