mirror of
https://github.com/hanzo-fi/stack.git
synced 2026-10-30 20:34:43 +00:00
24 lines
412 B
Go
24 lines
412 B
Go
package workflow
|
|
|
|
import (
|
|
"log"
|
|
"os"
|
|
"testing"
|
|
|
|
"github.com/formancehq/stack/libs/go-libs/pgtesting"
|
|
flag "github.com/spf13/pflag"
|
|
)
|
|
|
|
func TestMain(m *testing.M) {
|
|
flag.Parse()
|
|
|
|
if err := pgtesting.CreatePostgresServer(); err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
code := m.Run()
|
|
if err := pgtesting.DestroyPostgresServer(); err != nil {
|
|
log.Println("unable to stop postgres server", err)
|
|
}
|
|
os.Exit(code)
|
|
}
|