package plan_test

import (
	"context"
	"os"
	"testing"

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

var workflowPlanTiDB testkit.TiDBCoreDBFixture

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

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