-
Notifications
You must be signed in to change notification settings - Fork 121
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
Fixes: #304 : Add Test Cases for SpaceMismatch
Error in pallet-network-score
#534
Conversation
Hey @vatsa287, |
@huamanraj No changes are required at |
@vatsa287 please review this!! |
@vatsa287 please review! is it good? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
Fix the pre PR checks by referring the README on contributing guidelines part.
Signed-off-by: Aman Raj <113578582+huamanraj@users.noreply.github.com>
e5b103d
to
32077f8
Compare
@vatsa287 Fixed!! |
SpaceMismatch
Error in pallet-network-score
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@amarts please merge this PR! |
This PR introduces new test cases for handling the SpaceMismatch error within the pallet-network-score module. It addresses the requirement specified in #304 to validate that the SpaceMismatch error is correctly returned across all applicable function calls.
Key Changes:
Added a test case,
test_space_mismatch_in_rating_registration
, to assert the correct handling of the SpaceMismatch error when there is a mismatch between the space digest and authorization ID during the rating registration process.The test ensures that the error is properly triggered when attempting to register ratings with incorrect space authorization.
All functions that return the SpaceMismatch error have been validated, ensuring that this error is caught in various scenarios.
Implementation Details:
Followed the structure and approach of existing test cases such as
test_duplicate_member_request
in pallet-network-membership.Focused on simulating space mismatch scenarios in rating registration and confirming that the correct error is returned.
Expected Outcome:
The test should assert that the SpaceMismatch error is returned properly in all relevant calls.
The validation covers all functions returning this error, either through a single comprehensive test case or multiple focused test cases.