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

Function mustCreateDatabase

mediaapi/storage/storage_test.go:14–23  ·  view source on GitHub ↗
(t *testing.T, dbType test.DBType)

Source from the content-addressed store, hash-verified

12)
13
14func mustCreateDatabase(t *testing.T, dbType test.DBType) (storage.Database, func()) {
15 connStr, close := test.PrepareDBConnectionString(t, dbType)
16 db, err := storage.NewMediaAPIDatasource(nil, &config.DatabaseOptions{
17 ConnectionString: config.DataSource(connStr),
18 })
19 if err != nil {
20 t.Fatalf("NewSyncServerDatasource returned %s", err)
21 }
22 return db, close
23}
24func TestMediaRepository(t *testing.T) {
25 test.WithAllDatabases(t, func(t *testing.T, dbType test.DBType) {
26 db, close := mustCreateDatabase(t, dbType)

Callers 2

TestMediaRepositoryFunction · 0.70
TestThumbnailsStorageFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected