mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-02-24 06:47:44 +01:00
Merge pull request #7337 from yyforyongyu/fix-unit-test
bitcoindnotify: fix subtest closure in unit tests
This commit is contained in:
commit
b5bf658780
3 changed files with 30 additions and 6 deletions
|
@ -105,8 +105,15 @@ func syncNotifierWithMiner(t *testing.T, notifier *BitcoindNotifier,
|
||||||
// TestHistoricalConfDetailsTxIndex ensures that we correctly retrieve
|
// TestHistoricalConfDetailsTxIndex ensures that we correctly retrieve
|
||||||
// historical confirmation details using the backend node's txindex.
|
// historical confirmation details using the backend node's txindex.
|
||||||
func TestHistoricalConfDetailsTxIndex(t *testing.T) {
|
func TestHistoricalConfDetailsTxIndex(t *testing.T) {
|
||||||
testHistoricalConfDetailsTxIndex(t, true)
|
t.Run("txindex enabled", func(st *testing.T) {
|
||||||
testHistoricalConfDetailsTxIndex(t, false)
|
st.Parallel()
|
||||||
|
testHistoricalConfDetailsTxIndex(st, true)
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("txindex disabled", func(st *testing.T) {
|
||||||
|
st.Parallel()
|
||||||
|
testHistoricalConfDetailsTxIndex(st, false)
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
func testHistoricalConfDetailsTxIndex(t *testing.T, rpcPolling bool) {
|
func testHistoricalConfDetailsTxIndex(t *testing.T, rpcPolling bool) {
|
||||||
|
@ -193,8 +200,15 @@ func testHistoricalConfDetailsTxIndex(t *testing.T, rpcPolling bool) {
|
||||||
// historical confirmation details using the set of fallback methods when the
|
// historical confirmation details using the set of fallback methods when the
|
||||||
// backend node's txindex is disabled.
|
// backend node's txindex is disabled.
|
||||||
func TestHistoricalConfDetailsNoTxIndex(t *testing.T) {
|
func TestHistoricalConfDetailsNoTxIndex(t *testing.T) {
|
||||||
testHistoricalConfDetailsNoTxIndex(t, true)
|
t.Run("txindex enabled", func(st *testing.T) {
|
||||||
testHistoricalConfDetailsNoTxIndex(t, false)
|
st.Parallel()
|
||||||
|
testHistoricalConfDetailsNoTxIndex(st, true)
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("txindex disabled", func(st *testing.T) {
|
||||||
|
st.Parallel()
|
||||||
|
testHistoricalConfDetailsNoTxIndex(st, false)
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
func testHistoricalConfDetailsNoTxIndex(t *testing.T, rpcpolling bool) {
|
func testHistoricalConfDetailsNoTxIndex(t *testing.T, rpcpolling bool) {
|
||||||
|
|
|
@ -12,6 +12,13 @@ import (
|
||||||
// TestInterfaces executes the generic notifier test suite against a bitcoind
|
// TestInterfaces executes the generic notifier test suite against a bitcoind
|
||||||
// powered chain notifier.
|
// powered chain notifier.
|
||||||
func TestInterfaces(t *testing.T) {
|
func TestInterfaces(t *testing.T) {
|
||||||
chainntnfstest.TestInterfaces(t, "bitcoind")
|
t.Run("bitcoind", func(st *testing.T) {
|
||||||
chainntnfstest.TestInterfaces(t, "bitcoind-rpc-polling")
|
st.Parallel()
|
||||||
|
chainntnfstest.TestInterfaces(st, "bitcoind")
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("bitcoind rpc polling", func(st *testing.T) {
|
||||||
|
st.Parallel()
|
||||||
|
chainntnfstest.TestInterfaces(st, "bitcoind-rpc-polling")
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
|
@ -301,6 +301,9 @@ data.
|
||||||
refactored](https://github.com/lightningnetwork/lnd/pull/7174) to allow the
|
refactored](https://github.com/lightningnetwork/lnd/pull/7174) to allow the
|
||||||
usage of new payment statuses.
|
usage of new payment statuses.
|
||||||
|
|
||||||
|
* [Fixed a test closure](https://github.com/lightningnetwork/lnd/pull/7337)
|
||||||
|
issue found in `bitcoindnotify/bitcoind_test.go`.
|
||||||
|
|
||||||
## Watchtowers
|
## Watchtowers
|
||||||
|
|
||||||
* [Create a towerID-to-sessionID index in the wtclient DB to improve the
|
* [Create a towerID-to-sessionID index in the wtclient DB to improve the
|
||||||
|
|
Loading…
Add table
Reference in a new issue