//go:build test

package scheduling

import (
	"os"
	"testing"

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

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