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:
Diffstat (limited to 'internal/httptransport/transport_test.go')
-rw-r--r--internal/httptransport/transport_test.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/internal/httptransport/transport_test.go b/internal/httptransport/transport_test.go
index feaf63b6..7fce1b15 100644
--- a/internal/httptransport/transport_test.go
+++ b/internal/httptransport/transport_test.go
@@ -58,6 +58,7 @@ func Test_withRoundTripper(t *testing.T) {
mtr := &meteredRoundTripper{next: next, durations: histVec, counter: counterVec, ttfbTimeout: DefaultTTFBTimeout}
r := httptest.NewRequest("GET", "/", nil)
+ // nolint:bodyclose // res.Body is nil
res, err := mtr.RoundTrip(r)
if tt.err != nil {
counterCount := testutil.ToFloat64(counterVec.WithLabelValues("error"))
@@ -90,6 +91,7 @@ func TestRoundTripTTFBTimeout(t *testing.T) {
req, err := http.NewRequest("GET", "https://gitlab.com", nil)
require.NoError(t, err)
+ // nolint:bodyclose // res is nil
res, err := mtr.RoundTrip(req)
require.Nil(t, res)
require.True(t, errors.Is(err, context.Canceled), "context must have been canceled after ttfb timeout")