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 ¶
func New(cfg buildrunner.Config, resolver changeset.Resolver) buildrunner.BuildRunner
New returns a buildrunner.BuildRunner bound to the queue named in cfg 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.