mirror of
https://github.com/NginxProxyManager/nginx-proxy-manager.git
synced 2025-06-18 10:06:26 +00:00
Added some db unit tests
This commit is contained in:
@ -37,6 +37,12 @@ func GetDB() *gorm.DB {
|
||||
return dbInstance
|
||||
}
|
||||
|
||||
// SetDB will set the dbOnstance to this
|
||||
// Used by unit testing to set the db to a mock database
|
||||
func SetDB(db *gorm.DB) {
|
||||
dbInstance = db
|
||||
}
|
||||
|
||||
func connect() (*gorm.DB, error) {
|
||||
var d gorm.Dialector
|
||||
dsn := config.Configuration.DB.GetGormConnectURL()
|
||||
|
Reference in New Issue
Block a user