itest: fix channel backup subscription test

With one more notification event being dispatched in the local force
close case we need to update one of the integration tests to account for
the additional message.
This commit is contained in:
Oliver Gugger 2021-08-09 13:55:35 +02:00
parent 06a693f10e
commit 294fba0bc5
No known key found for this signature in database
GPG Key ID: 8E4256593F177720

View File

@ -578,15 +578,28 @@ func testChannelBackupUpdates(net *lntest.NetworkHarness, t *harnessTest) {
ctxt, t, net, net.Alice, chanPoint, forceClose,
)
// We should get a single notification after closing, and the
// on-disk state should match this latest notifications.
assertBackupNtfns(1)
assertBackupFileState()
// If we force closed the channel, then we'll mine enough
// blocks to ensure all outputs have been swept.
if forceClose {
// A local force closed channel will trigger a
// notification once the commitment TX confirms on
// chain. But that won't remove the channel from the
// backup just yet, that will only happen once the time
// locked contract was fully resolved on chain.
assertBackupNtfns(1)
cleanupForceClose(t, net, net.Alice, chanPoint)
// Now that the channel's been fully resolved, we expect
// another notification.
assertBackupNtfns(1)
assertBackupFileState()
} else {
// We should get a single notification after closing,
// and the on-disk state should match this latest
// notifications.
assertBackupNtfns(1)
assertBackupFileState()
}
}
}