From 115220464a9cbe5c1d605a1d418e830fce424a6a Mon Sep 17 00:00:00 2001 From: Roman Khimov Date: Fri, 13 Sep 2024 16:11:25 +0300 Subject: [PATCH] handler: mute contextcheck api/handler/locking_test.go:335:21 contextcheck Non-inherited new context, use function like `context.WithXXX` instead Signed-off-by: Roman Khimov --- api/handler/locking_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/handler/locking_test.go b/api/handler/locking_test.go index 0f28ea37..5dfcf630 100644 --- a/api/handler/locking_test.go +++ b/api/handler/locking_test.go @@ -332,7 +332,7 @@ func TestPutBucketLockConfigurationHandler(t *testing.T) { w := httptest.NewRecorder() r := httptest.NewRequest(http.MethodPut, defaultURL, bytes.NewReader(body)) - r = r.WithContext(api.SetReqInfo(r.Context(), api.NewReqInfo(w, r, api.ObjectRequest{Bucket: tc.bucket}))) + r = r.WithContext(api.SetReqInfo(r.Context(), api.NewReqInfo(w, r, api.ObjectRequest{Bucket: tc.bucket}))) //nolint:contextcheck hc.Handler().PutBucketObjectLockConfigHandler(w, r)