test

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2026 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CommandFunctional

func CommandFunctional(cliParams *settings.Run, ioStreams *terminal.IOStreams, path string) *cobra.Command

CommandFunctional creates the 'test functional' subcommand.

func CommandInit

func CommandInit(cliParams *settings.Run, ioStreams *terminal.IOStreams, path string) *cobra.Command

CommandInit creates the 'test init' subcommand that generates a starter test suite.

func CommandList

func CommandList(cliParams *settings.Run, ioStreams *terminal.IOStreams, path string) *cobra.Command

CommandList creates the 'test list' subcommand.

func CommandTest

func CommandTest(cliParams *settings.Run, ioStreams *terminal.IOStreams, path string) *cobra.Command

CommandTest creates the 'test' command that runs and manages functional tests.

Types

type FunctionalOptions

type FunctionalOptions struct {
	IOStreams       *terminal.IOStreams
	CliParams       *settings.Run
	File            string
	TestsPath       string
	Output          string
	ReportFile      string
	UpdateSnapshots bool
	Sequential      bool
	Concurrency     int
	SkipBuiltins    bool
	TestTimeout     time.Duration
	Timeout         time.Duration
	Filter          []string
	Tag             []string
	Solution        []string
	DryRun          bool
	FailFast        bool
	Verbose         bool
	KeepSandbox     bool
	NoProgress      bool
	Watch           bool
}

FunctionalOptions holds configuration for the test functional command.

type InitOptions

type InitOptions struct {
	IOStreams *terminal.IOStreams
	CliParams *settings.Run
	File      string
}

InitOptions holds configuration for the test init command.

type LineTestProgress

type LineTestProgress struct {
	// contains filtered or unexported fields
}

LineTestProgress prints one line per completed test. Suitable for non-interactive output (CI logs, piped streams).

func NewLineTestProgress

func NewLineTestProgress(w io.Writer) *LineTestProgress

NewLineTestProgress creates a line-based progress reporter.

func (*LineTestProgress) OnTestComplete

func (r *LineTestProgress) OnTestComplete(result soltesting.TestResult)

OnTestComplete prints a single status line.

func (*LineTestProgress) OnTestStart

func (r *LineTestProgress) OnTestStart(_, _ string)

OnTestStart is a no-op for line-based output.

func (*LineTestProgress) Wait

func (r *LineTestProgress) Wait()

Wait is a no-op for line-based output.

type ListOptions

type ListOptions struct {
	IOStreams       *terminal.IOStreams
	CliParams       *settings.Run
	File            string
	TestsPath       string
	Output          string
	IncludeBuiltins bool
	Filter          []string
	Tag             []string
	Solution        []string
}

ListOptions holds configuration for the test list command.

type MPBTestProgress

type MPBTestProgress struct {
	// contains filtered or unexported fields
}

MPBTestProgress displays animated spinner bars per test using mpb. Intended for interactive (TTY) terminals.

Lock ordering: mpb's render goroutine calls decorator closures on a timer. Decorator closures must NEVER acquire mu because OnTestStart/OnTestComplete hold mu while calling mpb methods (AddBar, Increment, Abort), which would deadlock with the render goroutine. Instead, decorator-visible data is stored in sync.Map fields that are safe for concurrent lock-free reads.

func NewMPBTestProgress

func NewMPBTestProgress(w io.Writer) *MPBTestProgress

NewMPBTestProgress creates an mpb-based progress reporter that writes to w.

func (*MPBTestProgress) OnTestComplete

func (p *MPBTestProgress) OnTestComplete(result soltesting.TestResult)

OnTestComplete records the result and marks the bar finished.

func (*MPBTestProgress) OnTestStart

func (p *MPBTestProgress) OnTestStart(solution, test string)

OnTestStart creates a new spinner bar for the test.

func (*MPBTestProgress) Wait

func (p *MPBTestProgress) Wait()

Wait blocks until all bars finish rendering.

Jump to

Keyboard shortcuts

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