Uh oh!
There was an error while loading. Please reload this page.
allow functional tests to be used externally with a dynamic signer factory - #3016
Conversation
Uh oh!
There was an error while loading. Please reload this page.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@## main #3016 +/- ##
==========================================
- Coverage 88.61% 88.56% -0.06%
==========================================
Files 149 152 +3 Lines 117091 117270 +179 Branches 117091 117270 +179 ==========================================
+ Hits 103765 103863 +98 - Misses 10817 10889 +72 - Partials 2509 2518 +9 ☔ View full report in Codecov by Sentry. |
1a142e1 to
4077bc2CompareUh oh!
There was an error while loading. Please reload this page.
4077bc2 to
3a1986cCompareUh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
9d4e233 to
f341a0cCompareUh oh!
There was an error while loading. Please reload this page.
87aadef to
4efd374Compare3c454d0 to
ef8f13dCompareUh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
fd35254 to
2e2df96Compareone more idea. it would be nice to collect all the tests of a file into a static array. this would require one of the following to automatically collect the array:
|
84abf70 to
0a29d64Compare6879363 to
dceae89CompareUh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
f987683 to
dfda072CompareTheBlueMatt
commented
Feb 28, 2025
Ugh sorry this needs rebase after #3604. Should clean a few things up nicely though. |
0734677 to
fecc6c2Comparedevrandom
commented
Mar 1, 2025
no problem, rebase done |
6223c18 to
8db5ba6Compare
TheBlueMatt
left a comment
There was a problem hiding this comment.
Okay, one last comment now that its been rebased, then I'm happy to land this 🎉
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
We want to allow functional tests to be run by other project, allowing them to replace components, such as the signer.
Can be used for specifying dynamic components for tests, such as the signer.
DynSigner provides an abstraction for specifying an external signer for functional tests.
Also, introduce TestSignerFactory, a factory for dynamic signers and ext-functional-test-demo crate for testing this machinery.
devrandom
commented
Mar 4, 2025
fixed rustfmt nit |
TheBlueMatt
left a comment
There was a problem hiding this comment.
Gonna go ahead and land this, but there's a few things we'll need to clean up in a followup.
| /// | ||
| /// LDK will not automatically retry this payment, though it may be manually re-sent after an | ||
| /// [`Event::PaymentFailed`] is generated. | ||
| #[cfg(any(test, feature = "_test_utils"))] |
There was a problem hiding this comment.
Looks like this wasn't removed.
| /// could not return a signature immediately. | ||
| #[cfg(test)] | ||
| pub fn enable_channel_signer_op(&self, peer_id: &PublicKey, chan_id: &ChannelId, signer_op: SignerOp) { | ||
| pub fn enable_channel_signer_op(&self, peer_id: &PublicKey, chan_id: &ChannelId, signer_op: SignerOp) { |
There was a problem hiding this comment.
Here and the next method down have indentation issues now.
| error_code, | ||
| #[cfg(test)] | ||
| error_data, .. } => { | ||
| error_code, |
There was a problem hiding this comment.
Oops, weird indentation here too.
| // This is a regression test for https://github.com/lightningdevkit/rust-lightning/issues/3537. | ||
| #[test] | ||
| #[xtest(feature = "_externalize_tests")] | ||
| fn test_multiple_package_conflicts() { |
| } | ||
| fn do_test_static_spendable_outputs_justice_tx_revoked_commitment_tx(split_tx: bool) { | ||
| pub fn do_test_static_spendable_outputs_justice_tx_revoked_commitment_tx(split_tx: bool) { |
There was a problem hiding this comment.
Doesn't need to be pub here.
| #[test] | ||
| #[xtest(feature = "_externalize_tests")] | ||
| fn test_nondust_htlc_excess_fees_are_dust() { |
| #[test] | ||
| #[xtest(feature = "_externalize_tests")] | ||
| fn test_funding_signed_event() { |
DynSignerxtestmacrosfake_network_testand others