MCPcopy Create free account
hub / github.com/daodst/chat / mustCreateFederationDatabase

Function mustCreateFederationDatabase

federationapi/storage/storage_test.go:17–30  ·  view source on GitHub ↗
(t *testing.T, dbType test.DBType)

Source from the content-addressed store, hash-verified

15)
16
17func mustCreateFederationDatabase(t *testing.T, dbType test.DBType) (storage.Database, func()) {
18 b, baseClose := testrig.CreateBaseDendrite(t, dbType)
19 connStr, dbClose := test.PrepareDBConnectionString(t, dbType)
20 db, err := storage.NewDatabase(b, &config.DatabaseOptions{
21 ConnectionString: config.DataSource(connStr),
22 }, b.Caches, b.Cfg.Global.ServerName)
23 if err != nil {
24 t.Fatalf("NewDatabase returned %s", err)
25 }
26 return db, func() {
27 dbClose()
28 baseClose()
29 }
30}
31
32func TestExpireEDUs(t *testing.T) {
33 var expireEDUTypes = map[string]time.Duration{

Callers 1

TestExpireEDUsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected