Commit Graph

70 Commits

Author SHA1 Message Date
Matheus Degiovani
19873f721f lntest: more descriptive errors for CloseChannel
This improves the error reporting for the harness' CloseChannel so that
the exact step where closure fails can be better indicated.

This is to help debug some flaky failures in the CI.
2020-07-13 13:24:22 -03:00
Andras Banki-Horvath
556e3525ea misc: fix error formatting in multiple files 2020-04-24 19:15:08 +02:00
Andras Banki-Horvath
2b729a78f3 lntest: fix ticker leak 2020-04-24 19:15:08 +02:00
Olaoluwa Osuntokun
aab956471d
Merge pull request #3846 from guggero/lntest-node-config
itest: make harnesses usable in external projects
2020-01-06 17:52:16 -08:00
Oliver Gugger
ce711a1de7
lntest: specify lnd binary
Integration tests in external projects might not have the same folder
structure as lnd does. Therefore we want to allow the path to the
lnd itest binary to be configurable.
2020-01-03 09:17:23 +01:00
Oliver Gugger
b762d441cf
lntest: expose configuration of harness node
When using the lntest package for itests in external projects, it
is necessary to access a harness node's configuration, for example
to get its data directory on disk. This commit exports that
configuration.
2020-01-03 09:13:29 +01:00
Olaoluwa Osuntokun
be4db0ebca
lntest: add optional FundingShim field to OpenChannelParams 2019-12-20 19:09:48 -08:00
Conner Fromknecht
aa3e74043d
lntest/harness: improve error message for AssertChannelExists
predErr wasn't always being set when the predicate failed, replace with
wait.NoError.
2019-11-19 20:12:48 -08:00
Wilmer Paulino
955d143c1b
server+lntest: extract ErrServerNotActive error 2019-10-23 17:37:15 -04:00
Johan T. Halseth
a3a04992b4
lnd_test: give peers more time to successfully attempt connection
We might hit a connection refused error in cases where the peer connects
to us exactly as we try to connect to it. We retry the connection within
a wait predicat, as it should be the case that the other peer
establishes the connection, and the two peers actually connects.
2019-10-07 09:46:23 +02:00
Lars Lehtonen
085a63fee5
lntest: stdlib context 2019-09-28 15:43:42 -07:00
Conner Fromknecht
1d41d4d666
multi: move WaitPredicate, WaitNoError, WaitInvariant to lntest/wait 2019-09-19 12:46:29 -07:00
Johan T. Halseth
195a868455
lntest: add flag -goroutinedump 2019-07-11 14:44:44 +02:00
Johan T. Halseth
314ba7db03
lntest/harness: add method SaveProfilesPages
SaveProfilesPages will write the active goroutines to files
pprof-n-*.log.

Co-authored-by: taketa <853211b@gmail.com>
2019-07-11 14:41:40 +02:00
Johan T. Halseth
ca1e9dcecb
lntest: skip zeroConf ListUnspent for neutrino 2019-05-27 09:29:03 +02:00
Johan T. Halseth
7f4d1cee6d
lntest: don't return from ensureConnected on non-error
This would casue the method to return before the peer list check was
performed.
2019-04-24 09:44:15 +02:00
Olaoluwa Osuntokun
b451536483
lntest: extend the restore/restart methods to also accept optional SCBs
In this commit, we modify the `RestoreNodeWithSeed` and `RestartNode`
methods to also accept an SCB. This will be useful in new integration
tests to properly exercise the various restore/restart scenarios using
static channel backups.
2019-03-28 17:54:07 -07:00
Olaoluwa Osuntokun
b419179c86
lntest: extend RestartNode to also unlock node if password is present 2019-03-28 17:53:49 -07:00
Olaoluwa Osuntokun
b62dd09430
lntest: exend newNode method to accept wallet password 2019-03-28 17:53:47 -07:00
Conner Fromknecht
f3f4093ef0
lntest/timeouts: split into darwin and non-darwin timeouts 2019-03-27 19:00:39 -07:00
Conner Fromknecht
34e36e9daa
lnrpc+rpcserver: rename ScriptPubkey to PkScript on Utxo msg 2019-02-11 13:02:25 -08:00
Conner Fromknecht
3fa9d81a41
lntest/harness: assert unconfirmed utxos in ListUnspent during sendCoins 2019-02-11 13:02:11 -08:00
Wilmer Paulino
8d7879bab1
Merge pull request #2496 from halseth/itest-print-btc-amount
[trivial] lntest/node: print amounts in same format
2019-02-01 13:01:05 -08:00
Johan T. Halseth
0714ffa0d7
lntest/harness: add WaitNoError 2019-01-22 13:38:05 +01:00
Johan T. Halseth
adb512e6bf
lntest/node: print amounts in same format 2019-01-22 13:23:30 +01:00
Johan T. Halseth
989fe50da8
lntest: define BackendCfg and btcd impl
BackendCfg is an interface that can be backed by different Bitcoin node
implementations. We currently use the btcdHarness as our chain backend.
2019-01-16 09:44:29 +01:00
Olaoluwa Osuntokun
8c5d6842c2
Merge pull request #2117 from halseth/integration-tests-backend-logs
Save integration tests backend logs
2018-12-12 16:07:25 -08:00
AdamISZ
9bb2a26948
Add listunspent RPC call
Returns a brief json summary of each utxo found by calling
ListUnspentWitness in the wallet. The two arguments are the
minimum and maximum number of conrfirmations (0=include
unconfirmed)
2018-12-11 15:26:38 +01:00
Johan T. Halseth
3a2fd51f2f
lnd_test+lntest: move copyFile() -> lntest.CopyFile() 2018-11-27 10:21:17 +01:00
Johan T. Halseth
b389d5f6b0
lntest/harness: retry ConnectPeer of chain backend still syncing 2018-11-27 10:15:00 +01:00
Johan T. Halseth
9b6055764a
lntest: define and export various test constants 2018-11-05 22:10:37 +01:00
Wilmer Paulino
16b5f705d8
lntest/harness: update to reflect new OpenChannel unconfirmed spends 2018-10-18 16:55:53 -07:00
Dave Kerr
1977d45de5 multi: fix function references in comments and clarify grammar 2018-09-27 20:59:59 -07:00
maurycy
ac24b12bf2
multi: fix various typos in comments 2018-09-07 06:51:49 +02:00
Johan T. Halseth
fd7b1c2d5e
lntest/lnd test: make OpenChannel take channel param struct
Also add option for setting min_htlc value on channel creation.
2018-08-23 07:50:16 +02:00
Olaoluwa Osuntokun
147596047f
Merge pull request #1687 from halseth/disable-inactive-channels
Send ChannelUpdate with Disabled bit if channel inactive for 20 minutes
2018-08-17 18:04:19 -07:00
Johan T. Halseth
52941cec53
lntest: add SuspendNode 2018-08-17 23:24:13 +02:00
Wilmer Paulino
9ec6433863
lntest: extend OpenChannel to specify whether confirmed funds should be
used
2018-08-16 20:22:42 -07:00
Wilmer Paulino
130124bb79
lntest: add SendCoinsUnconfimed method
In this commit, we add a new method to the network harness that allows
us to send funds to another party without confirming the transaction.
This will be useful for testing funding channels with outputs that have
not been confirmed yet.
2018-08-16 20:22:42 -07:00
Wilmer Paulino
0a335bbea2
lntest: extract WaitForBalance into a method 2018-08-16 20:22:41 -07:00
Wilmer Paulino
9d2eeb6304
multi: update to latest fee estimation interface 2018-08-09 17:29:52 -07:00
Conner Fromknecht
1ded697e8d
multi: sort import paths with gofmt 2018-08-02 18:20:49 -07:00
Olaoluwa Osuntokun
6f60f139f4 multi: switch over import paths from roasbeef/* to btcsuite/* 2018-07-13 17:05:39 -07:00
Olaoluwa Osuntokun
6830024faf
Merge pull request #1367 from halseth/waitpredicate-interval
lntest/harness: add pollIntervall to WaitPredicate
2018-06-13 19:17:30 -07:00
Johan T. Halseth
0316523bb5
lntest/harness: add pollIntervall to WaitPredicate
This commit adds a poll 20 ms interval to WaitPredicate, similar to what
is done for WaitInvariant. This makes the predicate not being checked
super-rapidly, potentially filling the logs with useless info over the
wait predicate interval.
2018-06-11 15:58:30 +02:00
Olaoluwa Osuntokun
7f16e99a80
lntest: add new StopNode method 2018-06-10 23:02:21 -07:00
Wilmer Paulino
d543ff5811
lntest: wait until channel is active within AssertChannelExists
In this commit, we fix a race condition where at times we open a channel
between two parties and immediately try to send payments over it. At
times this would fail due to the channel link not being fully registered
in the HTLC switch.
2018-05-24 22:56:48 -04:00
Oliver Gugger
cbd981c236 lnd_test: make sure node ID is correctly initialized in log file name 2018-04-30 11:59:34 +03:00
Oliver Gugger
578f1d9332 lnd_test: give nodes a name and print that name in log file name 2018-04-28 17:46:50 +03:00
Conner Fromknecht
329793d06b
lntest/harness: add NewNodeWithSeed and RestoreNodeWithSeed 2018-04-26 16:03:28 -07:00