diff --git a/driver_integration_test.go b/driver_integration_test.go new file mode 100644 index 0000000..84a0da0 --- /dev/null +++ b/driver_integration_test.go @@ -0,0 +1,22 @@ +//go:build postgres + +package main + +import ( + "context" + "os" + "testing" + "time" +) + +func TestPostgres(t *testing.T) { + ctx, can := context.WithTimeout(context.Background(), time.Second*15) + defer can() + + conn := os.Getenv("INTEGRATION_POSTGRES_CONN") + pg, err := NewPostgres(ctx, conn) + if err != nil { + t.Fatal(err) + } + testDriver(t, pg) +} diff --git a/driver_test.go b/driver_test.go index 4944492..25abd9f 100644 --- a/driver_test.go +++ b/driver_test.go @@ -4,26 +4,10 @@ import ( "context" "errors" "io" - "os" "testing" "time" ) -func TestPostgres(t *testing.T) { - ctx, can := context.WithTimeout(context.Background(), time.Second*15) - defer can() - - conn := os.Getenv("INTEGRATION_POSTGRES_CONN") - if conn == "" { - t.Skip() - } - pg, err := NewPostgres(ctx, conn) - if err != nil { - t.Fatal(err) - } - testDriver(t, pg) -} - func TestDriverRAM(t *testing.T) { testDriver(t, NewRAM()) }