(db: &DatabaseConnection, id: &str)
| 357 | use tokio::sync::broadcast; |
| 358 | |
| 359 | async fn insert_server(db: &DatabaseConnection, id: &str) { |
| 360 | let now = Utc::now(); |
| 361 | server_entity::ActiveModel { |
| 362 | id: Set(id.to_string()), |
| 363 | token_hash: Set(Some("hash".to_string())), |
| 364 | token_prefix: Set(Some("prefix".to_string())), |
| 365 | name: Set(format!("Server {id}")), |
| 366 | weight: Set(0), |
| 367 | hidden: Set(false), |
| 368 | capabilities: Set(0), |
| 369 | protocol_version: Set(1), |
| 370 | created_at: Set(now), |
| 371 | updated_at: Set(now), |
| 372 | ..Default::default() |
| 373 | } |
| 374 | .insert(db) |
| 375 | .await |
| 376 | .expect("insert server"); |
| 377 | } |
| 378 | |
| 379 | fn build_service( |
| 380 | db: DatabaseConnection, |
no test coverage detected