From 2846d62573ca272c73bea0ed3c8aec997e93e64f Mon Sep 17 00:00:00 2001 From: Julius Volz Date: Mon, 23 Oct 2017 03:51:48 -0700 Subject: [PATCH] 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) --- storage/remote/read_test.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/storage/remote/read_test.go b/storage/remote/read_test.go index 1d4cc974e..7fec0bb8e 100644 --- a/storage/remote/read_test.go +++ b/storage/remote/read_test.go @@ -14,6 +14,7 @@ package remote import ( + "context" "reflect" "sort" "testing" @@ -196,7 +197,7 @@ func TestRemoteStorageQuerier(t *testing.T) { 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 if !reflect.DeepEqual(actualQueriersCount, test.expectedQueriersCount) {