[Neo Plugin UT] Rpcserver unit test on node
Description
This is the second pr that focus on adding unit tests for rpcservers.
Fixes # https://github.com/neo-project/neo/issues/3350
Type of change
- [x] Optimization (the change is only an optimization)
- [ ] Style (the change is only a code style for better maintenance or standard purpose)
- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] This change requires a documentation update
How Has This Been Tested?
Here is the list of method names extracted from the provided code:
- TestGetVersion
- TestSendRawTransaction_Normal
- TestSendRawTransaction_InvalidTransactionFormat
- TestSendRawTransaction_InsufficientBalance
- TestSendRawTransaction_InvalidSignature
- TestSendRawTransaction_InvalidScript
- TestSendRawTransaction_InvalidAttribute
- TestSendRawTransaction_Oversized
- TestSendRawTransaction_Expired
- TestSendRawTransaction_PolicyFailed
- TestSendRawTransaction_AlreadyInPool
- TestSendRawTransaction_AlreadyInBlockchain
- TestSendRawTransaction_MemoryPoolFull
- TestSubmitBlock_Normal
- TestSubmitBlock_InvalidBlockFormat
- TestSubmitBlock_AlreadyExists
- TestSubmitBlock_InvalidBlock
- TestSendRawTransaction_NullInput
- TestSendRawTransaction_EmptyInput
- TestSubmitBlock_NullInput
- TestSubmitBlock_EmptyInput
Test Configuration:
Checklist:
- [x] My code follows the style guidelines of this project
- [x] I have performed a self-review of my code
- [x] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [x] I have added tests that prove my fix is effective or that my feature works
- [x] New and existing unit tests pass locally with my changes
- [x] Any dependent changes have been merged and published in downstream modules
Coverage is not working and some verification are failing, Jimmy.
Coverage is not working and some verification are failing, Jimmy.
i.know, i will fix that, i changed testing utils and that caused some test fail
Coverage is not working and some verification are failing, Jimmy.
i.know, i will fix that, i changed testing utils and that caused some test fail
Sure, as soon as fixed I will review here again.
I just verified something related to Debug for the method clear of mempool. What is the real use of this on the UTs themself?
@cschuchardt88 @shargon @superboyiii
Have to update some existing tests cause i updated the timestamp of the test block since it was the same as genesis block.
@superboyiii