From af523b20fc7642f7332c499a1c4f2f517e318dfe Mon Sep 17 00:00:00 2001 From: Peter Broadhurst Date: Thu, 14 Oct 2021 17:46:57 -0400 Subject: [PATCH] Reduce I/O load of test runs by using memory DB Signed-off-by: Peter Broadhurst --- internal/database/sqlcommon/provider_sqlitego_test.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/internal/database/sqlcommon/provider_sqlitego_test.go b/internal/database/sqlcommon/provider_sqlitego_test.go index cdef373d30..45685a40bb 100644 --- a/internal/database/sqlcommon/provider_sqlitego_test.go +++ b/internal/database/sqlcommon/provider_sqlitego_test.go @@ -19,7 +19,6 @@ package sqlcommon import ( "context" "database/sql" - "fmt" "io/ioutil" "os" "testing" @@ -57,7 +56,7 @@ func newSQLiteTestProvider(t *testing.T) (*sqliteGoTestProvider, func()) { tp.SQLCommon.InitPrefix(tp, tp.prefix) dir, err := ioutil.TempDir("", "") assert.NoError(t, err) - tp.prefix.Set(SQLConfDatasourceURL, fmt.Sprintf("file:%s/testdb", dir)) + tp.prefix.Set(SQLConfDatasourceURL, "file::memory:") tp.prefix.Set(SQLConfMigrationsAuto, true) tp.prefix.Set(SQLConfMigrationsDirectory, "../../../db/migrations/sqlite") tp.prefix.Set(SQLConfMaxConnections, 1)