testkit

package
v1.235.0 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2026 License: Apache-2.0 Imports: 16 Imported by: 1 module, 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 testkit provides local protocol fixtures for plugin conformance tests.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExpireOIDCSession

func ExpireOIDCSession(storage keyring.Keyring) error

ExpireOIDCSession advances the starter's cached access-token expiry in fixture storage. This helper is only used by conformance against isolated memory/file backends.

Types

type Issuer

type Issuer struct {
	Server *httptest.Server
	// contains filtered or unexported fields
}

Issuer serves discovery, signed ID tokens, PKCE exchange, refresh, and revocation. It accepts no developer credentials and binds only to a local test listener.

func NewIssuer

func NewIssuer(options ...IssuerOption) (*Issuer, error)

NewIssuer starts an isolated OIDC fixture.

func (*Issuer) Close

func (i *Issuer) Close()

Close stops the issuer.

func (*Issuer) Counts

func (i *Issuer) Counts() (int, int, int)

Counts returns code-exchange, refresh, and revocation request counts.

type IssuerOption

type IssuerOption func(*Issuer)

IssuerOption configures a deliberate protocol failure in a local test fixture.

func WithClaims

func WithClaims(mutate func(map[string]any)) IssuerOption

WithClaims changes signed claims to exercise relying-party validation.

func WithInvalidSignature

func WithInvalidSignature() IssuerOption

WithInvalidSignature signs with a key absent from the discovery JWKS.

Directories

Path Synopsis
Package fakeplugin lets a Go test binary act as a native Atmos plugin without shell commands or platform-specific executables.
Package fakeplugin lets a Go test binary act as a native Atmos plugin without shell commands or platform-specific executables.

Jump to

Keyboard shortcuts

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