diff --git a/pkg/query/querier_test.go b/pkg/query/querier_test.go index 947aaf96e7d..339125743cc 100644 --- a/pkg/query/querier_test.go +++ b/pkg/query/querier_test.go @@ -308,7 +308,7 @@ func (s series) Iterator() chunkenc.Iterator { // TestQuerier_Select tests expected results with and without deduplication. // To test with real data: -// Collect the expected results from Prometheus through "/api/v1/query_range" and save to a file. +// Collect the expected results from Prometheus or Thanos through "/api/v1/query_range" and save to a file. // Collect raw data to be used for local storage: // scripts/insecure_grpcurl_series.sh queriesGrpcIP:port '[{"name": "__name__", "value":"cluster_version"},{"name":"_id","value":"xxx"}]' 1597823000000 1597824600000 > localStorage.json // 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) { for _, tcase := range []struct { name string storeAPI storepb.StoreServer - hints *storage.SelectHints - equivalentQuery string matchers []*labels.Matcher replicaLabels []string // Replica label groups chunks by the label value and strips it from the final result. + hints *storage.SelectHints + equivalentQuery string expected []series expectedAfterDedup series @@ -698,19 +698,6 @@ func (q *mockedQueryable) Close() error { return nil } -type mockedQuerier struct { - series []series - storage.LabelQuerier -} - -func (q mockedQuerier) Select(_ bool, _ *storage.SelectHints, _ ...*labels.Matcher) storage.SeriesSet { - return &mockedSeriesSet{series: q.series} -} - -func (q mockedQuerier) Close() error { - return nil -} - // TODO(bwplotka): Reuse SeriesSets from chunk iterators from Prometheus. type mockedSeriesSet struct { series []series