mirror of
https://github.com/aljazceru/breez-lnd.git
synced 2025-12-17 22:24:21 +01:00
kvdb/postgres: fix tests
This commit is contained in:
@@ -26,10 +26,14 @@ func getTestDsn(dbName string) string {
|
||||
|
||||
var testPostgres *embeddedpostgres.EmbeddedPostgres
|
||||
|
||||
const testMaxConnections = 50
|
||||
|
||||
// StartEmbeddedPostgres starts an embedded postgres instance. This only needs
|
||||
// to be done once, because NewFixture will create random new databases on every
|
||||
// call. It returns a stop closure that stops the database if called.
|
||||
func StartEmbeddedPostgres() (func() error, error) {
|
||||
Init(testMaxConnections)
|
||||
|
||||
postgres := embeddedpostgres.NewDatabase(
|
||||
embeddedpostgres.DefaultConfig().
|
||||
Port(9876))
|
||||
|
||||
Reference in New Issue
Block a user