Documentation
¶
Overview ¶
Package testutil provides shared test helpers for internal packages.
Index ¶
- func AgentTaskRepository(tb testing.TB, connection *sql.DB) *database.AgentTaskRepository
- func DocumentRepository(tb testing.TB, connection *sql.DB) *database.DocumentRepository
- func NewAuthStorage(t *testing.T, credentials map[string]auth.Credential) *auth.Storage
- func SessionRepository(tb testing.TB, connection *sql.DB) *database.SessionRepository
- func TaskRepository(tb testing.TB, connection *sql.DB) *database.TaskRepository
- func TestMainHome(packageName string) func(code int)
- func ToolArgumentFields(input tool.Arguments) map[string]any
- func ToolArguments(input map[string]any) tool.Arguments
- func ToolArgumentsJSON(input string) tool.Arguments
- func WorkflowRepository(tb testing.TB, connection *sql.DB) *database.WorkflowRepository
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AgentTaskRepository ¶
AgentTaskRepository constructs an agent-task repository or fails the test.
func DocumentRepository ¶
DocumentRepository constructs a document repository or fails the test.
func NewAuthStorage ¶
NewAuthStorage creates file-backed auth storage seeded with credentials.
func SessionRepository ¶
SessionRepository constructs a session repository or fails the test.
func TaskRepository ¶
TaskRepository constructs a task repository or fails the test.
func TestMainHome ¶
TestMainHome creates and configures an isolated librecode home and returns a TestMain cleanup callback that removes it before exiting with code.
func ToolArgumentFields ¶
ToolArgumentFields decodes tool arguments into generic fields for assertions.
func ToolArguments ¶
ToolArguments converts a generic test argument map into validated tool arguments.
func ToolArgumentsJSON ¶
ToolArgumentsJSON converts raw test JSON into validated tool arguments.
func WorkflowRepository ¶
WorkflowRepository constructs a workflow repository or fails the test.
Types ¶
This section is empty.