Add some tests for running basic server functionality
Build and test / check (push) Failing after 1m9s
Build and test / build (push) Successful in 1m34s
Build and test / test (push) Successful in 1m58s
Build and test / docs (push) Successful in 3m28s

This commit is contained in:
2026-02-09 11:11:19 +09:00
parent a5e5235c56
commit 8697809974
2 changed files with 25 additions and 0 deletions
+19
View File
@@ -240,3 +240,22 @@ pub async fn rwhod_packet_sender_task(
}
}
}
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn test_determine_relevant_interfaces() {
let interfaces = determine_relevant_interfaces().unwrap();
for interface in interfaces {
println!("Interface: {} Address: {}", interface.name, interface.addr);
}
}
#[test]
fn test_generate_rwhod_status_update() {
let status_update = generate_rwhod_status_update().unwrap();
println!("{:?}", status_update);
}
}