Skip to content

Commit

Permalink
host name to host addres trnaslation test done
Browse files Browse the repository at this point in the history
  • Loading branch information
FranciscaOrtegaG committed Nov 1, 2023
1 parent 117b6bd commit 9f49d1f
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/resolver/async_resolver.rs
Original file line number Diff line number Diff line change
Expand Up @@ -123,5 +123,17 @@ mod async_resolver_test {

}

#[tokio::test]
async fn host_name_to_host_address_translation() {
let resolver = AsyncResolver::new(ResolverConfig::default());
let domain_name = "example.com";
let transport_protocol = "UDP";
let ip_address = resolver.lookup_ip(domain_name, transport_protocol).await.unwrap();

assert!(ip_address.is_ipv4());

assert!(!ip_address.is_unspecified());
}


}

0 comments on commit 9f49d1f

Please sign in to comment.