database: fixes after xorm update

This commit is contained in:
Daniel Lee
2018-03-16 00:08:25 +01:00
parent 1c20126f87
commit 5a3ba68a9c
6 changed files with 22 additions and 9 deletions

View File

@@ -8,6 +8,7 @@ import (
"path/filepath"
"strings"
"testing"
"time"
"github.com/grafana/grafana/pkg/bus"
"github.com/grafana/grafana/pkg/log"
@@ -225,8 +226,8 @@ var (
func InitTestDB(t *testing.T) *xorm.Engine {
selectedDb := dbSqlite
//selectedDb := dbMySql
//selectedDb := dbPostgres
// selectedDb := dbMySql
// selectedDb := dbPostgres
var x *xorm.Engine
var err error
@@ -245,6 +246,9 @@ func InitTestDB(t *testing.T) *xorm.Engine {
x, err = xorm.NewEngine(sqlutil.TestDB_Sqlite3.DriverName, sqlutil.TestDB_Sqlite3.ConnStr)
}
x.DatabaseTZ = time.UTC
x.TZLocation = time.UTC
// x.ShowSQL()
if err != nil {