Add USB live runtime inventory golden test
Manifest captured from the clawdie-iso operator USB: - FreeBSD 15.0-RELEASE, Node v24.14.1, pi 0.78.0 - Validates the RuntimeInventory contract parses live USB data
This commit is contained in:
parent
b3f55344ef
commit
c422f16697
2 changed files with 26 additions and 0 deletions
|
|
@ -21,6 +21,8 @@ const OSA_WATCHDOG_STATUS: &str =
|
||||||
const OSA_WATCHDOG_RUN: &str =
|
const OSA_WATCHDOG_RUN: &str =
|
||||||
include_str!("../../../manifests/2026-05-26-osa-watchdog-host-status-run-manifest.json");
|
include_str!("../../../manifests/2026-05-26-osa-watchdog-host-status-run-manifest.json");
|
||||||
const DEBBY_INV: &str = include_str!("../../../manifests/2026-05-26-debby-runtime-inventory.json");
|
const DEBBY_INV: &str = include_str!("../../../manifests/2026-05-26-debby-runtime-inventory.json");
|
||||||
|
const USB_INV: &str =
|
||||||
|
include_str!("../../../manifests/2026-06-04-usb-runtime-inventory.json");
|
||||||
|
|
||||||
fn roundtrip_eq<T>(value: &T)
|
fn roundtrip_eq<T>(value: &T)
|
||||||
where
|
where
|
||||||
|
|
@ -51,6 +53,17 @@ fn parses_debby_inventory() {
|
||||||
roundtrip_eq(&inv);
|
roundtrip_eq(&inv);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn parses_usb_inventory() {
|
||||||
|
let inv: RuntimeInventory = serde_json::from_str(USB_INV).expect("parse usb inventory");
|
||||||
|
assert_eq!(inv.schema, RUNTIME_INVENTORY_SCHEMA);
|
||||||
|
assert_eq!(inv.host, "usb.clawdie.home.arpa");
|
||||||
|
assert_eq!(inv.os, "15.0-RELEASE");
|
||||||
|
assert_eq!(inv.node.as_deref(), Some("v24.14.1"));
|
||||||
|
assert_eq!(inv.pi.as_deref(), Some("0.78.0"));
|
||||||
|
roundtrip_eq(&inv);
|
||||||
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn parses_domedog_inventory() {
|
fn parses_domedog_inventory() {
|
||||||
let inv: RuntimeInventory = serde_json::from_str(DOMEDOG_INV).expect("parse domedog inventory");
|
let inv: RuntimeInventory = serde_json::from_str(DOMEDOG_INV).expect("parse domedog inventory");
|
||||||
|
|
|
||||||
13
manifests/2026-06-04-usb-runtime-inventory.json
Normal file
13
manifests/2026-06-04-usb-runtime-inventory.json
Normal file
|
|
@ -0,0 +1,13 @@
|
||||||
|
{
|
||||||
|
"schema": "clawdie.runtime-version-inventory.v1",
|
||||||
|
"host": "usb.clawdie.home.arpa",
|
||||||
|
"os": "15.0-RELEASE",
|
||||||
|
"node": "v24.14.1",
|
||||||
|
"pi": "0.78.0",
|
||||||
|
"package_manager": "pkg",
|
||||||
|
"iso_npm_globals_pin": {},
|
||||||
|
"notes": [
|
||||||
|
"live USB operator workstation",
|
||||||
|
"colibri-daemon v0.0.1 active"
|
||||||
|
]
|
||||||
|
}
|
||||||
Loading…
Add table
Reference in a new issue