Commit 92996a1
authored
test: add E2E test suite for Phase 2 reconciliation features (#919)
Add 13 integration tests covering all Phase 2 features:
Balance assertion via gRPC:
- Balanced case (PASSED status, no imbalance event)
- Imbalanced case (FAILED status, imbalance event, trend tracking)
- Invalid input validation (bad balance, bad UUID)
- Run-linked assertion
Kafka event publishing:
- Full pipeline with event verification
- Noop publisher mode (disabled Kafka)
Full pipeline with valuation:
- Detect -> value -> finalize lifecycle
- Valuation engine failure and retry
- Multi-instrument reconciliation (3 instruments, 2 variances)
PAUSE/RESUME control actions:
- Full pause/resume cycle with checkpoint preservation
- Invalid state transitions (pause pending, resume pending, resume cancelled)
- Cancel from paused state
Cross-feature integration:
- Pipeline + assertion + events combined
Infrastructure changes:
- Add last_completed_phase column to settlement_run DDL
- Add LastCompletedPhase field to GORM entity and mappings
- Set MaxOpenConns(1) to prevent search_path loss on pool connections
Co-authored-by: Ben Coombs <bjcoombs@users.noreply.github.com>1 parent 6963127 commit 92996a1
3 files changed
Lines changed: 777 additions & 23 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
83 | 90 | | |
84 | 91 | | |
85 | 92 | | |
| |||
221 | 228 | | |
222 | 229 | | |
223 | 230 | | |
| 231 | + | |
224 | 232 | | |
225 | 233 | | |
226 | 234 | | |
| |||
0 commit comments