Selaa lähdekoodia

Use variable in newPostgresMacroEngine

Sven Klemm 7 vuotta sitten
vanhempi
commit
837388d13e
1 muutettua tiedostoa jossa 4 lisäystä ja 2 poistoa
  1. 4 2
      pkg/tsdb/postgres/macros_test.go

+ 4 - 2
pkg/tsdb/postgres/macros_test.go

@@ -12,8 +12,10 @@ import (
 
 
 func TestMacroEngine(t *testing.T) {
 func TestMacroEngine(t *testing.T) {
 	Convey("MacroEngine", t, func() {
 	Convey("MacroEngine", t, func() {
-		engine := newPostgresMacroEngine(false)
-		engineTS := newPostgresMacroEngine(true)
+		timescaledbEnabled := false
+		engine := newPostgresMacroEngine(timescaledbEnabled)
+		timescaledbEnabled = true
+		engineTS := newPostgresMacroEngine(timescaledbEnabled)
 		query := &tsdb.Query{}
 		query := &tsdb.Query{}
 
 
 		Convey("Given a time range between 2018-04-12 00:00 and 2018-04-12 00:05", func() {
 		Convey("Given a time range between 2018-04-12 00:00 and 2018-04-12 00:05", func() {