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.
Accepts testing.TB so benchmarks can reuse the same setup as tests; any *testing.T or *testing.B value satisfies the interface.
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.
Accepts testing.TB for the same reason as SetupClient above.
Types ¶
This section is empty.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package parity holds upstream-ported fixture data for the Phase 72 parity regression test suite.
|
Package parity holds upstream-ported fixture data for the Phase 72 parity regression test suite. |
|
Package seed provides deterministic test data seeding for PeeringDB entity types.
|
Package seed provides deterministic test data seeding for PeeringDB entity types. |