Documentation
¶
Overview ¶
Package testutil provides shared test helpers for ent client setup.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetupClient ¶
SetupClient creates an in-memory SQLite-backed ent client for testing. Each call gets an isolated database so parallel tests do not conflict. The client is automatically closed when the test completes via t.Cleanup.
func SetupClientWithDB ¶
SetupClientWithDB creates an in-memory SQLite-backed ent client for testing and also returns the underlying *sql.DB for raw SQL operations (e.g. sync_status table). Each call gets an isolated database so parallel tests do not conflict. Both the client and the DB are automatically closed via t.Cleanup.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.