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

Function test_state

crates/openshell-server/src/lib.rs:951–975  ·  view source on GitHub ↗
(
        bind_addr: SocketAddr,
        enable_loopback_service_http: bool,
    )

Source from the content-addressed store, hash-verified

949 }
950
951 async fn test_state(
952 bind_addr: SocketAddr,
953 enable_loopback_service_http: bool,
954 ) -> Arc<ServerState> {
955 let store = Arc::new(
956 crate::persistence::Store::connect("sqlite::memory:?cache=shared")
957 .await
958 .expect("failed to create test store"),
959 );
960 let compute = crate::compute::new_test_runtime(store.clone()).await;
961 Arc::new(ServerState::new(
962 Config::new(None)
963 .with_database_url("sqlite::memory:?cache=shared")
964 .with_bind_address(bind_addr)
965 .with_server_sans(["*.dev.openshell.localhost"])
966 .with_loopback_service_http(enable_loopback_service_http),
967 store,
968 compute,
969 crate::sandbox_index::SandboxIndex::new(),
970 crate::sandbox_watch::SandboxWatchBus::new(),
971 crate::tracing_bus::TracingLogBus::new(),
972 Arc::new(crate::supervisor_session::SupervisorSessionRegistry::new()),
973 None,
974 ))
975 }
976
977 async fn start_tls_gateway_listener(
978 bind_addr: &str,

Callers 1

Calls 6

connectFunction · 0.85
new_test_runtimeFunction · 0.85
with_server_sansMethod · 0.80
with_bind_addressMethod · 0.80
with_database_urlMethod · 0.80

Tested by

no test coverage detected