(
bind_addr: SocketAddr,
enable_loopback_service_http: bool,
)
| 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, |
no test coverage detected