Skip to content

Commit

Permalink
fix: removed test query_from_root for now
Browse files Browse the repository at this point in the history
  • Loading branch information
joalopez1206 committed Oct 14, 2024
1 parent ab68385 commit 40f9d44
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions tests/edns_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ async fn query_from_ip_with_edns(domain_name: &str,
config.add_edns0(max_payload, version, do_bit, option);


config.set_name_servers(vec![ServerInfo::new_from_addr(ip_addr, Duration::from_secs(3))]);
config.set_name_servers(vec![ServerInfo::new_from_addr(ip_addr, Duration::from_secs(2))]);
let mut resolver = AsyncResolver::new(config);

let response = resolver.lookup(
Expand Down Expand Up @@ -99,15 +99,15 @@ async fn query_a_type_with_rrsig_edns() {
}
}

#[tokio::test]
/*#[tokio::test]
async fn query_from_root() {
const ROOTSV1: [u8; 4] = [192,58,128,30];
let mut ip2req = ROOTSV1.into();
let response = query_from_ip_with_edns("example.com",
"UDP", "A", Some(1024), 0, true,
Some(vec![3]), ip2req).await;
let response = match response {
let mut response = match response {
Ok(rrs) => rrs,
Err(e) => panic!("{:?}", e),
};
Expand All @@ -121,7 +121,12 @@ async fn query_from_root() {
if let Rdata::A(_) = arrs.get_rdata() {true}
else {false}).collect();
if let Rdata::A(rdata) = a_rrs[4].get_rdata() {
if let Rdata::A(rdata) = a_rrs[5].get_rdata() {
ip2req = rdata.get_address();
}
}
response = query_from_ip_with_edns("example.com",
"UDP", "A", Some(1024), 0, true,
Some(vec![3]), ip2req).await.unwrap();
println!("{}", response);
}*/

0 comments on commit 40f9d44

Please sign in to comment.