summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorIgor Drozdov <idrozdov@gitlab.com>2021-07-14 17:43:36 +0300
committerIgor Drozdov <idrozdov@gitlab.com>2021-07-14 17:43:36 +0300
commite033223ef7ea1e5597fc7aea744b1aed4d667815 (patch)
tree0dd9adedd7bcf2b7de3e2e26855f2191c4725680 /cmd
parent1adc5f1be786535783b689e12301871343d086a1 (diff)
downloadgitlab-shell-e033223ef7ea1e5597fc7aea744b1aed4d667815.tar.gz
Refactor testhelper.PrepareTestRootDir using t.Cleanup
Diffstat (limited to 'cmd')
-rw-r--r--cmd/gitlab-sshd/acceptance_test.go4
1 files changed, 1 insertions, 3 deletions
diff --git a/cmd/gitlab-sshd/acceptance_test.go b/cmd/gitlab-sshd/acceptance_test.go
index 973e376..c92a8aa 100644
--- a/cmd/gitlab-sshd/acceptance_test.go
+++ b/cmd/gitlab-sshd/acceptance_test.go
@@ -95,9 +95,7 @@ func successAPI(t *testing.T) http.Handler {
t.Helper()
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
- testDirCleanup, err := testhelper.PrepareTestRootDir()
- require.NoError(t, err)
- defer testDirCleanup()
+ testhelper.PrepareTestRootDir(t)
t.Logf("gitlab-api-mock: received request: %s %s", r.Method, r.RequestURI)
w.Header().Set("Content-Type", "application/json")