2022-12-13 19:24:42 +03:00
|
|
|
package bd_test
|
|
|
|
|
|
|
|
import (
|
|
|
|
"os"
|
|
|
|
"testing"
|
|
|
|
)
|
|
|
|
|
|
|
|
var (
|
|
|
|
database string
|
|
|
|
)
|
|
|
|
|
|
|
|
func TestMain(m *testing.M) {
|
|
|
|
database := os.Getenv("DATABASE_URL")
|
|
|
|
if database == "" {
|
2023-01-03 19:27:10 +03:00
|
|
|
database = "host=localhost user=test password=test dbname=test sslmode=disable"
|
2022-12-13 19:24:42 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
os.Exit(m.Run())
|
|
|
|
}
|