diff options
author | Igor Drozdov <idrozdov@gitlab.com> | 2021-07-14 17:43:36 +0300 |
---|---|---|
committer | Igor Drozdov <idrozdov@gitlab.com> | 2021-07-14 17:43:36 +0300 |
commit | e033223ef7ea1e5597fc7aea744b1aed4d667815 (patch) | |
tree | 0dd9adedd7bcf2b7de3e2e26855f2191c4725680 /cmd | |
parent | 1adc5f1be786535783b689e12301871343d086a1 (diff) | |
download | gitlab-shell-e033223ef7ea1e5597fc7aea744b1aed4d667815.tar.gz |
Refactor testhelper.PrepareTestRootDir using t.Cleanup
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/gitlab-sshd/acceptance_test.go | 4 |
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") |