2021-10-05 16:22:02 +01:00
|
|
|
package sync3
|
2021-09-27 17:47:43 +01:00
|
|
|
|
|
|
|
import (
|
|
|
|
"os"
|
|
|
|
"testing"
|
|
|
|
|
2022-12-15 11:08:50 +00:00
|
|
|
"github.com/matrix-org/sliding-sync/testutils"
|
2021-09-27 17:47:43 +01:00
|
|
|
"github.com/rs/zerolog"
|
|
|
|
)
|
|
|
|
|
2021-10-07 15:58:14 +01:00
|
|
|
var postgresConnectionString = "user=xxxxx dbname=syncv3_test sslmode=disable"
|
|
|
|
|
2021-09-27 17:47:43 +01:00
|
|
|
func TestMain(m *testing.M) {
|
|
|
|
logger = zerolog.New(os.Stdout).With().Timestamp().Logger().Output(zerolog.ConsoleWriter{
|
|
|
|
Out: os.Stderr,
|
|
|
|
TimeFormat: "15:04:05",
|
|
|
|
NoColor: true,
|
|
|
|
})
|
2021-11-09 10:15:48 +00:00
|
|
|
postgresConnectionString = testutils.PrepareDBConnectionString()
|
2021-09-27 17:47:43 +01:00
|
|
|
exitCode := m.Run()
|
|
|
|
os.Exit(exitCode)
|
|
|
|
}
|