cargo fmt

This commit is contained in:
tahahawa 2025-05-20 09:59:05 -04:00
parent 9d40b8c64c
commit a29e772ab9
4 changed files with 20 additions and 18 deletions

0
check.sh Normal file → Executable file
View File

View File

@ -3,9 +3,7 @@ use harmony::{
inventory::Inventory, inventory::Inventory,
maestro::Maestro, maestro::Maestro,
modules::{ modules::{
{
lamp::{LAMPConfig, LAMPScore}, lamp::{LAMPConfig, LAMPScore},
},
monitoring::monitoring_alerting::MonitoringAlertingStackScore, monitoring::monitoring_alerting::MonitoringAlertingStackScore,
}, },
topology::{K8sAnywhereTopology, Url}, topology::{K8sAnywhereTopology, Url},

View File

@ -370,10 +370,13 @@ mod tests {
let result = get_servers_for_backend(&backend, &haproxy); let result = get_servers_for_backend(&backend, &haproxy);
// Check the result // Check the result
assert_eq!(result, vec![BackendServer { assert_eq!(
address: "192.168.1.1".to_string(), result,
port: 80, vec![BackendServer {
},]); address: "192.168.1.1".to_string(),
port: 80,
},]
);
} }
#[test] #[test]
fn test_get_servers_for_backend_no_linked_servers() { fn test_get_servers_for_backend_no_linked_servers() {
@ -430,15 +433,18 @@ mod tests {
// Call the function // Call the function
let result = get_servers_for_backend(&backend, &haproxy); let result = get_servers_for_backend(&backend, &haproxy);
// Check the result // Check the result
assert_eq!(result, vec![ assert_eq!(
BackendServer { result,
address: "some-hostname.test.mcd".to_string(), vec![
port: 80, BackendServer {
}, address: "some-hostname.test.mcd".to_string(),
BackendServer { port: 80,
address: "192.168.1.2".to_string(), },
port: 8080, BackendServer {
}, address: "192.168.1.2".to_string(),
]); port: 8080,
},
]
);
} }
} }

View File

@ -11,8 +11,6 @@ use std::process::{Command, Output};
use temp_dir::{self, TempDir}; use temp_dir::{self, TempDir};
use temp_file::TempFile; use temp_file::TempFile;
use serde::Serialize;
use crate::data::{Id, Version}; use crate::data::{Id, Version};
use crate::interpret::{Interpret, InterpretError, InterpretName, InterpretStatus, Outcome}; use crate::interpret::{Interpret, InterpretError, InterpretName, InterpretStatus, Outcome};
use crate::inventory::Inventory; use crate::inventory::Inventory;