forked from grafana.jool/grafana-jool
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.
18 lines
544 B
18 lines
544 B
package tests
|
|
|
|
import (
|
|
"testing"
|
|
"time"
|
|
|
|
"github.com/grafana/grafana/pkg/infra/localcache"
|
|
"github.com/grafana/grafana/pkg/services/live/database"
|
|
"github.com/grafana/grafana/pkg/services/sqlstore"
|
|
)
|
|
|
|
// SetupTestStorage initializes a storage to used by the integration tests.
|
|
// This is required to properly register and execute migrations.
|
|
func SetupTestStorage(t *testing.T) *database.Storage {
|
|
sqlStore := sqlstore.InitTestDB(t)
|
|
localCache := localcache.New(time.Hour, time.Hour)
|
|
return database.NewStorage(sqlStore, localCache)
|
|
}
|
|
|