Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-pages.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoryigithankardas <root>2022-02-18 04:04:13 +0300
committeryigithankardas <root>2022-02-18 04:04:13 +0300
commit5c08f7dd4f4e386652ce70341e6eabad3b0ffbb3 (patch)
tree645f8b46f19986dff5ce4e17f8e99514a0c4beab /internal/httpfs/http_fs_test.go
parente901d0794f96d525ce30f291a3a32f8936917a36 (diff)
refactor: use testhelpers.Close()
Diffstat (limited to 'internal/httpfs/http_fs_test.go')
-rw-r--r--internal/httpfs/http_fs_test.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/internal/httpfs/http_fs_test.go b/internal/httpfs/http_fs_test.go
index 991c6017..25003726 100644
--- a/internal/httpfs/http_fs_test.go
+++ b/internal/httpfs/http_fs_test.go
@@ -11,6 +11,7 @@ import (
"github.com/stretchr/testify/require"
"gitlab.com/gitlab-org/gitlab-pages/internal/httptransport"
+ "gitlab.com/gitlab-org/gitlab-pages/internal/testhelpers"
)
func TestFSOpen(t *testing.T) {
@@ -161,7 +162,7 @@ func TestFileSystemPathCanServeHTTP(t *testing.T) {
res, err := client.Do(req)
require.NoError(t, err)
- defer res.Body.Close()
+ testhelpers.Close(t, res.Body)
require.Equal(t, test.expectedStatusCode, res.StatusCode)
content, err := io.ReadAll(res.Body)