kvdb/postgres: fix tests

This commit is contained in:
Joost Jager committed 2021-12-22 14:54:41 +01:00
1 parent 088970e7e8
commit 62a2f3c809
2 files changed
+5 -1

No files matched your search

+4
View File
@@ -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))