test: add endpoint tet

This commit is contained in:
shiro.lee
2024-07-05 23:18:25 +08:00
parent 62b1f34472
commit a0649be28d
2 changed files with 553 additions and 1 deletions
+1 -1
View File
@@ -93,7 +93,7 @@ pub fn get_host_ip(host: Host<&str>) -> Result<HashSet<IpAddr>> {
}
/// returns IPs of local interface
fn must_get_local_ips() -> Result<Vec<IpAddr>> {
pub(crate) fn must_get_local_ips() -> Result<Vec<IpAddr>> {
match netif::up() {
Ok(up) => Ok(up.map(|x| x.address().to_owned()).collect()),
Err(err) => Err(Error::from_string(format!("Unable to get IP addresses of this host: {}", err))),