summaryrefslogtreecommitdiff
path: root/internal/command/uploadarchive
diff options
context:
space:
mode:
authorIgor Drozdov <idrozdov@gitlab.com>2021-03-17 21:18:42 +0300
committerIgor Drozdov <idrozdov@gitlab.com>2021-03-17 21:23:07 +0300
commitee41d0dfb7b02a19f5926bfe24dbad1df417a29e (patch)
tree130f2777342645018f3f6b797ee0083d65910889 /internal/command/uploadarchive
parent4b40a2cb8c71a5b490cad4c8e1ad2dc0e9b39548 (diff)
downloadgitlab-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/command/uploadarchive')
-rw-r--r--internal/command/uploadarchive/gitalycall_test.go6
-rw-r--r--internal/command/uploadarchive/uploadarchive_test.go3
2 files changed, 3 insertions, 6 deletions
diff --git a/internal/command/uploadarchive/gitalycall_test.go b/internal/command/uploadarchive/gitalycall_test.go
index f74093a..03223e9 100644
--- a/internal/command/uploadarchive/gitalycall_test.go
+++ b/internal/command/uploadarchive/gitalycall_test.go
@@ -18,12 +18,10 @@ import (
)
func TestUploadPack(t *testing.T) {
- gitalyAddress, _, cleanup := testserver.StartGitalyServer(t)
- defer cleanup()
+ gitalyAddress, _ := testserver.StartGitalyServer(t)
requests := requesthandlers.BuildAllowedWithGitalyHandlers(t, gitalyAddress)
- url, cleanup := testserver.StartHttpServer(t, requests)
- defer cleanup()
+ url := testserver.StartHttpServer(t, requests)
output := &bytes.Buffer{}
input := &bytes.Buffer{}
diff --git a/internal/command/uploadarchive/uploadarchive_test.go b/internal/command/uploadarchive/uploadarchive_test.go
index 5426569..c42c715 100644
--- a/internal/command/uploadarchive/uploadarchive_test.go
+++ b/internal/command/uploadarchive/uploadarchive_test.go
@@ -16,8 +16,7 @@ import (
func TestForbiddenAccess(t *testing.T) {
requests := requesthandlers.BuildDisallowedByApiHandlers(t)
- url, cleanup := testserver.StartHttpServer(t, requests)
- defer cleanup()
+ url := testserver.StartHttpServer(t, requests)
output := &bytes.Buffer{}