Documentation
¶
Overview ¶
Package sorotest provides schema-isolated Soro application test helpers.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewFactory ¶
func NewFactory[T any](app *App, builder factory.Builder[T], options ...repository.OperationOption) (*factory.Factory[T], error)
NewFactory binds a typed factory to the test app's repository for T.
func OpenRuntimeDatabase ¶
OpenRuntimeDatabase opens an isolated database through the configured non-owner runtime role. It is intended for application RLS integration tests.
Types ¶
type App ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
type Option ¶
type Option func(*settings) error
func Setup ¶
Setup runs after explicit migrations and before the HTTP server starts. Applications normally register resources, custom routes, hooks, and job handlers here; engines have already mounted before this callback runs.
func WithEngines ¶
WithEngines explicitly mounts engines before migrations, setup, and HTTP. Declared engine migrations are applied by New; application migrations remain explicit through WithMigrations, and mounting an engine never applies SQL.
func WithMigrations ¶
WithMigrations contributes explicit application migrations before the test app is returned. Engine-owned declarations are included in the same plan.