ba994ff8ffcommands: do not underestimate the size of created transactions (Antoine Poinsot)46a94d6c8eqa: test recovery 'sweep' transaction creation (Antoine Poinsot)3b5cbd5122qa: introduce a sign_and_broadcast utility (Antoine Poinsot)d362885b85qa: record the recovery xpub too (Antoine Poinsot)a69fb625eaqa: use a CSV of 10 for recovery (Antoine Poinsot)a78f46fa2f[refactoring] jsonrpc: sort command names alphabetically (Antoine Poinsot)c09ae3f87bcommands, jsonrpc: add a new 'createrecovery' command (Antoine Poinsot)3d5d0134b4commands: fix the capacity of input vectors in create_spend (Antoine Poinsot)f2312593dacommands: check for dust outputs in the PSBT sanity checks (Antoine Poinsot)9f23161a53commands: correct the max feerate value (Antoine Poinsot)54410cd9c4database: allow to query coins by their spending status (Antoine Poinsot) Pull request description: A new command that provides a simple way for a user to sweep all the coins whose timelocked recovery path is available. The first part of #180. Note this also contains a number of drive-by fixes that i noticed while coding this up. ACKs for top commit: darosior: self-ACKba994ff8ff-- tested by Edouard on the GUI Tree-SHA512: 002cb8602370fe3bec0692fe7bbe9e7af494b43756d3092da99b37e4ce2837bcdfcfb3afe7043900eb41c70de12e2129e19363b9efe41cee91c7f1f7c2824fb0
Lianad blackbox tests
Here we test lianad by starting it on a regression testing Bitcoin network,
and by then talking to it as an user would, from the outside.
Python scripts are used for the automation, and specifically the pytest framework.
Credits: this test framework was taken and adapted from revaultd, which was itself adapted from C-lightning's test framework.
Test dependencies
Functional tests dependencies can be installed using pip. Use a virtual environment.
# Create a new virtual environment, preferably.
python3 -m venv venv
. venv/bin/activate
# Get the deps
pip install -r tests/requirements.txt
Additionaly you need to have bitcoind installed on your computer, please
refer to bitcoincore for installation. You may use a
specific bitcoind binary by specifying the BITCOIND_PATH env var.
Running the tests
From the root of the repository:
pytest tests/
Tips and tricks
Logging
We use the Live Logging
functionality from pytest. It is configured in (pyproject.toml)[../pyproject.toml] to
output INFO-level to the console. If a test fails, the entire DEBUG log is output.
You can override the config at runtime with the --log-cli-level option:
pytest -vvv --log-cli-level=DEBUG -k test_startup
Note that we record all logs from daemons, and we start them with log_level = "debug".
Test lints
Just use black.
More
See the environment variables in test_framework/utils.py.