diff --git a/server/integrationtests/clienttestlib.go b/server/integrationtests/clienttestlib.go index 22bc398da..cf2388bcb 100644 --- a/server/integrationtests/clienttestlib.go +++ b/server/integrationtests/clienttestlib.go @@ -35,7 +35,7 @@ type TestHelper struct { } func getTestConfig() (*config.Configuration, error) { - dbType, _, err := sqlstore.PrepareNewTestDatabase() + dbType, connectionString, err := sqlstore.PrepareNewTestDatabase() if err != nil { return nil, err } @@ -62,17 +62,21 @@ func getTestConfig() (*config.Configuration, error) { } }` - dbFile, err := ioutil.TempFile("", "focalboard-test-*.db") - if err != nil { - panic(err) + if dbType == "sqlite3" { + dbFile, err := ioutil.TempFile("", "focalboard-test-*.db") + if err != nil { + panic(err) + } + dbFile.Close() + + connectionString = dbFile.Name() } - dbFile.Close() return &config.Configuration{ ServerRoot: "http://localhost:8888", Port: 8888, DBType: dbType, - DBConfigString: dbFile.Name(), + DBConfigString: connectionString, DBTablePrefix: "test_", WebPath: "./pack", FilesDriver: "local",