lnwallet/test: execute ifacet tests for each backend in parallel

This commit is contained in:
Conner Fromknecht 2020-12-10 15:51:41 -08:00
parent 87787ce771
commit 0d57ff2432
No known key found for this signature in database
GPG Key ID: E7D737B67FA592C7
4 changed files with 45 additions and 2 deletions

View 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")
}

View 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")
}

View 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")
}

View File

@ -1,4 +1,4 @@
package lnwallettest_test
package lnwallettest
import (
"bytes"
@ -3086,7 +3086,7 @@ func testSingleFunderExternalFundingTx(miner *rpctest.Harness,
// below needs to be added which properly initializes the interface.
//
// TODO(roasbeef): purge bobNode in favor of dual lnwallet's
func TestLightningWallet(t *testing.T) {
func TestLightningWallet(t *testing.T, targetBackEnd string) {
t.Parallel()
// 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 _, backEnd := range walletDriver.BackEnds() {
if backEnd != targetBackEnd {
continue
}
if !runTests(t, walletDriver, backEnd, miningNode,
rpcConfig, chainNotifier) {
return