mirror of
https://github.com/thomiceli/opengist.git
synced 2025-06-12 13:37:13 +02:00
Fix test database with go command (#442)
This commit is contained in:
@ -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)
|
||||
|
Reference in New Issue
Block a user