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:
Conner Fromknecht 2019-04-03 17:23:12 -07:00
parent 3a19afe46d
commit 8f5ddf39ca
No known key found for this signature in database
GPG Key ID: E7D737B67FA592C7

@ -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