mirror of
https://github.com/prometheus/prometheus.git
synced 2025-03-05 20:59:13 -08:00
promql: export NewTestQuery
So that tests can call it from another package. Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
This commit is contained in:
parent
babfcfdd91
commit
e7c77f7b40
|
@ -573,7 +573,8 @@ func (ng *Engine) validateOpts(expr parser.Expr) error {
|
||||||
return validationErr
|
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{
|
qry := &query{
|
||||||
q: "test statement",
|
q: "test statement",
|
||||||
stmt: parser.TestStmt(f),
|
stmt: parser.TestStmt(f),
|
||||||
|
|
Loading…
Reference in a new issue