mirror of
https://github.com/gabehf/Koito.git
synced 2026-04-22 12:01:52 -07:00
Engine Handler HTTP Response Tests (#13)
* update handler signatures to use specific store interfaces * allow skipping Docker-based integration tests for local unit runs
This commit is contained in:
parent
64236c99c9
commit
ecae3699f1
10 changed files with 249 additions and 8 deletions
|
|
@ -256,6 +256,12 @@ func setupTestDataSansMbzIDs(t *testing.T) {
|
|||
}
|
||||
|
||||
func TestMain(m *testing.M) {
|
||||
// Allow skipping Docker-based integration setup for local unit test runs.
|
||||
if os.Getenv("KOITO_SKIP_DOCKER") == "1" {
|
||||
log.Println("KOITO_SKIP_DOCKER=1 set; skipping Docker-based tests in catalog_test")
|
||||
os.Exit(m.Run())
|
||||
}
|
||||
|
||||
pool, err := dockertest.NewPool("")
|
||||
if err != nil {
|
||||
log.Fatalf("Could not construct pool: %s", err)
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ import (
|
|||
"context"
|
||||
"fmt"
|
||||
"log"
|
||||
"os"
|
||||
"testing"
|
||||
|
||||
"github.com/gabehf/koito/internal/cfg"
|
||||
|
|
@ -27,6 +28,11 @@ func getTestGetenv(resource *dockertest.Resource) func(string) string {
|
|||
}
|
||||
|
||||
func TestMain(m *testing.M) {
|
||||
// Allow skipping Docker-based integration setup for local unit test runs.
|
||||
if os.Getenv("KOITO_SKIP_DOCKER") == "1" {
|
||||
log.Println("KOITO_SKIP_DOCKER=1 set; skipping Docker-based tests in psql_test")
|
||||
os.Exit(m.Run())
|
||||
}
|
||||
// uses a sensible default on windows (tcp/http) and linux/osx (socket)
|
||||
pool, err := dockertest.NewPool("")
|
||||
if err != nil {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue