Add comprehensive E2E tests for unshielded balances and DUST/cNIGHT features #627
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.
Add Comprehensive E2E Tests for Unshielded Balances and DUST/cNIGHT Features
Overview
This Pull Request implements comprehensive end-to-end tests for two critical features in the Midnight Indexer ecosystem, addressing the following GitHub issues:
Changes Summary
1. Unshielded Balances E2E Testing
Added a new test function
test_unshielded_balances_e2e()that validates the complete lifecycle of unshielded balance management for contract actions. This test ensures data consistency and correctness across the entire indexer stack.Key validations:
Test coverage:
2. Enhanced DUST Generation Status Testing
Extended the existing
test_dust_generation_status_query()function with comprehensive validation scenarios for DUST/cNIGHT functionality.New test scenarios:
Improvements:
3. Improved DUST Ledger Events Subscription
Enhanced
test_dust_ledger_events_subscription()with additional validation and better error handling.Enhancements:
Technical Details
Code Quality:
anyhow::Contextcargo check(no warnings or errors)Testing Approach:
Files Modified
indexer-tests/src/e2e.rs: Added ~200 lines of new test codeTesting
The code has been validated with:
Result: ✅ Compiles successfully with no warnings or errors
Impact
This PR significantly improves test coverage for:
Next Steps
After this PR is merged, the test suite will:
Related Documentation