Commit Graph

272 Commits

Author SHA1 Message Date
eugene
702b3a3258 multi: introduce config-level DustThreshold for defining threshold 2021-09-30 13:44:35 -04:00
Joost Jager
daeb96fe0a postgres: add itest 2021-09-21 10:44:23 +02:00
yyforyongyu
a1024163fe itest: add more verbose log and print node state 2021-09-17 07:50:42 +08:00
yyforyongyu
74f8fe482d itest: manage context inside EnsureConnected 2021-08-24 11:06:44 +08:00
Oliver Gugger
2eb0a4600f make+itest: add tranche index to test name
To make it easier to see what tranche a failed test was running in, we
add the tranche index to the test name. This corresponds to the number
in the .logs-tranche<index> folder name so the logs can be found much
quicker.
2021-08-04 14:55:57 +02:00
yyforyongyu
c912d1aae0 itest: move tests into one file
This commit creates the file lnd_misc_test.go to hold all miscellaneous
tests in the file lnd_test.go. From now on, the lnd_test.go will only be
responsible for handling the "top" level functionalities such as
splitting test cases and run them. Newly created test cases should find
their places in the related test files, or create new one when needed.
2021-07-13 15:01:39 +08:00
yyforyongyu
73a2211205 itest: move helper functions into one file
This commit creates the file utils.go to hold the commonly used
functions for tests.
2021-07-13 14:59:00 +08:00
yyforyongyu
27b9273e2f itest: move channel graph related tests into one file 2021-07-13 14:58:59 +08:00
yyforyongyu
a20f857987 itest: move balance related tests into one file 2021-07-13 14:58:59 +08:00
yyforyongyu
9337f94f0d itest: move recovery related tests into one file 2021-07-13 14:58:59 +08:00
yyforyongyu
0759771134 itest: move channel openning related tests into one file
This commit creates the file lnd_open_channel_test.go to hold channel
opeopenning related tests.
2021-07-13 14:58:59 +08:00
yyforyongyu
12ca07c089 itest: move testFundingPersistence to lnd_funding_test.go 2021-07-13 14:58:59 +08:00
yyforyongyu
47c40373de itest: move channel policy update test into one file 2021-07-13 14:58:58 +08:00
yyforyongyu
3f78a5da10 itest: move channel force close test into one file 2021-07-13 14:58:58 +08:00
yyforyongyu
e3f2cf1711 itest: move switch related tests into one file
This commit creates the lnd_switch_test.go file to hold switch related
tests, further breaking down the lnd_test.go file.
2021-07-13 14:58:58 +08:00
yyforyongyu
6ca068660c itest: move revocation related tests into one file
This commit creates a new file lnd_revocation_test.go to hold
revocation-related tests, further breaking down the lnd_test.go file.
2021-07-13 14:58:56 +08:00
yyforyongyu
f62cdf7bfc itest: move payment related tests into one file
This commit creates a new file lnd_payment_test.go to hold all payment
related tests, further breaking down the old large lnd_test.go.
2021-07-13 14:52:08 +08:00
yyforyongyu
6f0da73ee1 itest: move assertions into one file
This commit breaks down the lnd_test.go file by moving assertion-related
functions into the file assertions.go.
2021-07-13 14:52:08 +08: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
310e923170 itest: use require inside net.EnsureConnected/net.ConnectNodes 2021-06-29 01:41:48 +08:00
Olaoluwa Osuntokun
e62f0e1f3a Merge pull request #5429 from Roasbeef/itest-recovery-shutdown
lntest: retry node shutdown attempts to recovery tests
2021-06-24 18:43:39 -07:00
Olaoluwa Osuntokun
5bd84e2a60 lntest: retry node shutdown attempts to recovery tests
In #5364 we added a new error path in the `StopDaemon` method to return
an error if shutdown was attempted while a rescan/recover instance was
in progress. Since the wallet actually won't fully stop (atm)
mid-recovery, the call effectively didn't do anything in that scenario,
so we started to return an error to properly reflect that. However this
causes certain itests to fail, as during recovery, the stop attempt will
fail leading to the test itself failing.

In this commit, we wrap the calls to stop a running daemon within a
`wait.NoError` call so we'll continually try to shut down the daemon
rather than quit on the first try.

Fixes #5423.
2021-06-24 15:37:32 -07:00
yyforyongyu
54ed6c271b itest: silence depreciation warnings 2021-06-23 20:35:28 +08:00
yyforyongyu
319cc533a6 itest: fix make lint 2021-06-23 20:35:28 +08:00
yyforyongyu
e10bd84a4f itest: moving routing related tests into one file 2021-06-23 20:35:23 +08:00
Olaoluwa Osuntokun
2fd75ace9d Merge pull request #5374 from yyforyongyu/itest-use-require-sendcoin
itest: use require inside net.SendCoins
2021-06-18 14:12:39 -07: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
a60db53a5a itest: fix wrong node queried for balance 2021-06-03 19:55:25 +08:00
Oliver Gugger
8147b270d4 lntest: wait for chain sync in switch test 2021-05-10 16:46:28 +02:00
Andras Banki-Horvath
dd14947154 lint: silence depreciation warnings 2021-05-04 17:33:14 +02:00
Andras Banki-Horvath
e5f249ad51 mod: integrate latest btcwallet and bump protobuf and grpc 2021-05-04 17:33:09 +02:00
Wilmer Paulino
f26cfac440 itest: use wait predicate for balance assertion in assertDLPExecuted
This assertion would at times fail if the wallet balance hadn't been
updated yet.
2021-04-29 13:56:20 -07:00
Johan T. Halseth
a2a61a104f itest: make sendAndAssertSuccess take context 2021-04-27 09:47:23 +02:00
carla
2e39edd6bd itest/test: add test for expired hold invoices
This commit adds a test for a hold invoice which is accepted
off-chain, and held by the recipient until it expired and
the payer force-closes the channel. With this test we
demonstrate two bugs in our handling of hold invoice state
in the invoice registry when we expire on chain:
- Htlcs not updated: even when we've timed out, we don't
  update the htlc state accordingly.
- Invoice can be settled: the invoice can be settled even
  though it's expired on chain.
2021-04-23 08:19:51 +02:00
Conner Fromknecht
748265d097 Merge pull request #5207 from carlaKC/4727-singleinvoice
invoicesrpc: terminate SubscribeSingleInvoice once invoice reaches a final state
2021-04-14 15:32:53 -07:00
carla
7f1e0a4d7b itest/test: move test hold persistence into its own file 2021-04-14 09:19:21 +02:00
yyforyongyu
a215c55186 itest: add logging for subtests 2021-04-14 12:30:19 +08:00
yyforyongyu
1be7331c4f itest: move funding tests into one file 2021-04-07 02:40:06 +08:00
Wilmer Paulino
983f402369 itest: add wallet import cases 2021-04-05 15:41:12 -07:00
Wilmer Paulino
a620ce3682 build: update btcd and btcwallet dependencies 2021-04-05 15:41:04 -07:00
Olaoluwa Osuntokun
a9afd86a5b Merge pull request #5127 from alexbosworth/patch-15
rpcserver: revert target conf to previous behavior
2021-03-24 16:53:17 -07:00
Alex Bosworth
069de38186 itest: add support for specifying chain fee rate 2021-03-22 13:08:38 -07:00
carla
d0e7164c07 routerrpc: add mission control import 2021-03-18 10:51:45 +02:00
Wilmer Paulino
022d44f776 itest: test new channel update rate limiting options 2021-03-16 12:08:18 -07:00
Elliott Jin
215bf637ea itest: add test for new UpdateChanStatus RPC 2021-02-24 07:13:29 -08: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
Olaoluwa Osuntokun
7b0ea3c029 Merge pull request #4909 from carlaKC/mc-paramsapi
routing: allow runtime updates to mission control config
2021-02-10 18:51:53 -08:00
Conner Fromknecht
58e924ad1c discovery: don't historical sync when NumActiveSyncers == 0
Currently when numgraphsyncpeers=0, lnd will still attempt to perform
an initial historical sync. We change this behavior here to forgoe
historical sync entirely when numgraphsyncpeers is zero, since the
routing table isn't being updated anyway while the node is active.

This permits a no-graph lnd mode where no syncing occurs at all.
2021-02-10 09:35:45 -08:00