MCPcopy Create free account
hub / github.com/NVIDIA/OpenShell / router_with_state

Function router_with_state

crates/openshell-server/src/http.rs:469–472  ·  view source on GitHub ↗

Build a router whose state is driven by a `HealthState` we control, so each handler-shape test can pin the exact mapping under test.

(state: HealthState)

Source from the content-addressed store, hash-verified

467 /// Build a router whose state is driven by a `HealthState` we control,
468 /// so each handler-shape test can pin the exact mapping under test.
469 fn router_with_state(state: HealthState) -> Router {
470 let (_tx, rx) = watch::channel(state);
471 health_router_from_receiver(rx)
472 }
473
474 #[tokio::test]
475 async fn healthz_is_minimal_and_does_not_touch_the_database() {

Calls 1

Tested by

no test coverage detected