test: add comprehensive rollback on inner call failure tests (#1539) - #1704
Merged
Baskarayelu merged 2 commits intoJul 30, 2026
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1539
Summary
Adds comprehensive rollback and compensation tests that supplement the existing signed-flow coverage by exercising the unsigned and fan-out paths.
Changes
New test mocks
mock_unsigned_fail_bill::Contract— bill payment step panics; compensation (reverse) methods succeedmock_unsigned_fail_insurance::Contract— insurance premium step panics; compensation methods succeedNew tests
test_unsigned_rollback_bill_failure_returns_rolled_backRemittanceFlowRolledBacktest_unsigned_rollback_insurance_failure_returns_rolled_backRemittanceFlowRolledBacktest_unsigned_rollback_first_step_fails_no_compensationCrossContractCallFailed(nothing to comp)test_fanout_flow_does_not_compensate_on_bill_failureCrossContractCallFailed(no compensation applied)Testing
Env::default(),mock_all_auths(), etc.)Background
Issue #1539 requested tests for rollback on inner call failure. The signed-flow rollback tests already existed; this PR adds the unsigned and fan-out path coverage to close the gap.