sessiontest

package
v0.1.0-develop.2026060... Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 9, 2026 License: MIT Imports: 3 Imported by: 0

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

func Protocol() *session.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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL