mirror of
https://github.com/element-hq/dendrite.git
synced 2025-09-13 21:02:25 +03:00
Remove BaseDendrite
(#3023)
Removes `BaseDendrite` to, hopefully, make testing and composing of components easier in the future.
This commit is contained in:
parent
ec6879e5ae
commit
5e85a00cb3
68 changed files with 1186 additions and 1002 deletions
|
@ -13,9 +13,9 @@ func TestConnectionManager(t *testing.T) {
|
|||
test.WithAllDatabases(t, func(t *testing.T, dbType test.DBType) {
|
||||
conStr, close := test.PrepareDBConnectionString(t, dbType)
|
||||
t.Cleanup(close)
|
||||
cm := sqlutil.NewConnectionManager()
|
||||
cm := sqlutil.NewConnectionManager(nil, config.DatabaseOptions{})
|
||||
|
||||
dbProps := &config.DatabaseOptions{ConnectionString: config.DataSource(string(conStr))}
|
||||
dbProps := &config.DatabaseOptions{ConnectionString: config.DataSource(conStr)}
|
||||
db, writer, err := cm.Connection(dbProps)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
|
@ -47,8 +47,8 @@ func TestConnectionManager(t *testing.T) {
|
|||
}
|
||||
|
||||
// test invalid connection string configured
|
||||
cm = sqlutil.NewConnectionManager()
|
||||
_, _, err = cm.Connection(&config.DatabaseOptions{ConnectionString: "http://"})
|
||||
cm2 := sqlutil.NewConnectionManager(nil, config.DatabaseOptions{})
|
||||
_, _, err = cm2.Connection(&config.DatabaseOptions{ConnectionString: "http://"})
|
||||
if err == nil {
|
||||
t.Fatal("expected an error but got none")
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue