File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change 4
4
"database/sql"
5
5
"fmt"
6
6
"testing"
7
+ "time"
7
8
8
9
"github.com/grafana/grafana-plugin-sdk-go/backend"
9
10
"github.com/grafana/grafana-plugin-sdk-go/data"
@@ -17,12 +18,15 @@ type MockDB struct{}
17
18
func (h * MockDB ) Connect (backend.DataSourceInstanceSettings ) (db * sql.DB , err error ) {
18
19
return
19
20
}
21
+
20
22
func (h * MockDB ) FillMode () (mode * data.FillMissing ) {
21
23
return
22
24
}
25
+
23
26
func (h * MockDB ) Converters () (sc []sqlutil.Converter ) {
24
27
return
25
28
}
29
+
26
30
func (h * MockDB ) Macros () (macros Macros ) {
27
31
return map [string ]MacroFunc {
28
32
"foo" : func (query * Query , args []string ) (out string , err error ) {
@@ -37,6 +41,10 @@ func (h *MockDB) Macros() (macros Macros) {
37
41
}
38
42
}
39
43
44
+ func (h * MockDB ) Timeout (backend.DataSourceInstanceSettings ) time.Duration {
45
+ return time .Minute
46
+ }
47
+
40
48
func TestInterpolate (t * testing.T ) {
41
49
type test struct {
42
50
name string
You can’t perform that action at this time.
0 commit comments