Closed JiyaGupta-cs closed 2 weeks ago
Hey @JiyaGupta-cs , you can go to the src
folder of network-score
pallet and run the command
rustfmt tests.rs
To pass the rustfmt github action
@zeel991 I have done rustfmt for tests.rs now Please review it again
hey @JiyaGupta-cs , In the revise rating function , you are trying to return ReferenceNotDebitIdentifier
rather than ReferenceIdentifierNotfound
error .
To return ReferenceIdentifierNotfound
, try registering and revoking the ratings and then remove the identifier created from the digest id of revoke rating function , then try revising the rating , you will get the correct error
@zeel991 Now. I have fixed all the errors as mentioned I have successfully registered the rating and revoked the rating , and then removed message id, then removed the identifier from the RatingEntries storage to trigger the ReferenceIdentifierFotFound error while revising the rating
@zeel991 @vatsa287 I have removed the changes of lib.rs And the tests are working error-free
@zeel991 @vatsa287 I have removed the changes of lib.rs And the tests are working error-free
Interesting , it seems your test is working on linux , but throws error on windows , @vatsa287 can you look into this please
@zeel991 @vatsa287 I have removed the changes of lib.rs And the tests are working error-free
Interesting , it seems your test is working on linux , but throws error on windows , @vatsa287 can you look into this please
Sir it's the last day for the PR to get merged in Augtoberfest in C4GT @zeel991 @vatsa287
@amarts Please review and merge the PR
Fixes #301
Description
This pull request adds test coverage for the
ReferenceIdentifierNotFound
error in the pallet-network-score module.Changes Made
Added a new test case to assert the correct return of the ReferenceIdentifierNotFound error in various calls across the pallet-network-score. Ensured that all functions which can return this error are validated, either individually or collectively in a single test.
Implementation Details
Followed the structure and approach of existing test cases Tests were run and verified using
cargo test -p pallet-network-score test
Screenshots