Chore: Use proper database in integration tests (#109119)
* Chore: Apply proper database settings to integration tests * add logging * join host and port in database config to override default ports * apply test fixes from the original pr * host might contain port already * increase timeout * increase timeout even more * even larger timeouts * Use eventually for stats * Use eventually also for listing settings as index takes some time --------- Co-authored-by: Roberto Jimenez Sanchez <roberto.jimenez@grafana.com>
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user