Fix staticcheck issue in test (#3331)
staticcheck fails with: storage/remote/read_test.go:199:27: do not pass a nil Context, even if a function permits it; pass context.TODO if you are unsure about which Context to use (SA1012)
This commit is contained in:
parent
9d43176ab3
commit
2846d62573
|
@ -14,6 +14,7 @@
|
||||||
package remote
|
package remote
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"context"
|
||||||
"reflect"
|
"reflect"
|
||||||
"sort"
|
"sort"
|
||||||
"testing"
|
"testing"
|
||||||
|
@ -196,7 +197,7 @@ func TestRemoteStorageQuerier(t *testing.T) {
|
||||||
return &mockMergeQuerier{queriersCount: len(queriers)}
|
return &mockMergeQuerier{queriersCount: len(queriers)}
|
||||||
}
|
}
|
||||||
|
|
||||||
querier, _ := s.Querier(nil, test.mint, test.maxt)
|
querier, _ := s.Querier(context.Background(), test.mint, test.maxt)
|
||||||
actualQueriersCount := reflect.ValueOf(querier).Interface().(*mockMergeQuerier).queriersCount
|
actualQueriersCount := reflect.ValueOf(querier).Interface().(*mockMergeQuerier).queriersCount
|
||||||
|
|
||||||
if !reflect.DeepEqual(actualQueriersCount, test.expectedQueriersCount) {
|
if !reflect.DeepEqual(actualQueriersCount, test.expectedQueriersCount) {
|
||||||
|
|
Loading…
Reference in New Issue