fake

package
v0.2.1 Latest Latest
Warning

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

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

Documentation

Overview

Package fake provides a buildrunner.BuildRunner whose outcome is driven by the triggered changes. With no marker every build immediately succeeds, behaving as a best-case stub for wiring and baselines. Failures are injected by embedding a marker token in a head change URI of the form "sq-fake=<token>":

sq-fake=trigger-error -> Trigger returns a non-nil error
sq-fake=build-fail    -> Status reports BuildStatusFailed
sq-fake=build-error   -> Status returns a non-nil error

The runner is stateless: Trigger encodes the desired terminal outcome into the returned BuildID, and Status decides the result purely from the BuildID it is given — no per-build bookkeeping. This means any runner instance can answer Status for an ID minted by any other (Trigger and Status can even live in different controllers/processes), and a single running stack can exercise the negative paths purely by varying request payloads. It is intended for examples and tests only, never production.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

New returns a buildrunner.BuildRunner that defaults to succeeding and honors marker tokens embedded in head change URIs. The resolver resolves the head batch's changes so the marker can be inspected.

Types

This section is empty.

Jump to

Keyboard shortcuts

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