postgres: support running multiple postgres integration tests

Makes it possible to run mysql integration tests for both
grafana config db and tsdb at the same time using
GRAFANA_TEST_DB=postgres go test ./pkg/...
This commit is contained in:
Marcus Efraimsson committed 2018-04-10 11:08:30 +02:00
1 parent 1783c534fd
commit 0317ecbf0d
6 files changed
+149 -38

No files matched your search

+7
View File
@@ -278,3 +278,10 @@ func IsTestDbMySql() bool {
return false
}
func IsTestDbPostgres() bool {
if db, present := os.LookupEnv("GRAFANA_TEST_DB"); present {
return db == dbPostgres
}
return false
}