From 03b737322e02e9db23f784cf917b1554cd7a75a5 Mon Sep 17 00:00:00 2001 From: Fabian Reinartz Date: Thu, 4 Jun 2015 18:09:20 +0200 Subject: [PATCH] promql: expose storage and query engine for tests --- promql/test.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/promql/test.go b/promql/test.go index 392a394dd..a7604952d 100644 --- a/promql/test.go +++ b/promql/test.go @@ -77,6 +77,16 @@ func NewTestFromFile(t testutil.T, filename string) (*Test, error) { return NewTest(t, string(content)) } +// QueryEngine returns the test's query engine. +func (t *Test) QueryEngine() *Engine { + return t.queryEngine +} + +// Storage returns the test's storage. +func (t *Test) Storage() local.Storage { + return t.storage +} + func raise(line int, format string, v ...interface{}) error { return &ParseErr{ Line: line + 1,