itest: use prefixed sub-tests
More sub-tests are needed in "coop close with external delivery" itest, which would break the limit for 50 blocks mined. Turning it into prefixed itest. Also used new exclusion approach in test "remote signer" where all the prefixed tests are excluded.
This commit is contained in:
3 files changed
+58
-63
No files matched your search
+12
-4
@@ -5,6 +5,7 @@ package itest
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/lightningnetwork/lnd/fn/v2"
|
||||
"github.com/lightningnetwork/lnd/lntest"
|
||||
)
|
||||
|
||||
@@ -642,10 +643,6 @@ var allTestCases = []*lntest.TestCase{
|
||||
Name: "sweep commit output and anchor",
|
||||
TestFunc: testSweepCommitOutputAndAnchor,
|
||||
},
|
||||
{
|
||||
Name: "coop close with external delivery",
|
||||
TestFunc: testCoopCloseWithExternalDelivery,
|
||||
},
|
||||
{
|
||||
Name: "payment failed htlc local swept",
|
||||
TestFunc: testPaymentFailedHTLCLocalSwept,
|
||||
@@ -720,6 +717,13 @@ func appendPrefixed(prefix string, testCases,
|
||||
return testCases
|
||||
}
|
||||
|
||||
// extractNames is used to extract tests' names from a group of prefixed tests.
|
||||
func extractNames(prefix string, subtestCases []*lntest.TestCase) []string {
|
||||
return fn.Map(subtestCases, func(tc *lntest.TestCase) string {
|
||||
return fmt.Sprintf("%s-%s", prefix, tc.Name)
|
||||
})
|
||||
}
|
||||
|
||||
func init() {
|
||||
// Register subtests.
|
||||
allTestCases = appendPrefixed(
|
||||
@@ -762,6 +766,10 @@ func init() {
|
||||
allTestCases = appendPrefixed(
|
||||
"wallet", allTestCases, walletTestCases,
|
||||
)
|
||||
allTestCases = appendPrefixed(
|
||||
"coop close with external delivery", allTestCases,
|
||||
coopCloseWithExternalTestCases,
|
||||
)
|
||||
|
||||
// Prepare the test cases for windows to exclude some of the flaky
|
||||
// ones.
|
||||
|
||||
Reference in new issue
Block a user