mirror of
https://github.com/matrix-org/dendrite.git
synced 2026-01-17 02:53:11 -06:00
Generate test dendrite config for sqlite in monolith mode
This commit is contained in:
parent
91126e6efa
commit
1981ac2735
|
|
@ -66,9 +66,11 @@ func CreateBaseDendrite(t *testing.T, dbType test.DBType) (*base.BaseDendrite, f
|
|||
case test.DBTypeSQLite:
|
||||
cfg.Defaults(config.DefaultOpts{
|
||||
Generate: true,
|
||||
Monolithic: false, // because we need a database per component
|
||||
Monolithic: true,
|
||||
})
|
||||
cfg.Global.ServerName = "test"
|
||||
|
||||
// Configure each components db connection to be unique so tests can run in parallel
|
||||
connStr, _ := test.PrepareDBConnectionString(t, dbType)
|
||||
cfg.FederationAPI.Database.ConnectionString = config.DataSource(connStr)
|
||||
connStr, _ = test.PrepareDBConnectionString(t, dbType)
|
||||
|
|
@ -85,6 +87,7 @@ func CreateBaseDendrite(t *testing.T, dbType test.DBType) (*base.BaseDendrite, f
|
|||
cfg.UserAPI.AccountDatabase.ConnectionString = config.DataSource(connStr)
|
||||
connStr, _ = test.PrepareDBConnectionString(t, dbType)
|
||||
cfg.RelayAPI.Database.ConnectionString = config.DataSource(connStr)
|
||||
|
||||
// use a distinct prefix else concurrent postgres/sqlite runs will clash since NATS will use
|
||||
// the file system event with InMemory=true :(
|
||||
cfg.Global.JetStream.TopicPrefix = fmt.Sprintf("Test_%d_", dbType)
|
||||
|
|
|
|||
Loading…
Reference in a new issue