conformance

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2026 License: MIT Imports: 6 Imported by: 0 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 conformance ships embeddable test suites that third-party module authors run against their kernel-contract implementations.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckAdminExtension

func CheckAdminExtension(t *testing.T, provider kernel.AdminExtensionProvider)

CheckAdminExtension verifies the structural contract of an AdminExtensionProvider: a non-nil provider with a name and version, a valid manifest, and a deterministic manifest (the shell renders it without rebuilding). Third-party module authors call it from their own module test; ValidateAdminExtension exposes the same check in error form for non-testify harnesses.

func CheckAuthorizer

func CheckAuthorizer(
	t *testing.T,
	resolve kernel.CapabilityResolver,
	fixture AuthorizerFixture,
)

CheckAuthorizer verifies the structural contract of a CapabilityResolver: determinism, fail-closed anonymous/unknown handling, and the admin grant. Capability names beyond "admin" are implementation-defined and not probed.

func ValidateAdminExtension

func ValidateAdminExtension(provider kernel.AdminExtensionProvider) error

ValidateAdminExtension is the error-returning core of CheckAdminExtension: every failure mode is a descriptive error.

Types

type AuthorizerFixture

type AuthorizerFixture struct {
	Admin     kernel.Principal
	NonAdmin  kernel.Principal
	Anonymous kernel.Principal
}

AuthorizerFixture labels the principals a resolver implementation is checked against. Admin must hold the "admin" capability; NonAdmin must not; Anonymous (the zero Principal) must hold nothing.

Jump to

Keyboard shortcuts

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