Commit Graph

19 Commits

Author SHA1 Message Date
yyforyongyu
74f8fe482d itest: manage context inside EnsureConnected 2021-08-24 11:06:44 +08:00
yyforyongyu
d10d1e3e24 itest: manage context inside SendCoins 2021-08-24 11:06:44 +08:00
yyforyongyu
dca20d80a7 itest: fix context leak in openChannelAndAssert
In this commit, we put the context initialization inside
openChannelAndAssert, thus saving us a few lines and making sure the
context is always properly handled.
2021-08-24 11:06:43 +08:00
yyforyongyu
8eddc50beb itest: remove context creations outside close channel assertion 2021-08-11 12:44:39 +08:00
Olaoluwa Osuntokun
ea7ea33e24 lntest/itest: log node name in addition to ID if waitForChannels fails 2021-07-14 20:11:54 -07:00
yyforyongyu
310e923170 itest: use require inside net.EnsureConnected/net.ConnectNodes 2021-06-29 01:41:48 +08:00
yyforyongyu
6515c575bd itest: use require inside net.SendCoins
This commit refactored the function SendCoins to take a new *testing.T
so the unexpected error is handled inside it.
2021-06-10 01:29:22 +08:00
yyforyongyu
b42bb87c81 itest: use require inside net.NewNode
This commit refactored the function NewNode to take a *testing.T so that
the unexpected error is checked inside it. The caller is now free from
checking the errors.
2021-06-09 02:14:37 +08:00
Conner Fromknecht
a765ba1f3d lntest/mpp_test: ensure ctx.alice and ctx.bob are shutdown
Not doing so prevents consecutive subtests from starting properly.
2021-05-28 09:30:05 -07:00
Conner Fromknecht
4e93c1303c lntest: isolate alice+bob in mppTestContext 2021-05-10 22:02:15 -07:00
Conner Fromknecht
888af51ab4 lntest: make buildRoute method on mppTestContext
This will be reused by the amp itest.
2021-04-07 12:09:47 -07:00
Elliott Jin
ce2796257e multi: move GetChanPointFundingTxid from lnd to lnrpc
This refactor-only change makes the GetChanPointFundingTxid helper
function available from sub-systems outside of the root lnd package.
2021-02-24 07:13:28 -08:00
Eugene
bebe258e2d chainregistry+lnd: moving chainregistry+chainparams to new package 2020-10-29 15:24:14 -04:00
Olaoluwa Osuntokun
719e32830d lntest: fix most linter warnings, silence rest
We fix all linter issues except for the 'lostcontext' and 'unparam' ones
as those are too numerous and would increase the diff even more.
Therefore we silence them in the itest directory for now.
Because the linter is still not build tag aware, we also have to silence
the unused and deadcode sub linters to not get false positives.
2020-09-21 21:16:31 +02:00
Olaoluwa Osuntokun
c769247198 lntest: allow the main test files to be buildable w/o the rpctest build tag
In this commit, we modify our build tag set up to allow the main test
files to be buildable w/o the current rpctest tag. We do this so that
those of us that use extensions which will compile live files like
vim-go can once again fix compile errors as we go in our editors.

In order to do this, we now make an external `testsCases` variable, and
have two variants: one that's empty (no build tag), and one that's fully
populated with all our tests (build tag active). As a result, the main
file will now always build regardless of if the build tag is active or
not, but we'll only actually execute tests if the `testCases` variable
has been populated.

As sample run w/ the tag off:
```
=== RUN   TestLightningNetworkDaemon
--- PASS: TestLightningNetworkDaemon (0.00s)
PASS
ok  	github.com/lightningnetwork/lnd/lntest/itest	0.051s
```
2020-09-21 21:16:31 +02:00
Joost Jager
261588cc8e itest: switch over to routerrpc.SendToRouteV2 2020-05-12 19:56:58 +02:00
Joost Jager
b6170788ea routerrpc: add SendToRouteV2 that returns an HTLCAttempt message
Unify data structure with SendPayment/ListPayments.
2020-05-12 19:56:54 +02:00
Joost Jager
35ebfcda9e itest: create mpp test context 2020-04-09 08:20:54 +02:00
Johan T. Halseth
fee5fd0093 itest: add testSendToRouteMultiPath
testSendToRouteMultiPath tests that we are able to successfully route a
payment using multiple shards across different paths, by using SendToRoute.

Co-authored-by: Joost Jager <joost.jager@gmail.com>
2020-04-02 19:31:23 +02:00