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:
Julius Volz 2017-10-23 03:51:48 -07:00 committed by Brian Brazil
parent 9d43176ab3
commit 2846d62573
1 changed files with 2 additions and 1 deletions

View File

@ -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) {