Skip to content

Commit 9443274

Browse files
nits
Signed-off-by: Krasi Georgiev <8903888+krasi-georgiev@users.noreply.github.com>
1 parent db2eb42 commit 9443274

File tree

1 file changed

+3
-16
lines changed

1 file changed

+3
-16
lines changed

pkg/query/querier_test.go

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ func (s series) Iterator() chunkenc.Iterator {
308308

309309
// TestQuerier_Select tests expected results with and without deduplication.
310310
// To test with real data:
311-
// Collect the expected results from Prometheus through "/api/v1/query_range" and save to a file.
311+
// Collect the expected results from Prometheus or Thanos through "/api/v1/query_range" and save to a file.
312312
// Collect raw data to be used for local storage:
313313
// scripts/insecure_grpcurl_series.sh queriesGrpcIP:port '[{"name": "__name__", "value":"cluster_version"},{"name":"_id","value":"xxx"}]' 1597823000000 1597824600000 > localStorage.json
314314
// Remove all white space from the file and put each series in a new line.
@@ -321,10 +321,10 @@ func TestQuerier_Select(t *testing.T) {
321321
for _, tcase := range []struct {
322322
name string
323323
storeAPI storepb.StoreServer
324-
hints *storage.SelectHints
325-
equivalentQuery string
326324
matchers []*labels.Matcher
327325
replicaLabels []string // Replica label groups chunks by the label value and strips it from the final result.
326+
hints *storage.SelectHints
327+
equivalentQuery string
328328

329329
expected []series
330330
expectedAfterDedup series
@@ -698,19 +698,6 @@ func (q *mockedQueryable) Close() error {
698698
return nil
699699
}
700700

701-
type mockedQuerier struct {
702-
series []series
703-
storage.LabelQuerier
704-
}
705-
706-
func (q mockedQuerier) Select(_ bool, _ *storage.SelectHints, _ ...*labels.Matcher) storage.SeriesSet {
707-
return &mockedSeriesSet{series: q.series}
708-
}
709-
710-
func (q mockedQuerier) Close() error {
711-
return nil
712-
}
713-
714701
// TODO(bwplotka): Reuse SeriesSets from chunk iterators from Prometheus.
715702
type mockedSeriesSet struct {
716703
series []series

0 commit comments

Comments
 (0)