Skip to content

Commit

Permalink
test: check nsid
Browse files Browse the repository at this point in the history
  • Loading branch information
joalopez1206 committed Oct 24, 2024
1 parent 3f01463 commit cb66c2c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion tests/edns_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,12 @@ async fn query_a_type_with_rrsig_edns() {
assert_eq!(opt.get_name(), DomainName::new_from_str(""));
assert_eq!(opt.get_rtype(), Rrtype::OPT);
assert_eq!(opt.get_rclass(), Rclass::UNKNOWN(512));
//println!("{}", opt);
if let Rdata::OPT(rdata) = opt.get_rdata() {
let rdata = rdata.clone();
let (_,_,c) = &rdata.get_option()[0];
// because the first query option is 8.8.8.8, it redirects to google public dns in scl chile
assert_eq!(std::str::from_utf8(c).unwrap(), "gpdns-scl")
}
}
}

Expand Down

0 comments on commit cb66c2c

Please sign in to comment.