sqldb: fixup PostgreSQL fixture to allow creating separate DBs per test

This change will enable us to use a single PostgreSQL container instead of
spawning new a one for each (parallel) unit test reducing overall test
runtime.
This commit is contained in:
Andras Banki-Horvath committed 2024-03-01 10:08:08 +01:00
1 parent b10ce17cd4
commit 06730824a2
2 files changed
+27 -9

No files matched your search

+1
View File
@@ -55,6 +55,7 @@ func NewTestPgFixture(t *testing.T, expiry time.Duration) *TestPgFixture {
"postgres",
"-c", "log_statement=all",
"-c", "log_destination=stderr",
"-c", "max_connections=1000",
},
}, func(config *docker.HostConfig) {
// Set AutoRemove to true so that stopped container goes away