mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-08-30 07:35:07 +02: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