mirror of
https://github.com/aljazceru/breez-lnd.git
synced 2026-02-23 15:34:22 +01:00
lnd_test: use child harness chan backup restore cases
This prevents a panic during test failure due to a child test calling FailNow on a parent test context. The sub tests now capture the testing.T object provided in each closure as opposed to ignoring it and using the parent context.
This commit is contained in:
@@ -13847,8 +13847,9 @@ func testChannelBackupRestore(net *lntest.NetworkHarness, t *harnessTest) {
|
||||
// ann is updated?
|
||||
|
||||
for _, testCase := range testCases {
|
||||
success := t.t.Run(testCase.name, func(_ *testing.T) {
|
||||
testChanRestoreScenario(t, net, &testCase, password)
|
||||
success := t.t.Run(testCase.name, func(t *testing.T) {
|
||||
h := newHarnessTest(t)
|
||||
testChanRestoreScenario(h, net, &testCase, password)
|
||||
})
|
||||
if !success {
|
||||
break
|
||||
|
||||
Reference in New Issue
Block a user