test(settings): hit canonical /api/v1/invoices in module-gate tests #215

Merged
David merged 2 commits from chore/checks-workflow-986a08ef into main 2026-06-14 00:15:52 +02:00
Owner

The PMS-113 module-gate tests (disabled_module_returns_404_on_route_access, enabled_module_response_unchanged) probed /api/v1/billing/invoices, which is not a registered route. The billing router merges its paths flat (/invoices, /payments, ...) so the canonical invoices surface is /api/v1/invoices, as exercised by tests/billing.rs and tests/audit_hooks.rs. The bogus /billing/ prefix never matched a route, so every request fell through to the API fallback HTML and returned 404 regardless of module-gate state. That made the "enabled module must serve 200" assertions fail and made the "disabled module must 404" assertion pass for the wrong reason (fallback, not the RequireBilling gate). Pointing all four GETs at /api/v1/invoices exercises the RequireBilling extractor as intended: 200 when billing is enabled, 404 from the gate when disabled.

#PMS-282

The PMS-113 module-gate tests (disabled_module_returns_404_on_route_access, enabled_module_response_unchanged) probed /api/v1/billing/invoices, which is not a registered route. The billing router merges its paths flat (/invoices, /payments, ...) so the canonical invoices surface is /api/v1/invoices, as exercised by tests/billing.rs and tests/audit_hooks.rs. The bogus /billing/ prefix never matched a route, so every request fell through to the API fallback HTML and returned 404 regardless of module-gate state. That made the "enabled module must serve 200" assertions fail and made the "disabled module must 404" assertion pass for the wrong reason (fallback, not the RequireBilling gate). Pointing all four GETs at /api/v1/invoices exercises the RequireBilling extractor as intended: 200 when billing is enabled, 404 from the gate when disabled. #PMS-282
test(settings): hit canonical /api/v1/invoices in module-gate tests
Some checks failed
E2E / Playwright against staging (pull_request) Failing after 42s
Check / fmt + clippy + compile + tests (pull_request) Successful in 4m23s
6678777b6f
The PMS-113 module-gate tests (disabled_module_returns_404_on_route_access, enabled_module_response_unchanged) probed /api/v1/billing/invoices, which is not a registered route. The billing router merges its paths flat (/invoices, /payments, ...) so the canonical invoices surface is /api/v1/invoices, as exercised by tests/billing.rs and tests/audit_hooks.rs. The bogus /billing/ prefix never matched a route, so every request fell through to the API fallback HTML and returned 404 regardless of module-gate state. That made the "enabled module must serve 200" assertions fail and made the "disabled module must 404" assertion pass for the wrong reason (fallback, not the RequireBilling gate). Pointing all four GETs at /api/v1/invoices exercises the RequireBilling extractor as intended: 200 when billing is enabled, 404 from the gate when disabled.

#PMS-282
Merge origin/main into chore/checks-workflow-986a08ef
Some checks failed
E2E / Playwright against staging (pull_request) Failing after 24s
Check / fmt + clippy + compile + tests (pull_request) Successful in 4m16s
Create release / Create release from merged PR (pull_request) Has been skipped
258450c75e
#PMS-282
David merged commit 02c630084c into main 2026-06-14 00:15:52 +02:00
David deleted branch chore/checks-workflow-986a08ef 2026-06-14 00:15:52 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
psa-systems/mokosh-server!215
No description provided.