Better config handling with constants (#83)
This commit is contained in:
parent
f1d21ea52b
commit
1f1a079fd3
17 changed files with 200 additions and 120 deletions
|
|
@ -24,7 +24,6 @@ import (
|
|||
"fmt"
|
||||
"github.com/go-xorm/core"
|
||||
"github.com/go-xorm/xorm"
|
||||
"github.com/spf13/viper"
|
||||
"gopkg.in/testfixtures.v2"
|
||||
"os"
|
||||
"path/filepath"
|
||||
|
|
@ -71,7 +70,7 @@ func createTestEngine(fixturesDir string) error {
|
|||
return err
|
||||
}
|
||||
|
||||
if viper.GetString("database.type") == "mysql" {
|
||||
if config.DatabaseType.GetString() == "mysql" {
|
||||
fixturesHelper = &testfixtures.MySQL{}
|
||||
}
|
||||
} else {
|
||||
|
|
|
|||
Reference in a new issue