lnwallet/test: execute ifacet tests for each backend in parallel
This commit is contained in:
parent
87787ce771
commit
0d57ff2432
13
lnwallet/test/bitcoind/bitcoind_test.go
Normal file
13
lnwallet/test/bitcoind/bitcoind_test.go
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
package bitcoind_test
|
||||||
|
|
||||||
|
import (
|
||||||
|
"testing"
|
||||||
|
|
||||||
|
lnwallettest "github.com/lightningnetwork/lnd/lnwallet/test"
|
||||||
|
)
|
||||||
|
|
||||||
|
// TestLightningWallet tests LightningWallet powered by bitcoind against our
|
||||||
|
// suite of interface tests.
|
||||||
|
func TestLightningWallet(t *testing.T) {
|
||||||
|
lnwallettest.TestLightningWallet(t, "bitcoind")
|
||||||
|
}
|
13
lnwallet/test/btcd/btcd_test.go
Normal file
13
lnwallet/test/btcd/btcd_test.go
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
package btcd_test
|
||||||
|
|
||||||
|
import (
|
||||||
|
"testing"
|
||||||
|
|
||||||
|
lnwallettest "github.com/lightningnetwork/lnd/lnwallet/test"
|
||||||
|
)
|
||||||
|
|
||||||
|
// TestLightningWallet tests LightningWallet powered by btcd against our suite
|
||||||
|
// of interface tests.
|
||||||
|
func TestLightningWallet(t *testing.T) {
|
||||||
|
lnwallettest.TestLightningWallet(t, "btcd")
|
||||||
|
}
|
13
lnwallet/test/neutrino/neutrino_test.go
Normal file
13
lnwallet/test/neutrino/neutrino_test.go
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
package neutrino_test
|
||||||
|
|
||||||
|
import (
|
||||||
|
"testing"
|
||||||
|
|
||||||
|
lnwallettest "github.com/lightningnetwork/lnd/lnwallet/test"
|
||||||
|
)
|
||||||
|
|
||||||
|
// TestLightningWallet tests LightningWallet powered by neutrino against our
|
||||||
|
// suite of interface tests.
|
||||||
|
func TestLightningWallet(t *testing.T) {
|
||||||
|
lnwallettest.TestLightningWallet(t, "neutrino")
|
||||||
|
}
|
@ -1,4 +1,4 @@
|
|||||||
package lnwallettest_test
|
package lnwallettest
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
@ -3086,7 +3086,7 @@ func testSingleFunderExternalFundingTx(miner *rpctest.Harness,
|
|||||||
// below needs to be added which properly initializes the interface.
|
// below needs to be added which properly initializes the interface.
|
||||||
//
|
//
|
||||||
// TODO(roasbeef): purge bobNode in favor of dual lnwallet's
|
// TODO(roasbeef): purge bobNode in favor of dual lnwallet's
|
||||||
func TestLightningWallet(t *testing.T) {
|
func TestLightningWallet(t *testing.T, targetBackEnd string) {
|
||||||
t.Parallel()
|
t.Parallel()
|
||||||
|
|
||||||
// Initialize the harness around a btcd node which will serve as our
|
// Initialize the harness around a btcd node which will serve as our
|
||||||
@ -3140,6 +3140,10 @@ func TestLightningWallet(t *testing.T) {
|
|||||||
|
|
||||||
for _, walletDriver := range lnwallet.RegisteredWallets() {
|
for _, walletDriver := range lnwallet.RegisteredWallets() {
|
||||||
for _, backEnd := range walletDriver.BackEnds() {
|
for _, backEnd := range walletDriver.BackEnds() {
|
||||||
|
if backEnd != targetBackEnd {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
if !runTests(t, walletDriver, backEnd, miningNode,
|
if !runTests(t, walletDriver, backEnd, miningNode,
|
||||||
rpcConfig, chainNotifier) {
|
rpcConfig, chainNotifier) {
|
||||||
return
|
return
|
Loading…
Reference in New Issue
Block a user