()
| 1525 | Some(serde_json::to_string(&filtered).unwrap_or_else(|_| "[]".to_string())) |
| 1526 | } |
| 1527 | |
| 1528 | #[cfg(test)] |
| 1529 | mod cleanup_tests { |
| 1530 | use super::{DEFAULT_SERVER_NAME, collect_orphan_server_ids, remove_ids_from_json}; |
| 1531 | use crate::entity::server; |
| 1532 | use chrono::Utc; |
| 1533 | use serverbee_common::constants::CAP_DEFAULT; |
| 1534 | use std::collections::HashSet; |
| 1535 | |
| 1536 | fn make_server(id: &str, name: &str, os: Option<&str>) -> server::Model { |
| 1537 | let now = Utc::now(); |
no outgoing calls
no test coverage detected