Files
1641c3c852 feat: update for Ledger v2 (#468)
Co-authored-by: Antoine Wacheux <[email protected]>
Co-authored-by: Maxence Maireaux <[email protected]>
Co-authored-by: Brieuc Caillot <[email protected]>
2023-09-20 16:40:28 +02:00

27 lines
543 B
Go

package benchmarks
import (
"os"
"testing"
"github.com/formancehq/stack/libs/go-libs/logging"
"github.com/formancehq/stack/libs/go-libs/pgtesting"
"github.com/ory/dockertest/v3/docker"
)
func TestMain(m *testing.M) {
if err := pgtesting.CreatePostgresServer(pgtesting.WithDockerHostConfigOption(func(hostConfig *docker.HostConfig) {
hostConfig.CPUCount = 2
})); err != nil {
logging.Error(err)
os.Exit(1)
}
code := m.Run()
if err := pgtesting.DestroyPostgresServer(); err != nil {
logging.Error(err)
}
os.Exit(code)
}