itest: add a prefix before appending a subtest case

This commit is contained in:
yyforyongyu
2024-12-04 06:29:22 +08:00
parent 686a7dd31c
commit c536bc220f
11 changed files with 165 additions and 129 deletions

View File

@@ -18,7 +18,9 @@ var excludedTestsWindows = []string{
"zero conf channel open", "zero conf channel open",
"open channel with unstable utxos", "open channel with unstable utxos",
"funding flow persistence", "funding flow persistence",
"channel policy update public zero conf",
// Gives "channel link not found" error.
"zero conf-channel policy update public zero conf",
"listsweeps", "listsweeps",
"sweep htlcs", "sweep htlcs",
@@ -30,12 +32,12 @@ var excludedTestsWindows = []string{
"async payments benchmark", "async payments benchmark",
"async bidirectional payments", "async bidirectional payments",
"multihop htlc aggregation leased", "multihop-htlc aggregation leased",
"multihop htlc aggregation leased zero conf", "multihop-htlc aggregation leased zero conf",
"multihop htlc aggregation anchor", "multihop-htlc aggregation anchor",
"multihop htlc aggregation anchor zero conf", "multihop-htlc aggregation anchor zero conf",
"multihop htlc aggregation simple taproot", "multihop-htlc aggregation simple taproot",
"multihop htlc aggregation simple taproot zero conf", "multihop-htlc aggregation simple taproot zero conf",
"channel force closure anchor", "channel force closure anchor",
"channel force closure simple taproot", "channel force closure simple taproot",
@@ -50,18 +52,18 @@ var excludedTestsWindows = []string{
"invoice HTLC modifier basic", "invoice HTLC modifier basic",
"lookup htlc resolution", "lookup htlc resolution",
"remote signer taproot", "remote signer-taproot",
"remote signer account import", "remote signer-account import",
"remote signer bump fee", "remote signer-bump fee",
"remote signer funding input types", "remote signer-funding input types",
"remote signer funding async payments taproot", "remote signer-funding async payments taproot",
"remote signer funding async payments", "remote signer-funding async payments",
"remote signer random seed", "remote signer-random seed",
"remote signer verify msg", "remote signer-verify msg",
"remote signer channel open", "remote signer-channel open",
"remote signer shared key", "remote signer-shared key",
"remote signer psbt", "remote signer-psbt",
"remote signer sign output raw", "remote signer-sign output raw",
"on chain to blinded", "on chain to blinded",
"query blinded route", "query blinded route",
@@ -101,7 +103,8 @@ func filterWindowsFlakyTests() []*lntest.TestCase {
errStr := "\nThe following tests are not found, please make sure the " + errStr := "\nThe following tests are not found, please make sure the " +
"test names are correct in `excludedTestsWindows`.\n" "test names are correct in `excludedTestsWindows`.\n"
for _, name := range excludedSet.ToSlice() { for _, name := range excludedSet.ToSlice() {
errStr += fmt.Sprintf("Test not found in test suite: %v", name) errStr += fmt.Sprintf("Test not found in test suite: %v\n",
name)
} }
panic(errStr) panic(errStr)

View File

@@ -3,6 +3,8 @@
package itest package itest
import ( import (
"fmt"
"github.com/lightningnetwork/lnd/lntest" "github.com/lightningnetwork/lnd/lntest"
) )
@@ -682,19 +684,58 @@ var allTestCases = []*lntest.TestCase{
}, },
} }
// appendPrefixed is used to add a prefix to each test name in the subtests
// before appending them to the main test cases.
func appendPrefixed(prefix string, testCases,
subtestCases []*lntest.TestCase) []*lntest.TestCase {
for _, tc := range subtestCases {
name := fmt.Sprintf("%s-%s", prefix, tc.Name)
testCases = append(testCases, &lntest.TestCase{
Name: name,
TestFunc: tc.TestFunc,
})
}
return testCases
}
func init() { func init() {
// Register subtests. // Register subtests.
allTestCases = append(allTestCases, multiHopForceCloseTestCases...) allTestCases = appendPrefixed(
allTestCases = append(allTestCases, watchtowerTestCases...) "multihop", allTestCases, multiHopForceCloseTestCases,
allTestCases = append(allTestCases, psbtFundingTestCases...) )
allTestCases = append(allTestCases, remoteSignerTestCases...) allTestCases = appendPrefixed(
allTestCases = append(allTestCases, channelRestoreTestCases...) "watchtower", allTestCases, watchtowerTestCases,
allTestCases = append(allTestCases, fundUtxoSelectionTestCases...) )
allTestCases = append(allTestCases, zeroConfPolicyTestCases...) allTestCases = appendPrefixed(
allTestCases = append(allTestCases, channelFeePolicyTestCases...) "psbt", allTestCases, psbtFundingTestCases,
allTestCases = append(allTestCases, walletImportAccountTestCases...) )
allTestCases = append(allTestCases, basicFundingTestCases...) allTestCases = appendPrefixed(
allTestCases = append(allTestCases, sendToRouteTestCases...) "remote signer", allTestCases, remoteSignerTestCases,
)
allTestCases = appendPrefixed(
"channel backup", allTestCases, channelRestoreTestCases,
)
allTestCases = appendPrefixed(
"utxo selection", allTestCases, fundUtxoSelectionTestCases,
)
allTestCases = appendPrefixed(
"zero conf", allTestCases, zeroConfPolicyTestCases,
)
allTestCases = appendPrefixed(
"channel fee policy", allTestCases, channelFeePolicyTestCases,
)
allTestCases = appendPrefixed(
"wallet import account", allTestCases,
walletImportAccountTestCases,
)
allTestCases = appendPrefixed(
"funding", allTestCases, basicFundingTestCases,
)
allTestCases = appendPrefixed(
"send to route", allTestCases, sendToRouteTestCases,
)
// Prepare the test cases for windows to exclude some of the flaky // Prepare the test cases for windows to exclude some of the flaky
// ones. // ones.

View File

@@ -29,7 +29,7 @@ var channelRestoreTestCases = []*lntest.TestCase{
{ {
// Restore the backup from the on-disk file, using the RPC // Restore the backup from the on-disk file, using the RPC
// interface, for anchor commitment channels. // interface, for anchor commitment channels.
Name: "channel backup restore anchor", Name: "restore anchor",
TestFunc: func(ht *lntest.HarnessTest) { TestFunc: func(ht *lntest.HarnessTest) {
runChanRestoreScenarioCommitTypes( runChanRestoreScenarioCommitTypes(
ht, lnrpc.CommitmentType_ANCHORS, false, ht, lnrpc.CommitmentType_ANCHORS, false,
@@ -39,7 +39,7 @@ var channelRestoreTestCases = []*lntest.TestCase{
{ {
// Restore the backup from the on-disk file, using the RPC // Restore the backup from the on-disk file, using the RPC
// interface, for script-enforced leased channels. // interface, for script-enforced leased channels.
Name: "channel backup restore leased", Name: "restore leased",
TestFunc: func(ht *lntest.HarnessTest) { TestFunc: func(ht *lntest.HarnessTest) {
runChanRestoreScenarioCommitTypes( runChanRestoreScenarioCommitTypes(
ht, leasedType, false, ht, leasedType, false,
@@ -49,7 +49,7 @@ var channelRestoreTestCases = []*lntest.TestCase{
{ {
// Restore the backup from the on-disk file, using the RPC // Restore the backup from the on-disk file, using the RPC
// interface, for zero-conf anchor channels. // interface, for zero-conf anchor channels.
Name: "channel backup restore anchor zero conf", Name: "restore anchor zero conf",
TestFunc: func(ht *lntest.HarnessTest) { TestFunc: func(ht *lntest.HarnessTest) {
runChanRestoreScenarioCommitTypes( runChanRestoreScenarioCommitTypes(
ht, lnrpc.CommitmentType_ANCHORS, true, ht, lnrpc.CommitmentType_ANCHORS, true,
@@ -59,7 +59,7 @@ var channelRestoreTestCases = []*lntest.TestCase{
{ {
// Restore the backup from the on-disk file, using the RPC // Restore the backup from the on-disk file, using the RPC
// interface for a zero-conf script-enforced leased channel. // interface for a zero-conf script-enforced leased channel.
Name: "channel backup restore leased zero conf", Name: "restore leased zero conf",
TestFunc: func(ht *lntest.HarnessTest) { TestFunc: func(ht *lntest.HarnessTest) {
runChanRestoreScenarioCommitTypes( runChanRestoreScenarioCommitTypes(
ht, leasedType, true, ht, leasedType, true,
@@ -69,7 +69,7 @@ var channelRestoreTestCases = []*lntest.TestCase{
{ {
// Restore a channel back up of a taproot channel that was // Restore a channel back up of a taproot channel that was
// confirmed. // confirmed.
Name: "channel backup restore simple taproot", Name: "restore simple taproot",
TestFunc: func(ht *lntest.HarnessTest) { TestFunc: func(ht *lntest.HarnessTest) {
runChanRestoreScenarioCommitTypes( runChanRestoreScenarioCommitTypes(
ht, lnrpc.CommitmentType_SIMPLE_TAPROOT, false, ht, lnrpc.CommitmentType_SIMPLE_TAPROOT, false,
@@ -78,7 +78,7 @@ var channelRestoreTestCases = []*lntest.TestCase{
}, },
{ {
// Restore a channel back up of an unconfirmed taproot channel. // Restore a channel back up of an unconfirmed taproot channel.
Name: "channel backup restore simple taproot zero conf", Name: "restore simple taproot zero conf",
TestFunc: func(ht *lntest.HarnessTest) { TestFunc: func(ht *lntest.HarnessTest) {
runChanRestoreScenarioCommitTypes( runChanRestoreScenarioCommitTypes(
ht, lnrpc.CommitmentType_SIMPLE_TAPROOT, true, ht, lnrpc.CommitmentType_SIMPLE_TAPROOT, true,
@@ -86,23 +86,23 @@ var channelRestoreTestCases = []*lntest.TestCase{
}, },
}, },
{ {
Name: "channel backup restore from rpc", Name: "restore from rpc",
TestFunc: testChannelBackupRestoreFromRPC, TestFunc: testChannelBackupRestoreFromRPC,
}, },
{ {
Name: "channel backup restore from file", Name: "restore from file",
TestFunc: testChannelBackupRestoreFromFile, TestFunc: testChannelBackupRestoreFromFile,
}, },
{ {
Name: "channel backup restore during creation", Name: "restore during creation",
TestFunc: testChannelBackupRestoreDuringCreation, TestFunc: testChannelBackupRestoreDuringCreation,
}, },
{ {
Name: "channel backup restore during unlock", Name: "restore during unlock",
TestFunc: testChannelBackupRestoreDuringUnlock, TestFunc: testChannelBackupRestoreDuringUnlock,
}, },
{ {
Name: "channel backup restore twice", Name: "restore twice",
TestFunc: testChannelBackupRestoreTwice, TestFunc: testChannelBackupRestoreTwice,
}, },
} }

View File

@@ -17,31 +17,31 @@ import (
var fundUtxoSelectionTestCases = []*lntest.TestCase{ var fundUtxoSelectionTestCases = []*lntest.TestCase{
{ {
Name: "utxo selection funding error", Name: "funding error",
TestFunc: testChannelUtxoSelectionError, TestFunc: testChannelUtxoSelectionError,
}, },
{ {
Name: "utxo selection selected valid chan size", Name: "selected valid chan size",
TestFunc: testUtxoSelectionSelectedValidChanSize, TestFunc: testUtxoSelectionSelectedValidChanSize,
}, },
{ {
Name: "utxo selection selected valid chan reserve", Name: "selected valid chan reserve",
TestFunc: testUtxoSelectionSelectedValidChanReserve, TestFunc: testUtxoSelectionSelectedValidChanReserve,
}, },
{ {
Name: "utxo selection selected reserve from selected", Name: "selected reserve from selected",
TestFunc: testUtxoSelectionReserveFromSelected, TestFunc: testUtxoSelectionReserveFromSelected,
}, },
{ {
Name: "utxo selection fundmax", Name: "fundmax",
TestFunc: testUtxoSelectionFundmax, TestFunc: testUtxoSelectionFundmax,
}, },
{ {
Name: "utxo selection fundmax reserve", Name: "fundmax reserve",
TestFunc: testUtxoSelectionFundmaxReserve, TestFunc: testUtxoSelectionFundmaxReserve,
}, },
{ {
Name: "utxo selection reused utxo", Name: "reused utxo",
TestFunc: testUtxoSelectionReuseUTXO, TestFunc: testUtxoSelectionReuseUTXO,
}, },
} }

View File

@@ -23,15 +23,15 @@ import (
// basicFundingTestCases defines the test cases for the basic funding test. // basicFundingTestCases defines the test cases for the basic funding test.
var basicFundingTestCases = []*lntest.TestCase{ var basicFundingTestCases = []*lntest.TestCase{
{ {
Name: "basic funding flow static key remote", Name: "basic flow static key remote",
TestFunc: testBasicChannelFundingStaticRemote, TestFunc: testBasicChannelFundingStaticRemote,
}, },
{ {
Name: "basic funding flow anchor", Name: "basic flow anchor",
TestFunc: testBasicChannelFundingAnchor, TestFunc: testBasicChannelFundingAnchor,
}, },
{ {
Name: "basic funding flow simple taproot", Name: "basic flow simple taproot",
TestFunc: testBasicChannelFundingSimpleTaproot, TestFunc: testBasicChannelFundingSimpleTaproot,
}, },
} }

View File

@@ -29,171 +29,171 @@ var leasedType = lnrpc.CommitmentType_SCRIPT_ENFORCED_LEASE
//nolint:ll //nolint:ll
var multiHopForceCloseTestCases = []*lntest.TestCase{ var multiHopForceCloseTestCases = []*lntest.TestCase{
{ {
Name: "multihop local claim outgoing htlc anchor", Name: "local claim outgoing htlc anchor",
TestFunc: testLocalClaimOutgoingHTLCAnchor, TestFunc: testLocalClaimOutgoingHTLCAnchor,
}, },
{ {
Name: "multihop local claim outgoing htlc anchor zero conf", Name: "local claim outgoing htlc anchor zero conf",
TestFunc: testLocalClaimOutgoingHTLCAnchorZeroConf, TestFunc: testLocalClaimOutgoingHTLCAnchorZeroConf,
}, },
{ {
Name: "multihop local claim outgoing htlc simple taproot", Name: "local claim outgoing htlc simple taproot",
TestFunc: testLocalClaimOutgoingHTLCSimpleTaproot, TestFunc: testLocalClaimOutgoingHTLCSimpleTaproot,
}, },
{ {
Name: "multihop local claim outgoing htlc simple taproot zero conf", Name: "local claim outgoing htlc simple taproot zero conf",
TestFunc: testLocalClaimOutgoingHTLCSimpleTaprootZeroConf, TestFunc: testLocalClaimOutgoingHTLCSimpleTaprootZeroConf,
}, },
{ {
Name: "multihop local claim outgoing htlc leased", Name: "local claim outgoing htlc leased",
TestFunc: testLocalClaimOutgoingHTLCLeased, TestFunc: testLocalClaimOutgoingHTLCLeased,
}, },
{ {
Name: "multihop local claim outgoing htlc leased zero conf", Name: "local claim outgoing htlc leased zero conf",
TestFunc: testLocalClaimOutgoingHTLCLeasedZeroConf, TestFunc: testLocalClaimOutgoingHTLCLeasedZeroConf,
}, },
{ {
Name: "multihop receiver preimage claim anchor", Name: "receiver preimage claim anchor",
TestFunc: testMultiHopReceiverPreimageClaimAnchor, TestFunc: testMultiHopReceiverPreimageClaimAnchor,
}, },
{ {
Name: "multihop receiver preimage claim anchor zero conf", Name: "receiver preimage claim anchor zero conf",
TestFunc: testMultiHopReceiverPreimageClaimAnchorZeroConf, TestFunc: testMultiHopReceiverPreimageClaimAnchorZeroConf,
}, },
{ {
Name: "multihop receiver preimage claim simple taproot", Name: "receiver preimage claim simple taproot",
TestFunc: testMultiHopReceiverPreimageClaimSimpleTaproot, TestFunc: testMultiHopReceiverPreimageClaimSimpleTaproot,
}, },
{ {
Name: "multihop receiver preimage claim simple taproot zero conf", Name: "receiver preimage claim simple taproot zero conf",
TestFunc: testMultiHopReceiverPreimageClaimSimpleTaprootZeroConf, TestFunc: testMultiHopReceiverPreimageClaimSimpleTaprootZeroConf,
}, },
{ {
Name: "multihop receiver preimage claim leased", Name: "receiver preimage claim leased",
TestFunc: testMultiHopReceiverPreimageClaimLeased, TestFunc: testMultiHopReceiverPreimageClaimLeased,
}, },
{ {
Name: "multihop receiver preimage claim leased zero conf", Name: "receiver preimage claim leased zero conf",
TestFunc: testMultiHopReceiverPreimageClaimLeasedZeroConf, TestFunc: testMultiHopReceiverPreimageClaimLeasedZeroConf,
}, },
{ {
Name: "multihop local force close before timeout anchor", Name: "local force close before timeout anchor",
TestFunc: testLocalForceCloseBeforeTimeoutAnchor, TestFunc: testLocalForceCloseBeforeTimeoutAnchor,
}, },
{ {
Name: "multihop local force close before timeout anchor zero conf", Name: "local force close before timeout anchor zero conf",
TestFunc: testLocalForceCloseBeforeTimeoutAnchorZeroConf, TestFunc: testLocalForceCloseBeforeTimeoutAnchorZeroConf,
}, },
{ {
Name: "multihop local force close before timeout simple taproot", Name: "local force close before timeout simple taproot",
TestFunc: testLocalForceCloseBeforeTimeoutSimpleTaproot, TestFunc: testLocalForceCloseBeforeTimeoutSimpleTaproot,
}, },
{ {
Name: "multihop local force close before timeout simple taproot zero conf", Name: "local force close before timeout simple taproot zero conf",
TestFunc: testLocalForceCloseBeforeTimeoutSimpleTaprootZeroConf, TestFunc: testLocalForceCloseBeforeTimeoutSimpleTaprootZeroConf,
}, },
{ {
Name: "multihop local force close before timeout leased", Name: "local force close before timeout leased",
TestFunc: testLocalForceCloseBeforeTimeoutLeased, TestFunc: testLocalForceCloseBeforeTimeoutLeased,
}, },
{ {
Name: "multihop local force close before timeout leased zero conf", Name: "local force close before timeout leased zero conf",
TestFunc: testLocalForceCloseBeforeTimeoutLeasedZeroConf, TestFunc: testLocalForceCloseBeforeTimeoutLeasedZeroConf,
}, },
{ {
Name: "multihop remote force close before timeout anchor", Name: "remote force close before timeout anchor",
TestFunc: testRemoteForceCloseBeforeTimeoutAnchor, TestFunc: testRemoteForceCloseBeforeTimeoutAnchor,
}, },
{ {
Name: "multihop remote force close before timeout anchor zero conf", Name: "remote force close before timeout anchor zero conf",
TestFunc: testRemoteForceCloseBeforeTimeoutAnchorZeroConf, TestFunc: testRemoteForceCloseBeforeTimeoutAnchorZeroConf,
}, },
{ {
Name: "multihop remote force close before timeout simple taproot", Name: "remote force close before timeout simple taproot",
TestFunc: testRemoteForceCloseBeforeTimeoutSimpleTaproot, TestFunc: testRemoteForceCloseBeforeTimeoutSimpleTaproot,
}, },
{ {
Name: "multihop remote force close before timeout simple taproot zero conf", Name: "remote force close before timeout simple taproot zero conf",
TestFunc: testRemoteForceCloseBeforeTimeoutSimpleTaprootZeroConf, TestFunc: testRemoteForceCloseBeforeTimeoutSimpleTaprootZeroConf,
}, },
{ {
Name: "multihop remote force close before timeout leased", Name: "remote force close before timeout leased",
TestFunc: testRemoteForceCloseBeforeTimeoutLeased, TestFunc: testRemoteForceCloseBeforeTimeoutLeased,
}, },
{ {
Name: "multihop remote force close before timeout leased zero conf", Name: "remote force close before timeout leased zero conf",
TestFunc: testRemoteForceCloseBeforeTimeoutLeasedZeroConf, TestFunc: testRemoteForceCloseBeforeTimeoutLeasedZeroConf,
}, },
{ {
Name: "multihop local claim incoming htlc anchor", Name: "local claim incoming htlc anchor",
TestFunc: testLocalClaimIncomingHTLCAnchor, TestFunc: testLocalClaimIncomingHTLCAnchor,
}, },
{ {
Name: "multihop local claim incoming htlc anchor zero conf", Name: "local claim incoming htlc anchor zero conf",
TestFunc: testLocalClaimIncomingHTLCAnchorZeroConf, TestFunc: testLocalClaimIncomingHTLCAnchorZeroConf,
}, },
{ {
Name: "multihop local claim incoming htlc simple taproot", Name: "local claim incoming htlc simple taproot",
TestFunc: testLocalClaimIncomingHTLCSimpleTaproot, TestFunc: testLocalClaimIncomingHTLCSimpleTaproot,
}, },
{ {
Name: "multihop local claim incoming htlc simple taproot zero conf", Name: "local claim incoming htlc simple taproot zero conf",
TestFunc: testLocalClaimIncomingHTLCSimpleTaprootZeroConf, TestFunc: testLocalClaimIncomingHTLCSimpleTaprootZeroConf,
}, },
{ {
Name: "multihop local claim incoming htlc leased", Name: "local claim incoming htlc leased",
TestFunc: testLocalClaimIncomingHTLCLeased, TestFunc: testLocalClaimIncomingHTLCLeased,
}, },
{ {
Name: "multihop local claim incoming htlc leased zero conf", Name: "local claim incoming htlc leased zero conf",
TestFunc: testLocalClaimIncomingHTLCLeasedZeroConf, TestFunc: testLocalClaimIncomingHTLCLeasedZeroConf,
}, },
{ {
Name: "multihop local preimage claim anchor", Name: "local preimage claim anchor",
TestFunc: testLocalPreimageClaimAnchor, TestFunc: testLocalPreimageClaimAnchor,
}, },
{ {
Name: "multihop local preimage claim anchor zero conf", Name: "local preimage claim anchor zero conf",
TestFunc: testLocalPreimageClaimAnchorZeroConf, TestFunc: testLocalPreimageClaimAnchorZeroConf,
}, },
{ {
Name: "multihop local preimage claim simple taproot", Name: "local preimage claim simple taproot",
TestFunc: testLocalPreimageClaimSimpleTaproot, TestFunc: testLocalPreimageClaimSimpleTaproot,
}, },
{ {
Name: "multihop local preimage claim simple taproot zero conf", Name: "local preimage claim simple taproot zero conf",
TestFunc: testLocalPreimageClaimSimpleTaprootZeroConf, TestFunc: testLocalPreimageClaimSimpleTaprootZeroConf,
}, },
{ {
Name: "multihop local preimage claim leased", Name: "local preimage claim leased",
TestFunc: testLocalPreimageClaimLeased, TestFunc: testLocalPreimageClaimLeased,
}, },
{ {
Name: "multihop local preimage claim leased zero conf", Name: "local preimage claim leased zero conf",
TestFunc: testLocalPreimageClaimLeasedZeroConf, TestFunc: testLocalPreimageClaimLeasedZeroConf,
}, },
{ {
Name: "multihop htlc aggregation anchor", Name: "htlc aggregation anchor",
TestFunc: testHtlcAggregaitonAnchor, TestFunc: testHtlcAggregaitonAnchor,
}, },
{ {
Name: "multihop htlc aggregation anchor zero conf", Name: "htlc aggregation anchor zero conf",
TestFunc: testHtlcAggregaitonAnchorZeroConf, TestFunc: testHtlcAggregaitonAnchorZeroConf,
}, },
{ {
Name: "multihop htlc aggregation simple taproot", Name: "htlc aggregation simple taproot",
TestFunc: testHtlcAggregaitonSimpleTaproot, TestFunc: testHtlcAggregaitonSimpleTaproot,
}, },
{ {
Name: "multihop htlc aggregation simple taproot zero conf", Name: "htlc aggregation simple taproot zero conf",
TestFunc: testHtlcAggregaitonSimpleTaprootZeroConf, TestFunc: testHtlcAggregaitonSimpleTaprootZeroConf,
}, },
{ {
Name: "multihop htlc aggregation leased", Name: "htlc aggregation leased",
TestFunc: testHtlcAggregaitonLeased, TestFunc: testHtlcAggregaitonLeased,
}, },
{ {
Name: "multihop htlc aggregation leased zero conf", Name: "htlc aggregation leased zero conf",
TestFunc: testHtlcAggregaitonLeasedZeroConf, TestFunc: testHtlcAggregaitonLeasedZeroConf,
}, },
} }

View File

@@ -21,23 +21,23 @@ import (
// policy fee behavior. // policy fee behavior.
var channelFeePolicyTestCases = []*lntest.TestCase{ var channelFeePolicyTestCases = []*lntest.TestCase{
{ {
Name: "channel fee policy default", Name: "default",
TestFunc: testChannelFeePolicyDefault, TestFunc: testChannelFeePolicyDefault,
}, },
{ {
Name: "channel fee policy base fee", Name: "base fee",
TestFunc: testChannelFeePolicyBaseFee, TestFunc: testChannelFeePolicyBaseFee,
}, },
{ {
Name: "channel fee policy fee rate", Name: "fee rate",
TestFunc: testChannelFeePolicyFeeRate, TestFunc: testChannelFeePolicyFeeRate,
}, },
{ {
Name: "channel fee policy base fee and fee rate", Name: "base fee and fee rate",
TestFunc: testChannelFeePolicyBaseFeeAndFeeRate, TestFunc: testChannelFeePolicyBaseFeeAndFeeRate,
}, },
{ {
Name: "channel fee policy low base fee and fee rate", Name: "low base fee and fee rate",
TestFunc: testChannelFeePolicyLowBaseFeeAndFeeRate, TestFunc: testChannelFeePolicyLowBaseFeeAndFeeRate,
}, },
} }

View File

@@ -20,51 +20,51 @@ import (
// signer. // signer.
var remoteSignerTestCases = []*lntest.TestCase{ var remoteSignerTestCases = []*lntest.TestCase{
{ {
Name: "remote signer random seed", Name: "random seed",
TestFunc: testRemoteSignerRadomSeed, TestFunc: testRemoteSignerRadomSeed,
}, },
{ {
Name: "remote signer account import", Name: "account import",
TestFunc: testRemoteSignerAccountImport, TestFunc: testRemoteSignerAccountImport,
}, },
{ {
Name: "remote signer channel open", Name: "channel open",
TestFunc: testRemoteSignerChannelOpen, TestFunc: testRemoteSignerChannelOpen,
}, },
{ {
Name: "remote signer funding input types", Name: "funding input types",
TestFunc: testRemoteSignerChannelFundingInputTypes, TestFunc: testRemoteSignerChannelFundingInputTypes,
}, },
{ {
Name: "remote signer funding async payments", Name: "funding async payments",
TestFunc: testRemoteSignerAsyncPayments, TestFunc: testRemoteSignerAsyncPayments,
}, },
{ {
Name: "remote signer funding async payments taproot", Name: "funding async payments taproot",
TestFunc: testRemoteSignerAsyncPaymentsTaproot, TestFunc: testRemoteSignerAsyncPaymentsTaproot,
}, },
{ {
Name: "remote signer shared key", Name: "shared key",
TestFunc: testRemoteSignerSharedKey, TestFunc: testRemoteSignerSharedKey,
}, },
{ {
Name: "remote signer bump fee", Name: "bump fee",
TestFunc: testRemoteSignerBumpFee, TestFunc: testRemoteSignerBumpFee,
}, },
{ {
Name: "remote signer psbt", Name: "psbt",
TestFunc: testRemoteSignerPSBT, TestFunc: testRemoteSignerPSBT,
}, },
{ {
Name: "remote signer sign output raw", Name: "sign output raw",
TestFunc: testRemoteSignerSignOutputRaw, TestFunc: testRemoteSignerSignOutputRaw,
}, },
{ {
Name: "remote signer verify msg", Name: "verify msg",
TestFunc: testRemoteSignerSignVerifyMsg, TestFunc: testRemoteSignerSignVerifyMsg,
}, },
{ {
Name: "remote signer taproot", Name: "taproot",
TestFunc: testRemoteSignerTaproot, TestFunc: testRemoteSignerTaproot,
}, },
} }

View File

@@ -22,21 +22,21 @@ import (
var sendToRouteTestCases = []*lntest.TestCase{ var sendToRouteTestCases = []*lntest.TestCase{
{ {
Name: "single hop send to route sync", Name: "single hop with sync",
TestFunc: func(ht *lntest.HarnessTest) { TestFunc: func(ht *lntest.HarnessTest) {
// useStream: false, routerrpc: false. // useStream: false, routerrpc: false.
testSingleHopSendToRouteCase(ht, false, false) testSingleHopSendToRouteCase(ht, false, false)
}, },
}, },
{ {
Name: "single hop send to route stream", Name: "single hop with stream",
TestFunc: func(ht *lntest.HarnessTest) { TestFunc: func(ht *lntest.HarnessTest) {
// useStream: true, routerrpc: false. // useStream: true, routerrpc: false.
testSingleHopSendToRouteCase(ht, true, false) testSingleHopSendToRouteCase(ht, true, false)
}, },
}, },
{ {
Name: "single hop send to route v2", Name: "single hop with v2",
TestFunc: func(ht *lntest.HarnessTest) { TestFunc: func(ht *lntest.HarnessTest) {
// useStream: false, routerrpc: true. // useStream: false, routerrpc: true.
testSingleHopSendToRouteCase(ht, false, true) testSingleHopSendToRouteCase(ht, false, true)

View File

@@ -31,15 +31,7 @@ import (
//nolint:ll //nolint:ll
var walletImportAccountTestCases = []*lntest.TestCase{ var walletImportAccountTestCases = []*lntest.TestCase{
{ {
Name: "wallet import account standard BIP-0044", Name: "standard BIP-0049",
TestFunc: func(ht *lntest.HarnessTest) {
testWalletImportAccountScenario(
ht, walletrpc.AddressType_WITNESS_PUBKEY_HASH,
)
},
},
{
Name: "wallet import account standard BIP-0049",
TestFunc: func(ht *lntest.HarnessTest) { TestFunc: func(ht *lntest.HarnessTest) {
testWalletImportAccountScenario( testWalletImportAccountScenario(
ht, walletrpc.AddressType_NESTED_WITNESS_PUBKEY_HASH, ht, walletrpc.AddressType_NESTED_WITNESS_PUBKEY_HASH,
@@ -47,7 +39,7 @@ var walletImportAccountTestCases = []*lntest.TestCase{
}, },
}, },
{ {
Name: "wallet import account lnd BIP-0049 variant", Name: "lnd BIP-0049 variant",
TestFunc: func(ht *lntest.HarnessTest) { TestFunc: func(ht *lntest.HarnessTest) {
testWalletImportAccountScenario( testWalletImportAccountScenario(
ht, walletrpc.AddressType_HYBRID_NESTED_WITNESS_PUBKEY_HASH, ht, walletrpc.AddressType_HYBRID_NESTED_WITNESS_PUBKEY_HASH,
@@ -55,7 +47,7 @@ var walletImportAccountTestCases = []*lntest.TestCase{
}, },
}, },
{ {
Name: "wallet import account standard BIP-0084", Name: "standard BIP-0084",
TestFunc: func(ht *lntest.HarnessTest) { TestFunc: func(ht *lntest.HarnessTest) {
testWalletImportAccountScenario( testWalletImportAccountScenario(
ht, walletrpc.AddressType_WITNESS_PUBKEY_HASH, ht, walletrpc.AddressType_WITNESS_PUBKEY_HASH,
@@ -63,7 +55,7 @@ var walletImportAccountTestCases = []*lntest.TestCase{
}, },
}, },
{ {
Name: "wallet import account standard BIP-0086", Name: "standard BIP-0086",
TestFunc: func(ht *lntest.HarnessTest) { TestFunc: func(ht *lntest.HarnessTest) {
testWalletImportAccountScenario( testWalletImportAccountScenario(
ht, walletrpc.AddressType_TAPROOT_PUBKEY, ht, walletrpc.AddressType_TAPROOT_PUBKEY,

View File

@@ -23,15 +23,15 @@ import (
// watchtower client and server. // watchtower client and server.
var watchtowerTestCases = []*lntest.TestCase{ var watchtowerTestCases = []*lntest.TestCase{
{ {
Name: "watchtower revoked close retribution altruist", Name: "revoked close retribution altruist",
TestFunc: testRevokedCloseRetributionAltruistWatchtower, TestFunc: testRevokedCloseRetributionAltruistWatchtower,
}, },
{ {
Name: "watchtower client session deletion", Name: "client session deletion",
TestFunc: testTowerClientSessionDeletion, TestFunc: testTowerClientSessionDeletion,
}, },
{ {
Name: "watchtower client tower and session management", Name: "client tower and session management",
TestFunc: testTowerClientTowerAndSessionManagement, TestFunc: testTowerClientTowerAndSessionManagement,
}, },
} }