refactor: 25854 - clean up consensus fee tests#25965
Conversation
Signed-off-by: Ruslan Velkov <ruslan.velkov@limechain.tech>
|
Merging to
After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here |
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
|
Do we have coverage for the submit message transactions deleted from the consensus test suite? |
Signed-off-by: Ruslan Velkov <ruslan.velkov@limechain.tech>
Updated the PR description.
|
✅ All tests passed ✅🏷️ Commit: abf33ee Learn more about TestLens at testlens.app. |
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## main #25965 +/- ##
============================================
- Coverage 70.36% 70.36% -0.01%
+ Complexity 11823 11822 -1
============================================
Files 2627 2627
Lines 110235 110235
Branches 12097 12096 -1
============================================
- Hits 77570 77565 -5
- Misses 28663 28666 +3
- Partials 4002 4004 +2 see 2 files with indirect coverage changes 🚀 New features to boost your workflow:
|
Description:
Redundant tests:
ConsensusServiceFeesSuite.topicCreateBaseUSDFee()andAtomicConsensusServiceFeesSuite.topicCreateWithMultipleCustomFee()- 5-custom-fees create in atomic batch. Under Simple Fees the fee is a function of sigs + processing bytes only; the number of custom fees doesn't change the price.ConsensusServiceFeesSuitecontains the following tests:topicCreateBaseUSDFee(mentioned above) - teststopicCreate,topicCreateWithCustomFee,topicCreateWithMultipleCustomFees. First 2 are already covered byConsensusServiceSimpleFeesSuite.{createTopicPlainComparison, createTopicCustomFeeComparison}, the last one is tested byTopicCreateCustomFeeSimpleFeesTest.topicCreateWithMultipleCustomFees.topicUpdateBaseUSDFee- covered byfees/ConsensusServiceSimpleFeesSuite.updateTopicComparisonandhip1261/TopicUpdateSimpleFeesTest.topicDeleteBaseUSDFee- covered byfees/ConsensusServiceSimpleFeesSuite.deleteTopicPlainComparisonandconsensus/TopicDeleteSuite.topicSubmitMessageFeeScales- covered byhip1261/TopicSubmitMessageSimpleFeesTest(~24 cases, 50 bytes → 1024+ bytes).tokenGetTopicInfoBaseUSDFee- covered byfees/ConsensusServiceSimpleFeesSuite.getTopicInfoComparison.AtomicConsensusServiceFeesSuitecontains the following tests:topicCreateBaseUSDFee- covered byconsensus/AtomicTopicCreateSuite.autoRenewAccountIdDoesNotNeedAdminKeyAutoRenewIsAlsoPayer{,_ECDSA,PrivateTopic}(three tests, all assertingexpectedTopicCreateFullFeeUsd)topicCreateWithCustomFee- covered by the newly added testconsensus/AtomicTopicCreateSuite.topicCreateWithCustomFeeInBatchChargesExpectedFee.topicCreateWithMultipleCustomFee(mentioned above) - no longer meaningful.topicUpdateBaseUSDFee- covered byhip1261/AtomicBatchCrossServiceSimpleFeesTest(lines 596, 1214, 1263) +hip1261/AtomicBatchNegativeSimpleFeesTest(line 1009).topicDeleteBaseUSDFee- covered byconsensus/AtomicTopicDeleteSuite.topicDelete(validatesexpectedTopicDeleteFullFeeUsd).topicSubmitMessageBaseUSDFee- covered byhip1261/AtomicBatchBoundarySimpleFeesTest(lines 533, 604, 1135, 1143, 1151) +hip1261/AtomicBatchCrossServiceSimpleFeesTest(lines 1220, 1269) +hip1261/AtomicBatchNegativeSimpleFeesTest(line 980)Related issue(s):
Fixes #
Notes for reviewer:
Checklist