nx_moonraker_ready_check_test.nx
buildroot/runtime/nx_moonraker_ready_check_test.nx
about
nx_moonraker_ready_check_test.nx -- ready-state classifier tests
(offline; classify_body verified against canned response bodies)
+ loopback fork test against fake Moonraker returning ready JSON.
Closed-form invariants:
(a) "{\"result\":{\"state\":\"ready\"}}" -> NX_READY_OK
(b) "{\"result\":{\"state\":\"shutdown\"}}" -> NX_READY_NOT_READY
(c) "{\"result\":{\"state\":\"error\"}}" -> NX_READY_NOT_READY
(d) Body with no "state" field -> NX_READY_BAD_RESPONSE
(e) Loose form with space: "\"state\": \"ready\"" -> NX_READY_OK
(f) Loopback fork: fake Moonraker returns 200 + ready JSON ->
ready check returns NX_READY_OK
(g) Verdict names non-NULL for all verdicts.
expect_exit: 0
license_tier: ORIGINAL
dependencies 5 imports · 0 importers
imports: nx_syscalls.nxnx_tls13_io.nxnx_moonraker_client.nxnx_moonraker_io.nxnx_moonraker_ready_check.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| 24 | const TEST_PORT: i64 = 18449 |
functions
| 26 | func body_len(s: *u8) -> i64 called by 1: main |
| 32 | func main() -> i64 |