-
Notifications
You must be signed in to change notification settings - Fork 280
test(core-database): increase coverage #3597
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Codecov Report
@@ Coverage Diff @@
## develop #3597 +/- ##
========================================
Coverage 87.84% 87.84%
========================================
Files 509 509
Lines 11691 11691
Branches 1471 1471
========================================
Hits 10270 10270
Misses 1419 1419
Partials 2 2 Continue to review full report at Codecov.
|
…o test/core-database
faustbrian
approved these changes
Apr 27, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Requires new github CI check to setup postgresql database.
Migrations
Migrations are executed back and forth to check that they apply and undo properly. Many didn't had down migration implemented. Some undo issues were fixed. All
IF EXISTSwere removed from queries, because they masked undo problems.BlockRepository
findByHeightRangeWithTransactionsnow setsblock.transactionsto empty array if no transactions were found.findCommonis removed and usages are replaced with otherwise equivalentfindByIds.saveBlocksdoes not attempt to reorder transactions within some exceptional blocks anymore. It was done incorrectly reversing the actual list within configuration (.reverse()mutated configuration array). BesidesfindByHeightRangeWithTransactionsre-orders transactions back bytransaction.sequence.deleteBlocksnow does not allow to remove blocks in the middle.TransactionRepository
typeandtype_groupare refactored to useEnums.TransactionTypeGroupandEnums.TransactionType.findForgedis removed andgetForgedTransactionsIdsis refactored not to use it.findByIdAndTypeis removed and single usage in api is refactored to usefindByIdand throw if type doesn't match.findByHtlcLocksquery is fixed (type IN (:...lockIds)doesn't make any sense).getOpenHtlcLocksinstead of returning all locks with additional booleanopenfield now as name suggests returns only open htlc locks. HTLC Lock transaction handler and tests are updated.getClaimedHtlcLockBalances,getRefundedHtlcLockBalances, and usages were refactored to emphasize that not transactions, but aggregated statistics is returned.