package team

import (
	"context"
	"os"
	"testing"

	"github.com/tidbcloud/AgentTeam/internal/coredb"
	"github.com/tidbcloud/AgentTeam/internal/coredb/testkit"
)

var teamTiDB testkit.TiDBCoreDBFixture

func TestMain(m *testing.M) {
	os.Exit(testkit.RunTestsWithTiDBCoreDBFixture(m, "team", &teamTiDB))
}

func startTeamTestPool(t *testing.T, ctx context.Context) coredb.DB {
	t.Helper()
	return teamTiDB.RollbackDB(t, ctx)
}
