Commit Graph

134 Commits

Author SHA1 Message Date
yyforyongyu
86373645b6
lntest: skip logging if there's no error in shutdown 2023-02-27 16:21:54 +08:00
Slyghtning
4c198bdfde itest: check peer alias in ListChannels 2023-02-24 10:49:11 +01:00
yyforyongyu
be6727d497
lntest: add more outputs to standby nodes and skip shutdown error 2023-02-24 01:35:17 +08:00
yyforyongyu
d6043c26a7
itest: temp fix for closing channels 2023-02-24 01:35:16 +08:00
yyforyongyu
d5af76cb29
itest+lntest: add a dedicated timeout for sending payments
This commit adds a new timeout `PaymentTimeout` that's used when sending
payments. A potential bug is also marked in the test.
2023-02-23 21:56:11 +08:00
yyforyongyu
ae6e109f35
lntest: catch window conn error in EnsureConnected
This commit also removes the first connection attempt inside
`SetupStandbyNodes` as the nodes are always connected inside each
subtest. The error returned from connection is now logged for debugging.
2023-02-23 21:56:11 +08:00
yyforyongyu
d97f52d12a
lntest: shutdown running nodes when test fails
Fixes the zip log files failure we see.
2023-02-23 21:56:10 +08:00
yyforyongyu
2bc6aabf96
itest: fix make lint
This commit fixes the issues reported by the linter.
2023-02-23 21:56:10 +08:00
yyforyongyu
9d1d629001
itest+lntest: migrate lntemp to lntest
This commit performs the takeover that `lntemp` is now promoted to be
`lntest`, and the scaffolding is now removed as all the refactoring is
finished!
2023-02-23 21:56:09 +08:00
yyforyongyu
bd521dd2f0
itest: rename harness net file and add run context
This commit renames harness.go to harness_net.go. It also adds a run
context which is served as the parent context when creating new
contexts.
2021-12-04 14:54:37 +08:00
yyforyongyu
26ed64fa52
itest: manage context within HarnessNode
This commit removes the context as a param needed when calling methods
of HarnessNode. This change moves the context management inside
HarnessNode, aside from saving us a few lines, it makes the context
creation/timeout less error-prone.
2021-12-04 14:54:36 +08:00
yyforyongyu
98d7e64dc1
itest: add test_common to hold commonly used methods
A new file, test_common.go, is added to hold commonly used functions
across lntest.
2021-12-04 14:54:36 +08:00
Oliver Gugger
eb2be7c7c0
lntest: count unconfirmed balance as well
It looks like in some cases (apparently mostly on Windows) a previous
sub test sometimes leaves some unconfirmed balance in the wallet. That
balance is confirmed in the next test when new coins are sent to the
wallet.
2021-11-02 20:36:45 +01:00
Oliver Gugger
a6ea019f56
lntest: add itest for remote signing 2021-10-14 16:14:49 +02:00
Elle Mouton
18909e1a8e
lntest: show that multi addresses are not used
This commit adds an itest to demonstrate that if a peer advertises
multiplie external IP addresses, then they will not all be used to
reconnect to the peer during reconnection. This will be fixed in a
follow-up commit.
2021-10-04 14:57:49 +02:00
Elle Mouton
5177ec2f84
lntest: create persistent connection
This commit adds a ConnectNodesPerm function to the itest NetworkHarness
so that persistent connections between nodes can be mocked.
2021-10-04 14:57:49 +02:00
Oliver Gugger
5aeb728f80
lntest: use errgroup for node startup
This commit fixes a nil pointer issue when a node fails to start up.
Because require.NoErrorf() doesn't abort a test immediately if run
inside a goroutine, this lead to the test continuing with nil node
references which lead to a panic later on.
2021-09-29 11:57:53 +02:00
Joost Jager
daeb96fe0a
postgres: add itest 2021-09-21 10:44:23 +02:00
Oliver Gugger
4b43e977b2
lntest: add RPC middleware itests 2021-09-20 17:04:39 +02:00
yyforyongyu
66dae6ecf7
itest: put node.CloseChannel inside wait 2021-09-17 07:50:44 +08:00
Wilmer Paulino
523eef5cf4
lntest: use explicit channel commitment negotiation for multi-hop itests 2021-08-30 19:17:42 -07:00
Oliver Gugger
23cd231483
Merge pull request #4717 from guggero/xprv-wallet-init
walletunlocker: Allow wallet to be created from extended master root key (xprv)
2021-08-24 13:01:41 +02:00
Oliver Gugger
3fd944e7e4
lntest: allow node restore by extended root key
To allow testing restoring a node from an extended master root key, we
add an extra argument to the RestoreNodeWithSeed function.
2021-08-24 10:37:33 +02: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
5a94919b7e
itest: manage context timeout inside network harness
This is the last commit to refactor the context management such that all
the timeout are managed inside the network harness.
2021-08-24 12:28:35 +08:00
yyforyongyu
d9e9238b0c
itest: make WaitForTxInMempool a private method 2021-08-24 12:16:46 +08:00
yyforyongyu
16403da91e
itest: manage context in CloseChannel and AssertChannelExists 2021-08-24 12:16:46 +08:00
yyforyongyu
3e26d77f91
itest: manage context inside WaitForChannelOpen and WaitForChannelClose 2021-08-24 12:16:46 +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
Oliver Gugger
3ae2cdb003
lntest: fix commitment TX not found in mempool error
This commit fixes an old flake in the neutrino anchor output tests. It
turns out that sometimes with Neutrino we don't have enough UTXOs in our
wallet to sweep both the local and remote anchor. This is very likely a
timing issue, we need to give the wallet more time to catch up with the
chain and process all transactions to find unspent outputs.
We address this two-fold: We add an additional UTXO to Alice. And then
we also make sure we detect both UTXOs properly after restarting.
2021-08-05 16:11:28 +02:00
Oliver Gugger
5cabd980b1
lntest: make it clear that profile failure is follow-up error
From the error in the itest output log it is not clear whether scraping
the profile page caused a test to fail or whether it was just a
follow-up error. We make it a bit more clear with an added message.
2021-08-05 16:11:28 +02:00
Andras Banki-Horvath
7ce3223919
harness: remove killed nodes from active nodes 2021-07-15 11:26:27 +02:00
Joost Jager
98e75b486d
itest: add db backend flag 2021-07-05 10:10:02 +02:00
Joost Jager
387f1ef274
lntest: abstract db backup and restore 2021-07-05 09:20:19 +02:00
yyforyongyu
a77225ba9e
itest: allow set fee rate with conf target
In this commit, we add a method in fee service to allow specifying a fee
rate with a conf target.
2021-06-29 20:25:47 +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
Oliver Gugger
e39d00900c
Merge pull request #5260 from guggero/windows-itest
Travis: fix Windows itest
2021-05-14 12:57:51 +02:00
Oliver Gugger
e4873ac878
lntest: re-use P2P ports during SCB recovery
In some rare instances it can happen that the nodes don't find each
other again after one of them has been re-created and the other one has
been restarted in the SCB tests. By making sure the re-created has the
same P2P port again as before, we make sure they can connect to each
other again successfully for executing DLP.
2021-05-14 10:59:10 +02:00
Olaoluwa Osuntokun
7ab5906093
Merge pull request #5245 from bhandras/kvdb_module
kvdb: make kvdb a top level submodule to allow dependency in other projects
2021-05-13 15:59:20 -07:00
Oliver Gugger
6c37cae639
lntest+routing: update best height after graph pruning
It seems #5246 introduced a subtle bug that lead to the error "out of
order block: expecting height=1, got height=XXX" some times during
startup. Apparently it can happen that during pruning of the graph tip
some blocks can come in before we start our chain view and the new block
subscription. By querying the chain backend for the best height before
syncing with the graph we ensure that we never miss a block.
2021-05-10 16:46:28 +02:00
Andras Banki-Horvath
14c851c8fc
kvdb: move channeldb/kvdb to top level 2021-05-07 14:18:56 +02:00
Andras Banki-Horvath
7caf26ce94
itest: add itest for failover after forcefull shutdown 2021-05-04 17:33:12 +02:00
Andras Banki-Horvath
5d8488871c
itest: basic failover itest when using leader election on etcd 2021-05-04 17:33:12 +02:00
Wilmer Paulino
a620ce3682
build: update btcd and btcwallet dependencies 2021-04-05 15:41:04 -07:00
Alex Bosworth
069de38186
itest: add support for specifying chain fee rate 2021-03-22 13:08:38 -07:00
Johan T. Halseth
2877511fce
rpcperms+lnd: gate RPC calls on RPC state
This commit makes us gate the calls to the RPC servers according to the
current RPC state. This ensures we won't try to call the RPC server
before it has been fully initialized, and that we won't call the
walletUnlocker after the wallet already has been unlocked.
2021-03-11 13:05:24 +01:00