mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-07-12 06:02:51 +02:00
tor: replace defer cleanup with t.Cleanup
Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
This commit is contained in:
@ -25,7 +25,7 @@ func TestCheckOnionServiceSucceed(t *testing.T) {
|
||||
|
||||
// Create mock server and client connection.
|
||||
proxy := createTestProxy(t)
|
||||
defer proxy.cleanUp()
|
||||
t.Cleanup(proxy.cleanUp)
|
||||
server := proxy.serverConn
|
||||
|
||||
// Assign a fake service ID to the controller.
|
||||
@ -47,7 +47,7 @@ func TestCheckOnionServiceFailOnServiceIDNotMatch(t *testing.T) {
|
||||
|
||||
// Create mock server and client connection.
|
||||
proxy := createTestProxy(t)
|
||||
defer proxy.cleanUp()
|
||||
t.Cleanup(proxy.cleanUp)
|
||||
server := proxy.serverConn
|
||||
|
||||
// Assign a fake service ID to the controller.
|
||||
@ -69,7 +69,7 @@ func TestCheckOnionServiceSucceedOnMultipleServices(t *testing.T) {
|
||||
|
||||
// Create mock server and client connection.
|
||||
proxy := createTestProxy(t)
|
||||
defer proxy.cleanUp()
|
||||
t.Cleanup(proxy.cleanUp)
|
||||
server := proxy.serverConn
|
||||
|
||||
// Assign a fake service ID to the controller.
|
||||
@ -92,7 +92,7 @@ func TestCheckOnionServiceFailOnClosedConnection(t *testing.T) {
|
||||
|
||||
// Create mock server and client connection.
|
||||
proxy := createTestProxy(t)
|
||||
defer proxy.cleanUp()
|
||||
t.Cleanup(proxy.cleanUp)
|
||||
server := proxy.serverConn
|
||||
|
||||
// Assign a fake service ID to the controller.
|
||||
|
Reference in New Issue
Block a user