genofire/hs_monolith
genofire
/
hs_monolith
Archived
1
0
Fork 0

[BUGFIX] remove overwrite logging in database test

This commit is contained in:
Martin Geno 2017-03-31 11:06:40 +02:00
parent c74e2e1e85
commit fac0aab790
No known key found for this signature in database
GPG Key ID: F0D39A37E925E941
2 changed files with 3 additions and 5 deletions

View File

@ -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"})

View File

@ -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
} }