diff --git a/cmd/promtool/unittest.go b/cmd/promtool/unittest.go index 9f5ac09cc5..c64b33accd 100644 --- a/cmd/promtool/unittest.go +++ b/cmd/promtool/unittest.go @@ -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,