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?
|
// ann is updated?
|
||||||
|
|
||||||
for _, testCase := range testCases {
|
for _, testCase := range testCases {
|
||||||
success := t.t.Run(testCase.name, func(_ *testing.T) {
|
success := t.t.Run(testCase.name, func(t *testing.T) {
|
||||||
testChanRestoreScenario(t, net, &testCase, password)
|
h := newHarnessTest(t)
|
||||||
|
testChanRestoreScenario(h, net, &testCase, password)
|
||||||
})
|
})
|
||||||
if !success {
|
if !success {
|
||||||
break
|
break
|
||||||
|
Loading…
Reference in New Issue
Block a user