Increase config test coverage

This commit is contained in:
Adrian Gallagher
2019-09-13 16:53:41 +10:00
parent 7f576d0d4f
commit 870fd6f4f3
4 changed files with 129 additions and 8 deletions

View File

@@ -60,7 +60,16 @@ func (a *databaseManager) Start() (err error) {
audit.Audit = auditSQLite.Audit()
}
dbConn.Connected = true
log.Debugf(log.DatabaseMgr, "Database connection established to host: %v using %v driver\n", dbConn.Config.Host, dbConn.Config.Driver)
if Bot.Config.Database.Driver == "postgres" {
log.Debugf(log.DatabaseMgr,
"Database connection established to host: %s. Using postgres driver\n",
dbConn.Config.Host)
} else {
log.Debugf(log.DatabaseMgr,
"Database connection established to file database: %s. Using sqlite driver\n",
dbConn.Config.Database)
}
mLogger := mg.MLogger{}
migrations := mg.Migrator{