(t *testing.T, dbType test.DBType)
| 12 | ) |
| 13 | |
| 14 | func 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 | } |
| 24 | func TestMediaRepository(t *testing.T) { |
| 25 | test.WithAllDatabases(t, func(t *testing.T, dbType test.DBType) { |
| 26 | db, close := mustCreateDatabase(t, dbType) |
no outgoing calls
no test coverage detected