lnd: replace defer cleanup with t.Cleanup
Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
This commit is contained in:
2 files changed
+2
-3
No files matched your search
+1
-1
@@ -75,7 +75,7 @@ func TestTLSAutoRegeneration(t *testing.T) {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatalf("couldn't retrieve TLS config")
|
t.Fatalf("couldn't retrieve TLS config")
|
||||||
}
|
}
|
||||||
defer cleanUp()
|
t.Cleanup(cleanUp)
|
||||||
|
|
||||||
// Grab the certificate to test that getTLSConfig did its job correctly
|
// Grab the certificate to test that getTLSConfig did its job correctly
|
||||||
// and generated a new cert.
|
// and generated a new cert.
|
||||||
|
|||||||
@@ -37,8 +37,7 @@ func TestWitnessBeaconIntercept(t *testing.T) {
|
|||||||
[]byte{2},
|
[]byte{2},
|
||||||
)
|
)
|
||||||
require.NoError(t, err)
|
require.NoError(t, err)
|
||||||
|
t.Cleanup(subscription.CancelSubscription)
|
||||||
defer subscription.CancelSubscription()
|
|
||||||
|
|
||||||
require.NoError(t, interceptedFwd.Settle(preimage))
|
require.NoError(t, interceptedFwd.Settle(preimage))
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user