Fix build errors in promtool

Signed-off-by: Tobias Guggenmos <tguggenm@redhat.com>
This commit is contained in:
Tobias Guggenmos 2020-02-03 19:09:10 +01:00
parent 20b1f596f6
commit 454ba12676

View file

@ -31,6 +31,7 @@ import (
"github.com/prometheus/prometheus/pkg/labels" "github.com/prometheus/prometheus/pkg/labels"
"github.com/prometheus/prometheus/promql" "github.com/prometheus/prometheus/promql"
"github.com/prometheus/prometheus/promql/parser"
"github.com/prometheus/prometheus/rules" "github.com/prometheus/prometheus/rules"
"github.com/prometheus/prometheus/storage" "github.com/prometheus/prometheus/storage"
) )
@ -339,7 +340,7 @@ Outer:
var expSamples []parsedSample var expSamples []parsedSample
for _, s := range testCase.ExpSamples { for _, s := range testCase.ExpSamples {
lb, err := promql.ParseMetric(s.Labels) lb, err := parser.ParseMetric(s.Labels)
if err != nil { if err != nil {
err = errors.Wrapf(err, "labels %q", s.Labels) err = errors.Wrapf(err, "labels %q", s.Labels)
errs = append(errs, errors.Errorf(" expr: %q, time: %s, err: %s", testCase.Expr, errs = append(errs, errors.Errorf(" expr: %q, time: %s, err: %s", testCase.Expr,