Public beta — not for production use. Data may be wiped at any time. Questions? Contact us.
Documentation menu

axiom flow mock add

Add or replace a node's mock fixture

View as Markdown
<!-- GENERATED by docs/scripts/gen-cli-reference — DO NOT EDIT. Source of truth: the cobra command definitions in cmd/axiom/cmd/. Regenerate from the repo root with: go run ./docs/scripts/gen-cli-reference -->

axiom flow mock add

Add or replace a node's mock fixture

Add (or replace) the mock for a node alias. The fixture comes from exactly one source:

--data '<json>'            inline response JSON (the node's output message)
--file <path>              an existing JSON fixture file
--error CODE[:message]     a typed failure (USER|TIMEOUT|TRANSPORT|PANIC|CANCELLED)
                           to exercise retry / on_error / rollback edges
--from-execution <id>      capture the alias's recorded output from a past
                           execution (one deliberate live run seeds the fixture)

--data and --from-execution write mocks/<alias>.json next to flow.yaml and reference it with file:; --file references the given path as-is.

Usage

axiom flow mock add <alias> [flow.yaml] [flags]

Flags

FlagShorthandTypeDefaultDescription
--datastringInline response JSON
--errorstringTyped failure as CODE or CODE:message
--filestringPath to a JSON fixture file
--from-executionstringExecution id to capture the alias's recorded output from
--help-hboolhelp for add

See also