This repository has been archived by the owner on Jun 11, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 455
Add database unit tests #1484
Labels
Milestone
Comments
can I have a take on this? |
@chiptus It is already a work-in-progress: https://github.com/LiskHQ/lisk/tree/1484-database-tests/test/unit/db. And I'm planning to get back to it this evening. |
This was referenced Feb 14, 2018
@vitaly-t @karmacoma I updated the issue description and removed these tasks from list.
As the first point is covered. And for rest we decided to not mock DB I/O interface. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Changes within the database layer during the last month invalidate the existing approach to testing database-related functionality.
The updated database platform allows carrying out tests in complete isolation for each of the database repositories that's now available.
A new folder and structure is required within the
/test/db
, to contain files likeblocks.js
,accounts.js
, etc, i.e. exactly matching the set of files of the corresponding database repository to be tested, as they can be found in folder/db/repos
.Once all the tests related to the use of database repositories are done like this, we can start simplifying core tests, to focus only on the business logic of the application.
Unit tests
The text was updated successfully, but these errors were encountered: