Commit Graph

19 Commits

Author SHA1 Message Date
yyforyongyu
a1024163fe itest: add more verbose log and print node state 2021-09-17 07:50:42 +08:00
Wilmer Paulino
523eef5cf4 lntest: use explicit channel commitment negotiation for multi-hop itests 2021-08-30 19:17:42 -07:00
Wilmer Paulino
449f207217 lntest: replace commitType type with rpc alternative 2021-08-30 19:17:39 -07:00
yyforyongyu
104b7a09db itest: fix inheritance when creating timeout ctxt
This commit fixes the issue where a wrong context being inherited to
create a timeout context. When a parent context timed out, all its
children contexts also timed out, even the children contexts had a
larger timeout value. This means it only makes sense to inherite from a
parent when its children have smaller timeout value. Given the setup of
the itest, all the timeout contexts need to be created from a context
background(hence no timeout on the parent) unless there's an explicit
timeout bound we want to set.
2021-08-24 12:28:40 +08:00
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
8de495b96b itest: initialize context inside ConnectNodes 2021-08-24 11:06:43 +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
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
yyforyongyu
a215c55186 itest: add logging for subtests 2021-04-14 12:30:19 +08:00
Johan T. Halseth
1627310fb0 itest: add HTLC aggregation test 2020-12-10 14:24:21 +01:00
Oliver Gugger
4d2a12e552 itest: fix incorrect error message 2020-12-08 21:37:10 +01: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
29602e88e8 cnct: cpfp-sweep anchors
For unconfirmed commit tx anchors, supply the sweeper with cpfp info and
a confirmation target fee estimate.

The sweeper will try to pay for the parent commit tx as long as the
current fee estimate exceeds the pre-signed commit tx fee rate.
2020-09-17 12:30:41 +02:00
Joost Jager
8628a989a6 itest: enable anchor commitment for multi-hop test
These tests exercise the different ways of sweeping a commitment, so
we'll cover the modified scripts used for anchor commitments and
spending the anchor itself by both parties.

Co-authored-by: Johan T. Halseth <johanth@gmail.com>
2020-03-27 08:01:52 +01:00
Johan T. Halseth
b4ea34037a lntest: move multi-hop root test case and common utils to own file 2020-03-23 11:19:18 +01:00