1
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

28 lines
559 B

package remotecache
import (
"testing"
"github.com/grafana/grafana/pkg/services/sqlstore"
"github.com/grafana/grafana/pkg/setting"
"github.com/stretchr/testify/require"
)
// NewFakeStore creates store for testing
func NewFakeStore(t *testing.T) *RemoteCache {
t.Helper()
opts := &setting.RemoteCacheOptions{
Name: "database",
ConnStr: "",
}
sqlStore := sqlstore.InitTestDB(t)
dc, err := ProvideService(&setting.Cfg{
RemoteCacheOptions: opts,
}, sqlStore)
require.NoError(t, err, "Failed to init remote cache for test")
return dc
}