Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

chore(tests): add tinyhumans boot support file

Steven Enamakelf63663935721
diff --git a/tests/support/tinyhumans_boot.rs b/tests/support/tinyhumans_boot.rs
new file mode 100644
index 0000000000..462bb01080
--- /dev/null
+++ b/tests/support/tinyhumans_boot.rs
@@ -0,0 +1,25 @@
+//! Give an in-process core its TinyHumans backend transport.
+//!
+//! The core carries no backend client. Suites that spawn the
+//! `openhuman-core` binary get the transport from `main.rs`; suites that boot
+//! the core in-process (`build_core_http_router`, direct `ops` calls against
+//! the mock backend) must call [`boot`] first or every backend-touching call
+//! answers `BACKEND_UNAVAILABLE:`. Idempotent and cheap: call it from any
+//! fixture, as often as you like.
+//!
+//! Include with `#[path = "support/tinyhumans_boot.rs"] mod tinyhumans_boot;`
+//! (or `../support/...` from `tests/raw_coverage/`).
+
+#![allow(dead_code)]
+
+use std::sync::Once;
+
+static BOOT: Once = Once::new();
+
+/// Install the SDK-backed backend transport once per test process.
+pub fn boot() {
+ BOOT.call_once(|| {
+ openhuman_tinyhumans::install(openhuman_tinyhumans::InstallOptions::default())
+ .expect("install the TinyHumans backend transport for tests");
+ });
+}