Commit 86edaee
authored
test: increase current-account coverage targeting lien lifecycle (#1849)
* test: increase current-account coverage targeting lien lifecycle
Add targeted tests for uncovered error paths in lien_lifecycle.go and
lien_helpers.go including: nil/zero/negative amount validation, frozen
account rejection, invalid lien ID parsing, terminated-then-execute and
executed-then-terminate state transitions, default termination reason,
idempotency edge cases (check errors, store errors, corrupt cache data,
delete cleanup errors), atomic valuation input validation, basis drift
detection branches, proto mapping helpers, and bucket-scoped balance
calculations.
* fix: include TenantID in test idempotency key to match ExecuteLien format
The buildTestIdempKey helper was missing TenantID, causing the corrupt
cache data test to not exercise the unmarshal failure branch since the
key would not match what ExecuteLien constructs internally.
---------
Co-authored-by: Ben Coombs <bjcoombs@users.noreply.github.com>1 parent a693fdd commit 86edaee
1 file changed
Lines changed: 749 additions & 0 deletions
0 commit comments