Runtime diagnostics (medkit) tests¶
Test cases verifying the Runtime diagnostics (SOVD-a... (FEAT_0100) requirement cluster. Each test
:verifies: one or more req parents. The grounding slice establishes the
TEST_0900 IDs and the scenarios; downstream slices flip the requirements
they verify to implemented and link these tests.
Each model DTO (entity, DTC/fault with status sub-object and freeze-frame, collection envelope) survives a serialise → deserialise round-trip equal to the original. Establishes the wire-type surface the contract snapshot (Drop-in contract snapshot (TEST_0905)) later pins byte-for-byte. |
|
The transport-neutral gateway resolves the entity tree, fault lists, and the
worst-wins health rollup over the mock |
An entity’s aggregated health equals the worst health of itself and its descendants; faulting a leaf rolls its ancestors, and an ancestor returns to healthy only once its last faulting descendant clears. |
A binding’s callback hook hands work to the bounded forwarding channel and returns without blocking or allocating; with the channel full, the hook drops rather than blocks, and the control-path caller is never stalled by a slow diagnostics consumer. |
Serialising each served shape produces JSON whose keys and casing match the captured ros2_medkit contract corpus fixture, making drop-in compatibility a snapshot-tested regression guard. |
A live axum server over the mock provider is driven over real TCP; each
read-core response (entity lists, single-entity views, relationship
sub-resources, global and entity-scoped fault lists, the single-fault detail,
data reads, and the not-found error) shape-matches its
|
A smoke test hits at least one route per deferred family on the live server
and asserts |
The default server advertises a CORS allow-origin header, and a server
configured with a one-token bucket throttles the second request to |
A freshly constructed binding exposes the synthetic executor entity plus one
App entity per registered task through the |
A real |
The binding’s hooks are driven in a steady-state loop under a counting global
allocator; a differential measurement ( Retired. Zero-alloc test enforcement is scoped to executor and
connector scope pre-1.0 (Zero-alloc test enforcement... (ADR_0133)); the counting-global-allocator
harness is flake-prone (GitHub #132) and Non-blocking, bounded hook ... (REQ_0925) no longer
mandates verified allocation-freedom. The test file
( |
The same skeleton built via |
A live axum server whose |
Folding with an empty (default) manifest injects no skeleton and leaves the raw entities parentless — the same view a no-manifest fold produces — and a live server with no manifest serves empty Areas and empty component nesting sub-resources without panicking. |
A simulated |
Repeated degraded episodes, each cleared by a return to |
A confirmed DTC carries a freeze-frame under the contract’s |
A gateway unit test asserts that a fault carrying environment data in the
snapshot surfaces a non-empty |
Over a live axum server, |
A provider whose snapshot changes between polls (healthy → faulted → healthy)
feeds a live server running the refresh-and-diff loop. A client registers a
trigger, connects to |
Driving the provider from healthy to error-faulted while a no-filter trigger
is registered yields a |
A live axum server over the mock provider answers |
Over a live server, a read-core |
An end-to-end test |
Over a live axum server, |
Over a live server, a second client acquiring a held lock without
|
Over a live server, a |
A unit test over |
A unit test asserts |
Over a live server, |
Over a live server with auth enabled (default), |
Over a live server, after acquiring a lock as |
Over a live server, |
Over a live server driven by a provider whose snapshot changes between polls,
a fault raised before any client connects is replayed from the ring on a
fresh connect to |
Over a live server whose write seam is a configured |
Over a live server, |
Over a live server, both |
Over a live server, |
Over a live server, |
Over a live server, a script uploads ( |
Over a live server, an update registers ( |
Over a live server, |
Over a live server backed by a |
Over a live server, a cyclic subscription round-trips (POST pinned to the
entity → |
Over a live server backed by a |
Over a live server, |
Two checks. (1) Over a live gateway with an injected |