htlcswitch: clean up test resources and temporary files

The htlcswitch tests were creating temporary database files
but failing to clean them up.

We fix this by making it obvious when temporary db files are
created, and cleaning up those resources where necessary in
the tests.
This commit is contained in:
kklash committed 2022-10-10 10:32:39 -07:00
1 parent 406fc86f38
commit 63428de6e5
6 files changed
+84 -50

No files matched your search

+2 -1
View File
@@ -1945,7 +1945,8 @@ func newSingleLinkTestHarness(chanAmt, chanReserve btcutil.Amount) (
cleanUp := func() {
close(alicePeer.quit)
defer fCleanUp()
invoiceRegistry.cleanup()
fCleanUp()
}
return aliceLink, bobLc.channel, bticker.Force, start, cleanUp,