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

+8 -6
View File
@@ -16,9 +16,9 @@ transaction](https://github.com/lightningnetwork/lnd/pull/6730).
allow specifying a root key for macaroons during wallet init rather than
having lnd randomly generate one for you.
* [A new `SignedInputs`](https://github.com/lightningnetwork/lnd/pull/6771)
field is added to `SignPsbtResponse` that returns the indices of inputs
that were signed by our wallet. Prior to this change `SignPsbt` didn't
* [A new `SignedInputs`](https://github.com/lightningnetwork/lnd/pull/6771)
field is added to `SignPsbtResponse` that returns the indices of inputs
that were signed by our wallet. Prior to this change `SignPsbt` didn't
indicate whether the Psbt held any inputs for our wallet to sign.
* [Add list addresses RPC](https://github.com/lightningnetwork/lnd/pull/6596).
@@ -71,8 +71,8 @@ minimum version needed to build the project.
## `lncli`
* [Add an `insecure` flag to skip tls auth as well as a `metadata` string slice
flag](https://github.com/lightningnetwork/lnd/pull/6818) that allows the
caller to specify key-value string pairs that should be appended to the
flag](https://github.com/lightningnetwork/lnd/pull/6818) that allows the
caller to specify key-value string pairs that should be appended to the
outgoing context.
* [Fix](https://github.com/lightningnetwork/lnd/pull/6858) command line argument
@@ -92,7 +92,7 @@ minimum version needed to build the project.
## Code Health
* [test: use `T.TempDir` to create temporary test
* [test: use `T.TempDir` to create temporary test
directory](https://github.com/lightningnetwork/lnd/pull/6710)
* [The `tlv` package now allows decoding records larger than 65535 bytes. The
@@ -104,6 +104,8 @@ minimum version needed to build the project.
* [The `golangci-lint` tool was updated to
`v1.46.2`](https://github.com/lightningnetwork/lnd/pull/6731)
* [Tests in `htlcswitch` will now clean up the temporary resources they create](https://github.com/lightningnetwork/lnd/pull/6832).
* Updated the github actions to use `make fmt-check` in its [build
process](https://github.com/lightningnetwork/lnd/pull/6853).