mirror of
https://github.com/lightningnetwork/lnd.git
synced 2024-11-19 01:43:16 +01:00
lnd: replace defer cleanup with t.Cleanup
Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
This commit is contained in:
parent
228f1e36c4
commit
604a355db6
@ -75,7 +75,7 @@ func TestTLSAutoRegeneration(t *testing.T) {
|
||||
if err != nil {
|
||||
t.Fatalf("couldn't retrieve TLS config")
|
||||
}
|
||||
defer cleanUp()
|
||||
t.Cleanup(cleanUp)
|
||||
|
||||
// Grab the certificate to test that getTLSConfig did its job correctly
|
||||
// and generated a new cert.
|
||||
|
@ -37,8 +37,7 @@ func TestWitnessBeaconIntercept(t *testing.T) {
|
||||
[]byte{2},
|
||||
)
|
||||
require.NoError(t, err)
|
||||
|
||||
defer subscription.CancelSubscription()
|
||||
t.Cleanup(subscription.CancelSubscription)
|
||||
|
||||
require.NoError(t, interceptedFwd.Settle(preimage))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user