Faults

Arm a fault

Arms deterministic interference on one resource of an active run. delay, duplicate and drop act on the forwarding of a callback resource that has a connector route: the delivery is held for the duration, made copies extra times, or recorded and never forwarded. status_override makes a mock_http resource answer the given status whatever its rules said, body and headers unchanged. A fault fires on the next observation it applies to, count times (default once) or, if persistent, until removed or the run ends; every firing is a fault.injected event beside the observation it acted on. One active fault of each type per resource. Needs rig.run. No randomness: the same faults against the same traffic give the same timeline.

post/v1/runs/{runId}/faults

Request

  • Base URL: https://api.ironfang.com/rig
  • URL: https://api.ironfang.com/rig/v1/runs/{runId}/faults
  • Auth: one of:
    • HTTP bearer
    • HTTP bearer

Request body

batchinteger

For reorder: how many deliveries to hold before releasing them last-first. A batch left incomplete when the run ends expires with outcome held.

bytesinteger

For partial_response: how much of the body the mock sends before closing the connection; 0 sends the headers alone.

bytes_per_secondinteger

For bandwidth_limit: the rate the mock sends its body at. Raised, and recorded as capped, if the body would otherwise take longer than 30s.

copiesinteger

For duplicate: extra deliveries; default 1.

countinteger

How many times the fault fires before it is spent; default 1. A reorder fires once per released batch.

delaystring

For delay: a duration such as "500ms" or "5s", at most 30s.

persistentboolean

Fire on every observation until removed; count is then not given.

resourcestring required

The resource, by the name the suite gave it.

statusinteger

For status_override: the status to answer.

type'delay' | 'duplicate' | 'drop' | 'status_override' | 'reorder' | 'payload_mutation' | 'connection_reset' | 'bandwidth_limit' | 'partial_response' required

Response

Fault armed

Changes

No recorded changes to this operation across all 1 revision of this API.