@@ -202,7 +202,7 @@ func TestToESConfig(t *testing.T) {
202
202
require .NoError (t , err )
203
203
204
204
// cmp.Diff can't handle function pointers.
205
- res .Transport .(* http.Transport ).Proxy = nil
205
+ res .Transport .(* http.Transport ).Proxy = nil //nolint:errcheck // skipping error check in test
206
206
207
207
test .result .Header .Set ("X-elastic-product-origin" , "fleet" )
208
208
assert .True (t , cmp .Equal (test .result , res , copts ... ), "mismatch (-want +got)\n %s" , cmp .Diff (test .result , res , copts ... ))
@@ -238,7 +238,7 @@ func TestToESConfig(t *testing.T) {
238
238
},
239
239
}
240
240
241
- es .Transport .(* http.Transport ).Proxy = nil
241
+ es .Transport .(* http.Transport ).Proxy = nil //nolint:errcheck // skipping error check in test
242
242
assert .True (t , cmp .Equal (expect , es , copts ... ), "mismatch (-want +got)\n %s" , cmp .Diff (expect , es , copts ... ))
243
243
})
244
244
@@ -270,7 +270,7 @@ func TestToESConfig(t *testing.T) {
270
270
},
271
271
}
272
272
273
- es .Transport .(* http.Transport ).Proxy = nil
273
+ es .Transport .(* http.Transport ).Proxy = nil //nolint:errcheck // skipping error check in test
274
274
assert .True (t , cmp .Equal (expect , es , copts ... ), "mismatch (-want +got)\n %s" , cmp .Diff (expect , es , copts ... ))
275
275
})
276
276
@@ -388,7 +388,7 @@ func Test_Elasticsearch_DiagRequests(t *testing.T) {
388
388
w .WriteHeader (http .StatusOK )
389
389
}))
390
390
defer srv .Close ()
391
- ctx , cancel := context .WithCancel (context .Background ())
391
+ ctx , cancel := context .WithCancel (context .Background ()) //nolint:usetesting // using context.Background not t.Context
392
392
defer cancel ()
393
393
es := & Elasticsearch {}
394
394
es .InitDefaults ()
0 commit comments