From d53885c541cef90f00eff3d709811856603ddf8e Mon Sep 17 00:00:00 2001 From: Thomas Miceli <27960254+thomiceli@users.noreply.github.com> Date: Mon, 17 Mar 2025 16:17:53 +0100 Subject: [PATCH] Fix test database with go command (#442) --- internal/web/test/server.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/internal/web/test/server.go b/internal/web/test/server.go index 469c39a..0cd7d2f 100644 --- a/internal/web/test/server.go +++ b/internal/web/test/server.go @@ -161,14 +161,12 @@ func Setup(t *testing.T) *TestServer { var databaseDsn string databaseType = os.Getenv("OPENGIST_TEST_DB") switch databaseType { - case "sqlite": - databaseDsn = "file:" + filepath.Join(homePath, "tmp", "opengist_test.db") case "postgres": databaseDsn = "postgres://postgres:opengist@localhost:5432/opengist_test" case "mysql": databaseDsn = "mysql://root:opengist@localhost:3306/opengist_test" default: - databaseDsn = ":memory:" + databaseDsn = "file:" + filepath.Join(homePath, "tmp", "opengist_test.db") } err = os.MkdirAll(filepath.Join(homePath, "tests"), 0755)