Skip to content

lnprototest: API improvement and introduction of test utils function#47

Merged
vincenzopalazzo merged 3 commits intorustyrussell:masterfrom
vincenzopalazzo:macros/lnprototest_api
Mar 31, 2022
Merged

lnprototest: API improvement and introduction of test utils function#47
vincenzopalazzo merged 3 commits intorustyrussell:masterfrom
vincenzopalazzo:macros/lnprototest_api

Conversation

@vincenzopalazzo
Copy link
Collaborator

This PR introduces some code improvements related to lnprototest, in particular now:

  • lnprototest is able to print the log to the console in case of failure, and make a backup of the log file in the /tmp dir;
  • introduce some utils function in the tests dir related to:
    • test utils, included a function to manage the runner and some others function useful to build the tests. This also introduces a bug fixing to stop the runner when a test by lnprototest fails;
    • spec utils, include a collection of functions to build a well-formed sequence of events to make lightning operations, like connecting to a node or opening a channel. The last change gives the possibility to write tests a smaller

Changelog-Add: add the `print_logs` to the runner stop method to have the possibility to print the log when it is needed.

Signed-off-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
Changelog-Added: add spec_helper module to introduce a way to build a well formed events flow to make lightning operation.

Signed-off-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
@vincenzopalazzo vincenzopalazzo added enhancement New feature or request ☠️ Code Cleup 🧑‍🔧 Clean code and mantain it readble 🧑‍🔧 code style 🧑‍🔧 Related to code style labels Mar 30, 2022
@vincenzopalazzo vincenzopalazzo self-assigned this Mar 30, 2022
Signed-off-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
@vincenzopalazzo vincenzopalazzo merged commit 6629da3 into rustyrussell:master Mar 31, 2022
@vincenzopalazzo vincenzopalazzo deleted the macros/lnprototest_api branch March 31, 2022 07:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request 🧑‍🔧 code style 🧑‍🔧 Related to code style ☠️ Code Cleup 🧑‍🔧 Clean code and mantain it readble

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant