fix findvar test
parent
8c045ad08a
commit
63bc965606
|
@ -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{}
|
||||||
|
|
|
@ -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 {
|
||||||
|
|
Loading…
Reference in New Issue