Remove BaseDendrite (#3023)

Removes `BaseDendrite` to, hopefully, make testing and composing of
components easier in the future.
This commit is contained in:
Till 2023-03-22 09:21:32 +01:00 committed by GitHub
parent ec6879e5ae
commit 5e85a00cb3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
68 changed files with 1186 additions and 1002 deletions

View file

@ -15,14 +15,12 @@ import (
"github.com/matrix-org/dendrite/roomserver/storage/tables"
"github.com/matrix-org/dendrite/setup/config"
"github.com/matrix-org/dendrite/test"
"github.com/matrix-org/dendrite/test/testrig"
)
func mustCreateRoomserverDatabase(t *testing.T, dbType test.DBType) (*shared.Database, func()) {
t.Helper()
connStr, clearDB := test.PrepareDBConnectionString(t, dbType)
base, _, _ := testrig.Base(nil)
dbOpts := &config.DatabaseOptions{ConnectionString: config.DataSource(connStr)}
db, err := sqlutil.Open(dbOpts, sqlutil.NewExclusiveWriter())
@ -61,8 +59,6 @@ func mustCreateRoomserverDatabase(t *testing.T, dbType test.DBType) (*shared.Dat
Writer: sqlutil.NewExclusiveWriter(),
Cache: cache,
}, func() {
err := base.Close()
assert.NoError(t, err)
clearDB()
err = db.Close()
assert.NoError(t, err)