diff --git a/pkg/remote/client_test.go b/pkg/remote/client_test.go index 1f11482..a608daf 100644 --- a/pkg/remote/client_test.go +++ b/pkg/remote/client_test.go @@ -92,7 +92,7 @@ func TestClientStore(t *testing.T) { func TestClientStoreHTTPError(t *testing.T) { t.Parallel() - h := func(w http.ResponseWriter, r *http.Request) { + h := func(w http.ResponseWriter, _ *http.Request) { http.Error(w, "bad", http.StatusUnauthorized) } ts := httptest.NewServer(http.HandlerFunc(h)) @@ -111,7 +111,7 @@ func TestClientStoreHTTPError(t *testing.T) { func TestClientStoreHTTPBasic(t *testing.T) { t.Parallel() - h := func(w http.ResponseWriter, r *http.Request) { + h := func(_ http.ResponseWriter, r *http.Request) { u, pwd, ok := r.BasicAuth() require.True(t, ok) assert.Equal(t, "usertest", u) @@ -138,7 +138,7 @@ func TestClientStoreHTTPBasic(t *testing.T) { func TestClientStoreHeaders(t *testing.T) { t.Parallel() - h := func(w http.ResponseWriter, r *http.Request) { + h := func(_ http.ResponseWriter, r *http.Request) { assert.Equal(t, r.Header.Get("X-Prometheus-Remote-Write-Version"), "0.1.0") assert.Equal(t, r.Header.Get("X-MY-CUSTOM-HEADER"), "fake") } diff --git a/pkg/remotewrite/remotewrite_test.go b/pkg/remotewrite/remotewrite_test.go index b80a2c3..0a51234 100644 --- a/pkg/remotewrite/remotewrite_test.go +++ b/pkg/remotewrite/remotewrite_test.go @@ -183,7 +183,7 @@ func TestOutputConvertToPbSeries_WithPreviousState(t *testing.T) { }) require.Len(t, o.tsdb, 1) require.Equal(t, tc.expSeries, len(pbseries)) - assert.Equal(t, tc.expCount, swm.Measure.(*metrics.CounterSink).Value) //nolint:forcetypeassert + assert.Equal(t, tc.expCount, swm.Measure.(*metrics.CounterSink).Value) assert.Equal(t, tc.expLatest, swm.Latest) }) }