Skip to content

Commit

Permalink
chore: minor linter fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
olegbespalov committed Apr 30, 2024
1 parent 1a03ade commit 9d1a7d2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions pkg/remote/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand All @@ -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)
Expand All @@ -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")
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/remotewrite/remotewrite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
})
}
Expand Down

0 comments on commit 9d1a7d2

Please sign in to comment.