-
Notifications
You must be signed in to change notification settings - Fork 101
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: use pgtesting from go libs (#112)
- Loading branch information
Showing
24 changed files
with
188 additions
and
314 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package internal | ||
|
||
import ( | ||
"os" | ||
"testing" | ||
|
||
"github.com/formancehq/stack/libs/go-libs/logging" | ||
"github.com/formancehq/stack/libs/go-libs/pgtesting" | ||
) | ||
|
||
func TestMain(t *testing.M) { | ||
if err := pgtesting.CreatePostgresServer(); err != nil { | ||
logging.Error(err) | ||
os.Exit(1) | ||
} | ||
code := t.Run() | ||
if err := pgtesting.DestroyPostgresServer(); err != nil { | ||
logging.Error(err) | ||
} | ||
os.Exit(code) | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package analytics | ||
|
||
import ( | ||
"os" | ||
"testing" | ||
|
||
"github.com/formancehq/stack/libs/go-libs/logging" | ||
"github.com/formancehq/stack/libs/go-libs/pgtesting" | ||
) | ||
|
||
func TestMain(t *testing.M) { | ||
if err := pgtesting.CreatePostgresServer(); err != nil { | ||
logging.Error(err) | ||
os.Exit(1) | ||
} | ||
code := t.Run() | ||
if err := pgtesting.DestroyPostgresServer(); err != nil { | ||
logging.Error(err) | ||
} | ||
os.Exit(code) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package controllers_test | ||
|
||
import ( | ||
"os" | ||
"testing" | ||
|
||
"github.com/formancehq/stack/libs/go-libs/logging" | ||
"github.com/formancehq/stack/libs/go-libs/pgtesting" | ||
) | ||
|
||
func TestMain(t *testing.M) { | ||
if err := pgtesting.CreatePostgresServer(); err != nil { | ||
logging.Error(err) | ||
os.Exit(1) | ||
} | ||
code := t.Run() | ||
if err := pgtesting.DestroyPostgresServer(); err != nil { | ||
logging.Error(err) | ||
} | ||
os.Exit(code) | ||
} |
Oops, something went wrong.