20 lines
273 B
Go
20 lines
273 B
Go
|
package bd_test
|
||
|
|
||
|
import (
|
||
|
"os"
|
||
|
"testing"
|
||
|
)
|
||
|
|
||
|
var (
|
||
|
database string
|
||
|
)
|
||
|
|
||
|
func TestMain(m *testing.M) {
|
||
|
database := os.Getenv("DATABASE_URL")
|
||
|
if database == "" {
|
||
|
database = "host=localhost user=admin password=root dbname=postgres sslmode=disable"
|
||
|
}
|
||
|
|
||
|
os.Exit(m.Run())
|
||
|
}
|