Skip to content

tests: use origin node logger instead of creating new TestLogger #1060

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

Merged

Conversation

JosephGoulden
Copy link
Contributor

I'm using function_test_utils which are really helpful. It would be good if I could control the log level though.
I can set the log level on the nodes returned by create_chanmon_cfgs. But when calling the route_payment and other functions a new TestLogger is created. I'm wondering if it's ok to just use the logger of the origin node?

I can see that a few tests in function_tests also create new loggers for calling get_route as well. Potentially these could be modified as well, but this is not necessarily relevant to dependent projects making use of test_utils.

@codecov
Copy link

codecov bot commented Aug 24, 2021

Codecov Report

Merging #1060 (02c95ee) into main (479ff90) will increase coverage by 0.02%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1060      +/-   ##
==========================================
+ Coverage   90.81%   90.83%   +0.02%     
==========================================
  Files          65       65              
  Lines       32801    32884      +83     
==========================================
+ Hits        29789    29871      +82     
- Misses       3012     3013       +1     
Impacted Files Coverage Δ
lightning/src/ln/functional_test_utils.rs 95.11% <100.00%> (-0.02%) ⬇️
lightning-background-processor/src/lib.rs 93.99% <0.00%> (+0.05%) ⬆️
lightning/src/ln/functional_tests.rs 97.50% <0.00%> (+0.06%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 479ff90...02c95ee. Read the comment docs.

@JosephGoulden JosephGoulden force-pushed the function_test_utils_logs branch from 4e3b50d to 02c95ee Compare August 24, 2021 15:53
@TheBlueMatt TheBlueMatt merged commit 4368b56 into lightningdevkit:main Aug 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants