sessiontest

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2026 License: MIT Imports: 3 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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