Merge pull request #11550 from grafana/sql_ts_precision

sql tsdb: fix precision and data type support for time columns
This commit is contained in:
Daniel Lee
2018-04-16 11:04:46 +02:00
committed by GitHub
21 changed files with 1391 additions and 262 deletions
+17 -1
View File
@@ -258,7 +258,7 @@ func InitTestDB(t *testing.T) *xorm.Engine {
// x.ShowSQL()
if err != nil {
t.Fatalf("Failed to init in memory sqllite3 db %v", err)
t.Fatalf("Failed to init test database: %v", err)
}
sqlutil.CleanDB(x)
@@ -269,3 +269,19 @@ func InitTestDB(t *testing.T) *xorm.Engine {
return x
}
func IsTestDbMySql() bool {
if db, present := os.LookupEnv("GRAFANA_TEST_DB"); present {
return db == dbMySql
}
return false
}
func IsTestDbPostgres() bool {
if db, present := os.LookupEnv("GRAFANA_TEST_DB"); present {
return db == dbPostgres
}
return false
}