Skip to content
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

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

Merged

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 <[email protected]>
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 <[email protected]>
@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
@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