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