Documentation
¶
Overview ¶
Package sessiontest provides test helpers for code that depends on runtime/auth/session. It mirrors the net/http/httptest convention of placing test helpers in a sub-package to avoid polluting the production API.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Protocol ¶
Protocol returns the canonical *session.Protocol used by cross-package test helpers (FingerprintJTIRef + OrderingAuthzEpoch + RevokeOnAll). It is the single composition-root-equivalent entry point for test code that needs a *session.Protocol without each test reaching into NewProtocol directly.
Lives under runtime/auth/session/ so that the SESSION-PROTOCOL-COMPOSITION-ROOT-01 archtest allowlist covers this constructor; cells/* / adapters/* test helpers (e.g. cells/accesscore/internal/testutil) consume *session.Protocol via this function rather than re-implementing the option list and tripping the archtest.
Panics on misconfiguration: this helper is meant for tests where a non-recoverable Protocol setup is a programmer error, not a runtime path. The panic block below is a defensive branch — session.NewProtocol with the hardcoded option triplet never errors in practice. Per PANIC-REGISTERED-01 the reason must be a const literal at the panic call site, so this branch cannot be funneled through a shared helper without breaking the invariant.
Types ¶
This section is empty.