Merge pull request 'Add USB live runtime inventory golden test' (#21) from fix/usb-golden-test into main

This commit is contained in:
clawdie 2026-06-04 14:46:49 +02:00
commit a488da3cab
2 changed files with 26 additions and 0 deletions

View file

@ -21,6 +21,8 @@ const OSA_WATCHDOG_STATUS: &str =
const OSA_WATCHDOG_RUN: &str =
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 USB_INV: &str =
include_str!("../../../manifests/2026-06-04-usb-runtime-inventory.json");
fn roundtrip_eq<T>(value: &T)
where
@ -51,6 +53,17 @@ fn parses_debby_inventory() {
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]
fn parses_domedog_inventory() {
let inv: RuntimeInventory = serde_json::from_str(DOMEDOG_INV).expect("parse domedog inventory");

View 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"
]
}