Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: Fix panicking test_fulfill_incorrect_proof #714

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

MozirDmitriy
Copy link

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.

- Uncomment and fix test_fulfill_incorrect_proof that was marked as panicking
- Add proper error assertion using assert_noop! macro
- Update error type to match current implementation (ProofVerificationFailed)
- Add descriptive comment for proof modification
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant