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

Function test_server_state

crates/openshell-server/src/grpc/mod.rs:693–710  ·  view source on GitHub ↗

Build an in-memory `ServerState` for unit tests.

()

Source from the content-addressed store, hash-verified

691
692 /// Build an in-memory `ServerState` for unit tests.
693 pub async fn test_server_state() -> Arc<ServerState> {
694 let store = Arc::new(
695 Store::connect("sqlite::memory:?cache=shared")
696 .await
697 .unwrap(),
698 );
699 let compute = new_test_runtime(store.clone()).await;
700 Arc::new(ServerState::new(
701 Config::new(None).with_database_url("sqlite::memory:?cache=shared"),
702 store,
703 compute,
704 SandboxIndex::new(),
705 SandboxWatchBus::new(),
706 TracingLogBus::new(),
707 Arc::new(SupervisorSessionRegistry::new()),
708 None,
709 ))
710 }
711}
712
713// ---------------------------------------------------------------------------

Calls 3

connectFunction · 0.85
new_test_runtimeFunction · 0.85
with_database_urlMethod · 0.80

Tested by

no test coverage detected