Skip to content

Commit

Permalink
Fix manager_test.go
Browse files Browse the repository at this point in the history
Signed-off-by: Oron Sharabi <oron.sh@coralogix.com>
  • Loading branch information
oronsh committed Aug 19, 2022
1 parent c61beea commit f1150f6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/api/query/grpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ func (g *GRPCAPI) Query(request *querypb.QueryRequest, server querypb.Query_Quer
if len(request.ReplicaLabels) != 0 {
replicaLabels = request.ReplicaLabels
}
// qe := g.queryEngine(request.MaxResolutionSeconds)

queryable := g.queryableCreate(
request.EnableDedup,
replicaLabels,
Expand Down Expand Up @@ -150,7 +150,7 @@ func (g *GRPCAPI) QueryRange(request *querypb.QueryRangeRequest, srv querypb.Que
if len(request.ReplicaLabels) != 0 {
replicaLabels = request.ReplicaLabels
}
// qe := g.queryEngine(request.MaxResolutionSeconds)

queryable := g.queryableCreate(
request.EnableDedup,
replicaLabels,
Expand Down
4 changes: 4 additions & 0 deletions pkg/rules/manager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import (
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/prometheus/model/exemplar"
"github.com/prometheus/prometheus/model/labels"
"github.com/prometheus/prometheus/model/metadata"
"github.com/prometheus/prometheus/promql"
"github.com/prometheus/prometheus/rules"
"github.com/prometheus/prometheus/storage"
Expand All @@ -45,6 +46,9 @@ func (n nopAppender) AppendExemplar(storage.SeriesRef, labels.Labels, exemplar.E
func (n nopAppender) Commit() error { return nil }
func (n nopAppender) Rollback() error { return nil }
func (n nopAppender) Appender(_ context.Context) (storage.Appender, error) { return n, nil }
func (n nopAppender) UpdateMetadata(storage.SeriesRef, labels.Labels, metadata.Metadata) (storage.SeriesRef, error) {
return 0, nil
}

type nopQueryable struct{}

Expand Down

0 comments on commit f1150f6

Please sign in to comment.