RestApiv2/internal/bd/bd_test.go

20 lines
273 B
Go
Raw Normal View History

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 == "" {
database = "host=localhost user=admin password=root dbname=postgres sslmode=disable"
}
os.Exit(m.Run())
}