()
| 418 | } |
| 419 | |
| 420 | async fn create_client_service() -> Result<Arc<AcpClientService>> { |
| 421 | bitfun_core::service::config::initialize_global_config() |
| 422 | .await |
| 423 | .map_err(|error| anyhow!(error.to_string()))?; |
| 424 | let config_service = bitfun_core::service::config::get_global_config_service() |
| 425 | .await |
| 426 | .map_err(|error| anyhow!(error.to_string()))?; |
| 427 | let path_manager = bitfun_core::infrastructure::try_get_path_manager_arc() |
| 428 | .map_err(|error| anyhow!(error.to_string()))?; |
| 429 | let service = AcpClientService::new(config_service, path_manager) |
| 430 | .map_err(|error| anyhow!(error.to_string()))?; |
| 431 | service |
| 432 | .initialize_all() |
| 433 | .await |
| 434 | .map_err(|error| anyhow!(error.to_string()))?; |
| 435 | Ok(service) |
| 436 | } |
| 437 | |
| 438 | async fn load_client_config_json(service: &Arc<AcpClientService>) -> Result<Value> { |
| 439 | let json = service |
no test coverage detected