fix findvar test

pull/14173/head
lisale0 2019-06-20 15:53:50 -07:00
parent 8c045ad08a
commit 63bc965606
2 changed files with 3 additions and 4 deletions

View File

@ -5,13 +5,13 @@ import (
platform "github.com/influxdata/influxdb" platform "github.com/influxdata/influxdb"
"github.com/influxdata/influxdb/bolt" "github.com/influxdata/influxdb/bolt"
"github.com/influxdata/influxdb/inmem" "github.com/influxdata/influxdb/inmem"
"github.com/influxdata/influxdb/kv"
platformtesting "github.com/influxdata/influxdb/testing" platformtesting "github.com/influxdata/influxdb/testing"
"testing" "testing"
) )
func initVariableService(f platformtesting.VariableFields, t *testing.T) (platform.VariableService, string, func()) { func initVariableService(f platformtesting.VariableFields, t *testing.T) (platform.VariableService, string, func()) {
c := kv.NewService(inmem.NewKVStore()) //c := kv.NewService(inmem.NewKVStore())
c := inmem.NewService()
if f.TimeGenerator == nil { if f.TimeGenerator == nil {
c.TimeGenerator = platform.RealTimeGenerator{} c.TimeGenerator = platform.RealTimeGenerator{}

View File

@ -5,7 +5,6 @@ import (
"context" "context"
"encoding/json" "encoding/json"
"fmt" "fmt"
"github.com/influxdata/influxdb/kv"
"io/ioutil" "io/ioutil"
"net/http" "net/http"
"net/http/httptest" "net/http/httptest"
@ -886,7 +885,7 @@ func TestService_handlePostVariableLabel(t *testing.T) {
func initVariableService(f platformtesting.VariableFields, t *testing.T) (platform.VariableService, string, func()) { func initVariableService(f platformtesting.VariableFields, t *testing.T) (platform.VariableService, string, func()) {
t.Helper() t.Helper()
svc := kv.NewService(inmem.NewKVStore()) svc := inmem.NewService()
svc.IDGenerator = f.IDGenerator svc.IDGenerator = f.IDGenerator
svc.TimeGenerator = f.TimeGenerator svc.TimeGenerator = f.TimeGenerator
if f.TimeGenerator == nil { if f.TimeGenerator == nil {