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:
parent
3a19afe46d
commit
8f5ddf39ca
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user