Documentation
¶
Overview ¶
Package testkit exercises the production Foundry lifecycle with test-owned cleanup. Feature-specific fakes and clients are added with those features.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Namespace ¶
Namespace returns an independent test identity for explicitly shared cache, queue and coordination backends. It does not delete keys or flush a backend. Keep and reuse the returned value within one application assembly.
func Plugins ¶
func Plugins(t testing.TB, plugins ...foundation.Plugin) *foundation.App
Plugins runs explicitly linked plugins through production Build/Start and the existing test-owned cleanup. For application provider dependencies or custom runtime options use Start with a fully assembled builder instead.
func Start ¶
func Start(t testing.TB, builder *foundation.Builder) *foundation.App
Start builds and boots the supplied production bootstrap and registers cleanup before startup, so partial boot failures also release acquired resources.
func TrackExternalInputs ¶
TrackExternalInputs makes Go's test cache depend on make's current source/tool fingerprint. Use it in tests invoking a compiler, generator, gopls or Node over external-module inputs. Make computes the fingerprint once per invocation. For a direct go test invocation without make, use -count=1 for these gates: Go does not track child file reads outside the parent test's module root.
Types ¶
type Clock ¶
type Clock struct {
// contains filtered or unexported fields
}
Clock is a concurrency-safe, explicitly controlled application clock. It does not alter Go timers or context deadlines, so freezing it cannot hang shutdown.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package application runs configured application kernels with test-owned cleanup.
|
Package application runs configured application kernels with test-owned cleanup. |
|
Package auth provides test-owned production authentication scopes.
|
Package auth provides test-owned production authentication scopes. |
|
Package dbassert asserts persisted state through typed query callbacks.
|
Package dbassert asserts persisted state through typed query callbacks. |
|
Package email provides assertions for the opt-in memory email driver.
|
Package email provides assertions for the opt-in memory email driver. |
|
Package events records explicitly selected production event listeners.
|
Package events records explicitly selected production event listeners. |
|
Package factory builds typed ORM drafts and persists them through the ordinary model lifecycle.
|
Package factory builds typed ORM drafts and persists them through the ordinary model lifecycle. |
|
Package http provides test-owned HTTP servers and bounded clients.
|
Package http provides test-owned HTTP servers and bounded clients. |
|
Package httpclient supplies deterministic outbound HTTP transports for tests.
|
Package httpclient supplies deterministic outbound HTTP transports for tests. |
|
Package jobs supplies an explicitly local production queue authority for tests.
|
Package jobs supplies an explicitly local production queue authority for tests. |
|
Package notifications supplies a recording custom-channel transport for tests.
|
Package notifications supplies a recording custom-channel transport for tests. |
|
Package postgres provides opt-in, non-destructive PostgreSQL acceptance helpers.
|
Package postgres provides opt-in, non-destructive PostgreSQL acceptance helpers. |
|
application
Package application binds retained PostgreSQL scopes to production application settings.
|
Package application binds retained PostgreSQL scopes to production application settings. |
|
Package redis provides opt-in, non-destructive Redis acceptance helpers.
|
Package redis provides opt-in, non-destructive Redis acceptance helpers. |
|
Package storage provides a shared behavioral contract for storage adapters.
|
Package storage provides a shared behavioral contract for storage adapters. |
|
Package websocket provides a bounded protocol client for independent consumer tests.
|
Package websocket provides a bounded protocol client for independent consumer tests. |