artisan_middleware 5.7.1

The main services of the artisan platform to allow communication and management of linux system services
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#[cfg(all(test, target_os = "linux"))]
mod tests {
    use crate::network::resolve_url;

    #[tokio::test]
    async fn test_resolve_localhost() {
        let result = resolve_url("localhost", None).await.unwrap();
        assert!(result.unwrap().iter().any(|ip| ip.is_loopback()));
    }

    #[tokio::test]
    async fn test_resolve_invalid() {
        let result = resolve_url("invalid.invalid", None).await.unwrap();
        assert!(result.is_none());
    }
}