test: Fix panicking test_fulfill_incorrect_proof #714
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.
Pull Request type
[x] Testing
[ ] Feature
[ ] Bugfix
[ ] Refactor
[ ] Format
[ ] Documentation
[ ] Other:
Description
This PR fixes a previously disabled test test_fulfill_incorrect_proof in the Vector pallet that was marked with a TODO comment due to panicking. The test has been re-enabled and properly implemented to verify that the system correctly handles invalid proofs by expecting the appropriate error (ProofVerificationFailed).
Key changes:
Uncommented and fixed the test_fulfill_incorrect_proof test
Added proper error assertion using assert_noop! macro
Updated error type to match current implementation
Added descriptive comment for proof modification
Related Issues
Testing Performed
Verified that the previously panicking test now runs successfully
Ran the full test suite with cargo test to ensure no regressions
Test specifically verifies that invalid proofs are properly rejected
Checklist
[x] I have performed a self-review of my own code
[x] The tests pass successfully with cargo test
[x] The code was formatted with cargo fmt
[x] The code compiles with no new warnings with cargo build --release and cargo build --release --features runtime-benchmarks
[x] The code has no new warnings when using cargo clippy
[ ] If this change affects documented features or needs new documentation, I have created a PR with a documentation update
This PR improves the test coverage by enabling a previously disabled test case, ensuring that the Vector pallet correctly handles invalid proofs. The changes are focused solely on testing functionality and do not require documentation updates.