quick

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package quick provides opinionated one-line shortcuts for the most common chaos test setups. Users who outgrow them drop down to engine.NewRule.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FailFirst

func FailFirst(t testing.TB, eng *engine.Engine, n int, kind engine.Kind, err error)

FailFirst adds a rule that returns err on the first n matches of kind, then becomes inert. The rule named "quick:fail-first" plus a unique counter so multiple calls in one test don't collide.

func PanicOnce

func PanicOnce(t testing.TB, eng *engine.Engine, kind engine.Kind, v any)

PanicOnce adds a rule that panics with v on the first matching call.

func SlowAlways

func SlowAlways(t testing.TB, eng *engine.Engine, kind engine.Kind, d time.Duration)

SlowAlways adds a rule that delays every matching call by d.

Types

This section is empty.

Jump to

Keyboard shortcuts

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