[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{
|
c := Config{
|
||||||
Type: "sqlite3",
|
Type: "sqlite3",
|
||||||
|
Logging: true,
|
||||||
Connection: "file:database?mode=memory",
|
Connection: "file:database?mode=memory",
|
||||||
}
|
}
|
||||||
var count int64
|
var count int64
|
||||||
|
|
||||||
err := Open(c)
|
err := Open(c)
|
||||||
assert.NoError(err, "no error")
|
assert.NoError(err, "no error")
|
||||||
Write.LogMode(true)
|
|
||||||
Read.LogMode(true)
|
|
||||||
|
|
||||||
Write.Create(&TestModel{Value: "first"})
|
Write.Create(&TestModel{Value: "first"})
|
||||||
Write.Create(&TestModel{Value: "secound"})
|
Write.Create(&TestModel{Value: "secound"})
|
||||||
|
@ -49,6 +48,7 @@ func TestOpenTwoDB(t *testing.T) {
|
||||||
|
|
||||||
c := Config{
|
c := Config{
|
||||||
Type: "sqlite3",
|
Type: "sqlite3",
|
||||||
|
Logging: true,
|
||||||
Connection: "file:database?mode=memory",
|
Connection: "file:database?mode=memory",
|
||||||
ReadConnection: "file:database2?mode=memory",
|
ReadConnection: "file:database2?mode=memory",
|
||||||
}
|
}
|
||||||
|
@ -56,8 +56,6 @@ func TestOpenTwoDB(t *testing.T) {
|
||||||
|
|
||||||
err := Open(c)
|
err := Open(c)
|
||||||
assert.NoError(err, "no error")
|
assert.NoError(err, "no error")
|
||||||
Write.LogMode(true)
|
|
||||||
Read.LogMode(true)
|
|
||||||
|
|
||||||
Write.Create(&TestModel{Value: "first"})
|
Write.Create(&TestModel{Value: "first"})
|
||||||
Write.Create(&TestModel{Value: "secound"})
|
Write.Create(&TestModel{Value: "secound"})
|
||||||
|
|
|
@ -19,9 +19,9 @@ func Init(t *testing.T) (assertion *assert.Assertions, router *goji.Mux) {
|
||||||
assertion = assert.New(t)
|
assertion = assert.New(t)
|
||||||
database.Open(database.Config{
|
database.Open(database.Config{
|
||||||
Type: "sqlite3",
|
Type: "sqlite3",
|
||||||
|
Logging: true,
|
||||||
Connection: ":memory:",
|
Connection: ":memory:",
|
||||||
})
|
})
|
||||||
database.Write.LogMode(true)
|
|
||||||
router = goji.NewMux()
|
router = goji.NewMux()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
Reference in New Issue