Help us shape the future of Go! Take the 2026 Go Developer Survey

plutotest

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package plutotest wires a Pluto pack execution into ordinary go test, and gates a test on the derived qualification disposition. It runs no trial loop of its own: each runnable table plan expands to exactly one eval.Suite executed once via eval.Run. Execution itself lives in pkg/run — this package is a thin go-test wrapper around run.Execute that adds t.Fatalf-on-error and t.Logf-on-skip test ergonomics.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RequireDisposition

func RequireDisposition(t *testing.T, card qual.Scorecard, p profile.Profile, allowed ...profile.Disposition)

RequireDisposition evaluates card against p (profile.Evaluate) and t.Fatalf's when the derived disposition is not one of allowed, printing the disposition and every requirement outcome. An empty allowed list is itself a t.Fatal: a gate that accepts no disposition is a configuration bug, not a legitimate all-reject gate.

func Run

func Run(t *testing.T, spec RunSpec) qual.Scorecard

Run executes every pack in spec against spec.Target under spec.Manifest and returns the resulting Scorecard, by delegating to run.Execute (pkg/run): qual.Plan expands the manifest into per-table plans, a runnable plan is executed with eval.Run using spec.Target for every table, and a non-runnable plan (missing capability) becomes a Skipped TableResult instead of being executed. Run logs each skipped table's missing capabilities via t.Logf, and t.Fatalf's on any error run.Execute returns — a broken pack or manifest, or eval.Run's own preflight failure, is a bug in the test setup, not a verdict to record. Pluto implements no trial loop of its own — Trials passes straight through to eval.RunConfig.

Types

type RunSpec

type RunSpec struct {
	Manifest qual.Manifest
	Packs    []qual.Pack
	Target   eval.Target
	Trials   int // passed straight to eval.RunConfig.Trials
}

RunSpec is one full offline-or-live Pluto execution: a manifest, the packs to plan against it, the target to observe, and how many trials to run each scenario.

Jump to

Keyboard shortcuts

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