test database is connect OK after db config initialized (#239)

release/v1.15
Lunny Xiao 2016-11-24 22:30:36 +08:00 committed by GitHub
parent ba2e75a0ab
commit 450969c158
1 changed files with 4 additions and 0 deletions

View File

@ -196,6 +196,10 @@ func NewEngine() (err error) {
return err
}
if err = x.Ping(); err != nil {
return err
}
if err = migrations.Migrate(x); err != nil {
return fmt.Errorf("migrate: %v", err)
}