diff options
author | Igor Drozdov <idrozdov@gitlab.com> | 2021-03-17 21:18:42 +0300 |
---|---|---|
committer | Igor Drozdov <idrozdov@gitlab.com> | 2021-03-17 21:23:07 +0300 |
commit | ee41d0dfb7b02a19f5926bfe24dbad1df417a29e (patch) | |
tree | 130f2777342645018f3f6b797ee0083d65910889 /internal/gitlabnet/lfsauthenticate | |
parent | 4b40a2cb8c71a5b490cad4c8e1ad2dc0e9b39548 (diff) | |
download | gitlab-shell-ee41d0dfb7b02a19f5926bfe24dbad1df417a29e.tar.gz |
Replace cleanup functions with t.Cleanup
In this case we don't need to propagate cleanup
function. It simplifies the code.
Diffstat (limited to 'internal/gitlabnet/lfsauthenticate')
-rw-r--r-- | internal/gitlabnet/lfsauthenticate/client_test.go | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/internal/gitlabnet/lfsauthenticate/client_test.go b/internal/gitlabnet/lfsauthenticate/client_test.go index 2bd0451..d554cac 100644 --- a/internal/gitlabnet/lfsauthenticate/client_test.go +++ b/internal/gitlabnet/lfsauthenticate/client_test.go @@ -54,8 +54,7 @@ func setup(t *testing.T) []testserver.TestRequestHandler { func TestFailedRequests(t *testing.T) { requests := setup(t) - url, cleanup := testserver.StartHttpServer(t, requests) - defer cleanup() + url := testserver.StartHttpServer(t, requests) testCases := []struct { desc string @@ -96,8 +95,7 @@ func TestFailedRequests(t *testing.T) { func TestSuccessfulRequests(t *testing.T) { requests := setup(t) - url, cleanup := testserver.StartHttpServer(t, requests) - defer cleanup() + url := testserver.StartHttpServer(t, requests) testCases := []struct { desc string |