Skip to content
This repository was archived by the owner on May 15, 2021. It is now read-only.

Commit 652047d

Browse files
author
Seraphim R.P
committed
Make sure GORM logging is silent on test.
1 parent 77cf179 commit 652047d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

main.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ var (
4949
NamingStrategy: schema.NamingStrategy{
5050
TablePrefix: "bb_",
5151
},
52+
Logger: gLog.Default.LogMode(gLog.Silent),
5253
}
5354
)
5455

@@ -103,8 +104,8 @@ func SetupApp(isTest bool) (*fiber.App, *models.Config) {
103104
// Fetch book names.
104105
namefetcher.FetchBookNames(config.APIBibleKey, config.IsDryRun, false)
105106

106-
// Make sure that gorm's logger is disabled during testing.
107-
gormConfig.Logger = gLog.Default.LogMode(gLog.Silent)
107+
// Enable GORM logging normally.
108+
gormConfig.Logger = gLog.Default.LogMode(gLog.Error)
108109
}
109110

110111
// Connect to database and include it in the config.

0 commit comments

Comments
 (0)