summaryrefslogtreecommitdiff
path: root/internal/command/shared/customaction
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/shared/customaction
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/shared/customaction')
-rw-r--r--internal/command/shared/customaction/customaction_test.go6
1 files changed, 2 insertions, 4 deletions
diff --git a/internal/command/shared/customaction/customaction_test.go b/internal/command/shared/customaction/customaction_test.go
index 119da5b..87ae2e4 100644
--- a/internal/command/shared/customaction/customaction_test.go
+++ b/internal/command/shared/customaction/customaction_test.go
@@ -54,8 +54,7 @@ func TestExecuteEOFSent(t *testing.T) {
},
}
- url, cleanup := testserver.StartSocketHttpServer(t, requests)
- defer cleanup()
+ url := testserver.StartSocketHttpServer(t, requests)
outBuf := &bytes.Buffer{}
errBuf := &bytes.Buffer{}
@@ -124,8 +123,7 @@ func TestExecuteNoEOFSent(t *testing.T) {
},
}
- url, cleanup := testserver.StartSocketHttpServer(t, requests)
- defer cleanup()
+ url := testserver.StartSocketHttpServer(t, requests)
outBuf := &bytes.Buffer{}
errBuf := &bytes.Buffer{}