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.