From ee41d0dfb7b02a19f5926bfe24dbad1df417a29e Mon Sep 17 00:00:00 2001 From: Igor Drozdov Date: Wed, 17 Mar 2021 21:18:42 +0300 Subject: Replace cleanup functions with t.Cleanup In this case we don't need to propagate cleanup function. It simplifies the code. --- internal/command/lfsauthenticate/lfsauthenticate_test.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'internal/command/lfsauthenticate') diff --git a/internal/command/lfsauthenticate/lfsauthenticate_test.go b/internal/command/lfsauthenticate/lfsauthenticate_test.go index 55998ab..63aecb0 100644 --- a/internal/command/lfsauthenticate/lfsauthenticate_test.go +++ b/internal/command/lfsauthenticate/lfsauthenticate_test.go @@ -21,8 +21,7 @@ import ( func TestFailedRequests(t *testing.T) { requests := requesthandlers.BuildDisallowedByApiHandlers(t) - url, cleanup := testserver.StartHttpServer(t, requests) - defer cleanup() + url := testserver.StartHttpServer(t, requests) testCases := []struct { desc string @@ -118,8 +117,7 @@ func TestLfsAuthenticateRequests(t *testing.T) { }, } - url, cleanup := testserver.StartHttpServer(t, requests) - defer cleanup() + url := testserver.StartHttpServer(t, requests) testCases := []struct { desc string -- cgit v1.2.1