This is the native core module that allows the creation of clients for Turtl, an encrypted note-taking app. It is a fairly standard Rust library, but when building this package, you need to pay extra attention to the check()
step.
The unit tests for core-rs
can be run without any extra setup, but the integration tests require a Turtl server with the test data loaded to be running. Without the server, the integration tests will not run.
In addition to listing turtl-server
as a check-time dependency, I have included a (very much over-engineered) check script that automatically:
- sets up a PostgreSQL database cluster
- configures a database within this cluster for the Turtl server to use
- starts PostgreSQL and Turtl server instances
- loads the required test data into the Turtl server instance
- runs the
core-rs
unit tests - runs the integration tests using the running Turtl server instance
- shuts down the SQL and Turtl servers
- cleans up all the left-over files created as part of this process
The benefit of this is that building core-rs
, running its test suite and packaging it should literally be as simple as installing the dependencies and then running makepkg
. Everything should be taken care of for you.
If you do not wish to run the unit and integration tests, be sure to run makepkg
with the --nocheck
flag, this will prevent the check step from running, which also means the PostgreSQL and Turtl servers do not need to be installed.
All of the tests pass on my system, except for the migrate
integration test. This test requires the old Common Lisp based Turtl server to be running in addition to the new NodeJS-based one, to test how well the client can import data from the old server and store it on the new one. As the Lisp-based server is likely not available on your machine, this test will fail, and so the check()
function explicitly skips this test.
Let me know if you have any trouble with this package, I'll try to help out as soon as I can. Enjoy!
Pinned Comments
neoninteger commented on 2019-06-21 14:37 (UTC) (edited on 2019-11-14 12:32 (UTC) by neoninteger)
This is the native core module that allows the creation of clients for Turtl, an encrypted note-taking app. It is a fairly standard Rust library, but when building this package, you need to pay extra attention to the
check()
step.The unit tests for
core-rs
can be run without any extra setup, but the integration tests require a Turtl server with the test data loaded to be running. Without the server, the integration tests will not run.In addition to listing
turtl-server
as a check-time dependency, I have included a (very much over-engineered) check script that automatically:core-rs
unit testsThe benefit of this is that building
core-rs
, running its test suite and packaging it should literally be as simple as installing the dependencies and then runningmakepkg
. Everything should be taken care of for you.If you do not wish to run the unit and integration tests, be sure to run
makepkg
with the--nocheck
flag, this will prevent the check step from running, which also means the PostgreSQL and Turtl servers do not need to be installed.All of the tests pass on my system, except for the
migrate
integration test. This test requires the old Common Lisp based Turtl server to be running in addition to the new NodeJS-based one, to test how well the client can import data from the old server and store it on the new one. As the Lisp-based server is likely not available on your machine, this test will fail, and so thecheck()
function explicitly skips this test.Let me know if you have any trouble with this package, I'll try to help out as soon as I can. Enjoy!