[BUGFIX] remove overwrite logging in database test
This commit is contained in:
parent
c74e2e1e85
commit
fac0aab790
|
@ -25,14 +25,13 @@ func TestOpenOneDB(t *testing.T) {
|
|||
|
||||
c := Config{
|
||||
Type: "sqlite3",
|
||||
Logging: true,
|
||||
Connection: "file:database?mode=memory",
|
||||
}
|
||||
var count int64
|
||||
|
||||
err := Open(c)
|
||||
assert.NoError(err, "no error")
|
||||
Write.LogMode(true)
|
||||
Read.LogMode(true)
|
||||
|
||||
Write.Create(&TestModel{Value: "first"})
|
||||
Write.Create(&TestModel{Value: "secound"})
|
||||
|
@ -49,6 +48,7 @@ func TestOpenTwoDB(t *testing.T) {
|
|||
|
||||
c := Config{
|
||||
Type: "sqlite3",
|
||||
Logging: true,
|
||||
Connection: "file:database?mode=memory",
|
||||
ReadConnection: "file:database2?mode=memory",
|
||||
}
|
||||
|
@ -56,8 +56,6 @@ func TestOpenTwoDB(t *testing.T) {
|
|||
|
||||
err := Open(c)
|
||||
assert.NoError(err, "no error")
|
||||
Write.LogMode(true)
|
||||
Read.LogMode(true)
|
||||
|
||||
Write.Create(&TestModel{Value: "first"})
|
||||
Write.Create(&TestModel{Value: "secound"})
|
||||
|
|
|
@ -19,9 +19,9 @@ func Init(t *testing.T) (assertion *assert.Assertions, router *goji.Mux) {
|
|||
assertion = assert.New(t)
|
||||
database.Open(database.Config{
|
||||
Type: "sqlite3",
|
||||
Logging: true,
|
||||
Connection: ":memory:",
|
||||
})
|
||||
database.Write.LogMode(true)
|
||||
router = goji.NewMux()
|
||||
return
|
||||
}
|
||||
|
|
Reference in New Issue