package identity

import (
	"context"
	"os"
	"testing"

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

var identityTiDB testkit.TiDBCoreDBFixture

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

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