Chore: Use proper database type from env in testinfra integration tests (#108845)

use database type from env in testinfra
This commit is contained in:
Serge Zaitsev
2025-08-01 16:01:13 +02:00
committed by GitHub
parent b1cdd45ca4
commit 772f647210
3 changed files with 49 additions and 10 deletions
+15
View File
@@ -22,6 +22,11 @@ type TestDB struct {
DriverName string
ConnStr string
Path string
Host string
Port string
User string
Password string
Database string
Cleanup func()
}
@@ -132,6 +137,11 @@ func mySQLTestDB() (*TestDB, error) {
return &TestDB{
DriverName: "mysql",
ConnStr: conn_str,
Host: host,
Port: port,
User: "grafana",
Password: "password",
Database: "grafana_tests",
Cleanup: func() {},
}, nil
}
@@ -149,6 +159,11 @@ func postgresTestDB() (*TestDB, error) {
return &TestDB{
DriverName: "postgres",
ConnStr: connStr,
Host: host,
Port: port,
User: "grafanatest",
Password: "grafanatest",
Database: "grafanatest",
Cleanup: func() {},
}, nil
}