Browse Source

promql: export NewTestQuery

So that tests can call it from another package.

Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
pull/13999/head
Bryan Boreham 7 months ago
parent
commit
e7c77f7b40
  1. 3
      promql/engine.go

3
promql/engine.go

@ -573,7 +573,8 @@ func (ng *Engine) validateOpts(expr parser.Expr) error {
return validationErr
}
func (ng *Engine) newTestQuery(f func(context.Context) error) Query {
// NewTestQuery: inject special behaviour into Query for testing.
func (ng *Engine) NewTestQuery(f func(context.Context) error) Query {
qry := &query{
q: "test statement",
stmt: parser.TestStmt(f),

Loading…
Cancel
Save