fix sqlite connection URI
Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
This commit is contained in:
parent
3796c25228
commit
b6a593b20c
2 changed files with 2 additions and 2 deletions
|
|
@ -337,7 +337,7 @@ func (s *SQLite) Validate() error {
|
|||
}
|
||||
|
||||
func (s *SQLite) ConnectionString() (string, error) {
|
||||
return fmt.Sprintf("%s?_pragma=journal_mode(wal)", s.DBFile), nil
|
||||
return fmt.Sprintf("%s?_journal_mode=WAL", s.DBFile), nil
|
||||
}
|
||||
|
||||
// MySQL is the config entry for the mysql section
|
||||
|
|
|
|||
|
|
@ -412,7 +412,7 @@ func TestGormParams(t *testing.T) {
|
|||
dbType, uri, err := cfg.GormParams()
|
||||
require.Nil(t, err)
|
||||
require.Equal(t, SQLiteBackend, dbType)
|
||||
require.Equal(t, filepath.Join(dir, "garm.db?_pragma=journal_mode(wal)"), uri)
|
||||
require.Equal(t, filepath.Join(dir, "garm.db?_journal_mode=WAL"), uri)
|
||||
|
||||
cfg.DbBackend = MySQLBackend
|
||||
cfg.MySQL = getMySQLDefaultConfig()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue