//go:build test

package main

import (
	"os"
	"testing"

	"crussell/db"
	"crussell/testutils/testdb"
)

func TestMain(m *testing.M) {
	pool := testdb.CreateTestDatabase("crussell_test")
	db.Conn = db.NewPoolProxy(pool)
	testdb.SeedBaseline(pool)
	code := m.Run()
	testdb.DestroyTestDatabase(pool, "crussell_test")
	os.Exit(code)
}
